Thread View: comp.unix.programmer
1 messages
1 total messages
Started by Shane McDaniel
Thu, 17 Jan 2002 17:56
ar core dump
Author: Shane McDaniel
Date: Thu, 17 Jan 2002 17:56
Date: Thu, 17 Jan 2002 17:56
34 lines
2226 bytes
2226 bytes
I am using ar to make a static library, and previously have had no trouble doing so with this particular code. Now though, I get a core dump when running ar. Also, this code compiles and links fine on Sun Solaris 8, but not on x86 Solaris 8 using the same versions of g++ and ar. I have compiled ETCP.o and PO.o using g++ 2.95.3 with the flag "-g" when I run ar r libETCP.a.2.0 PO.o ETCP.o ar core dumps because of PO.o, I know this because removing PO.o from the above command runs fine, but vice versa doesn't. I've included ETCP.o simply for completeness. running 'gdb ar core' I see the following backtrace #0 0xdfb16110 in realloc () from /usr/lib/libc.so.1 #1 0x8052be0 in trim () #2 0x8053621 in writefile () #3 0x805285c in trim () #4 0x8052e0e in writefile () #5 0x8051cfc in main () #6 0x8051a20 in _start () The change in my source are very simplistic. I simply added another paramater to a function pointer prototype everywhere it was used in both of the ETCP and PO classes. and since ETCP doesn't crash ar I don't see why the same changes for PO should crash ar. I would have thought that if my code compiled fine in g++ then ar shouldn't care. If anyone has any information that might assist me I would appreciate it.
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