Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Alexander Dupuy
Mon, 24 Apr 1989 18:55
Why some G++ programs failed on the Sun-3, but worked on the Sun-4
Author: Alexander Dupuy
Date: Mon, 24 Apr 1989 18:55
Date: Mon, 24 Apr 1989 18:55
24 lines
1521 bytes
1521 bytes
GNU G++ 1.34.1 / SunOS 4.0.1 / Sun-3 (& not Sun-4) They were all dying in malloc, the first time it was called (by on_exit, in the G++ startup code). When linked with Sun's debugging malloc, a diagnostic was given about "free: illegal address (0x21af2)". The problem was that the value returned by sbrk was not fullword aligned, and this tickled a bug in Sun's malloc implementation, which uses free to add newly sbrk'd space to the free-"list". I'm amazed this hasn't bit anyone before. The bug wasn't tickled on the Sun-4, since on the sparc, ld++ fullword aligns common blocks (and thus the end of bss and beginning of sbrk'd space). The right fix is to eliminate the bug in morecore, which (having source) I have done. But it is probably desirable to fullword align comon blocks on all architectures (for performance reasons), and since this is apparently the behavior of the Sun linker, it would be useful for GNU ld and ld++ to do this on Suns. @alex -- inet: dupuy@cs.columbia.edu uucp: ...!rutgers!cs.columbia.edu!dupuy
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