Thread View: gnu.epoch.misc
1 messages
1 total messages
Started by Simon Marshall
Wed, 15 Apr 1992 12:53
Re: FIX for immediate Epoch-4.0p0 "memcpy(0) crash" when using GCC 2.1
Author: Simon Marshall
Date: Wed, 15 Apr 1992 12:53
Date: Wed, 15 Apr 1992 12:53
37 lines
2257 bytes
2257 bytes
This sounds remarkably like the problem I had; I think you may have
jumped on the wrong reason.
| * Config: "s-bsd4-2.h", "m-sun3.h", and the extra "config.h" lines
|
| #define START_FILES crt0.o /lib/Mcrt1.o
| #define LIB_GCC "/usr/gnu/lib/gcc-lib/sun3-sunos3/2.1/libgcc.a" -lc
| #define LIBS_DEBUG
|
| but should apply to any system/configuration where it
| is unsafe to reference nonexisting arguments of
| function calls.
| * Solution: An investigation of message() reveals that it is
| declared with four arguments yet is not passed more
| than two in this case (!). The following fix uses the
| GCC <stdarg.h> include file to retrieve the correct
| number of arguments when GCC is used.
Aha! I think maybe that -lc which you added is pulling in a
definition for _doprnt(), which is what message() calls to do the actual
printing. Epoch intends it to be its own _doprnt(), but instead you
link in the _doprnt() in libc.a and epoch uses this. This version takes
different args. To check, see if _doprnt() is in libc.a.
My solution was to take the code I needed from libc.a (there's not
much, just a few files) and build my own libc.a to link in. No hacking
of epoch code needed.
Maybe the real answer would be to use a unique name for the function
supplied with epoch...?
Simon.
_______________________________________________________________________________
Simon Marshall, Dept. of Computer Science, University of Hull, Hull HU6 7RX, UK
"Football isn't about life and death. It's more important than that." Bill
Email: S.Marshall@Hull.ac.uk Phone: +44 482 465181 Fax: 466666 Shankley
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads