gcc-2.95.2 crash when optimizing
Kurt Skauen
kurt.skauen@c2i.net
Wed Jan 12 14:53:00 GMT 2000
Hi, all. I have now figured out what triggered the bug.
I did as Martin v. Loewis suggested, and pushed one of
the offending files through the preprocessor. I then
moved it to a linux box, where I installed gcc 2.95.2
(Bad experience! No fun compiling gcc on a P90 :) )
The compiler did not crash here, but I noticed that
the memory usage fluxated a lot at the end of the compilation
and since I was uncertain how sbrk() behaved when feeded
negative values, I disabled malloc's trimming so it never
released any memory to the system when free() vas called.
This caused the compiler to stopped crashing! After verifying
that sbrk() indeed worked, I throwed a memset() into sbrk() so it
would clear all newly allocated memory, and the compiler
started to work even whith the trimming enabled!
The conclution to all this must be that some spot in gcc
relies on malloc() to return cleared memory :(
It should be possible for the maintainers to reproduse
this by inserting a memset( newmem, -1, size ) or someting
similar in xmalloc(). But if you belive I can have some useful
information, please send me a mail and I will try to help.
BTW: Is sbrk() supposed to return cleared memory?
--
Kurt Skauen
Author of AltOS ( http://altos.funcom.com/ )
More information about the Gcc-bugs
mailing list