This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Likely code generation bug in GCC 4.0.1


On Mon, May 14, 2007 at 12:15:53PM +0200, Claus Fischer wrote:
: On Mon, May 14, 2007 at 10:59:37AM +0100, Andrew Haley wrote:
: : Sure, but if we had a test case we'd know if this bug was mingw
: : specific.
: 
: Right, I don't know that myself now. But I can recompile gcc 4.0.1
: for Linux (I have the sources archived) and find that out.
: 
: I'll give you notice.

Apparently, the bug also happens on Linux. However, two effects
make it very difficult to isolate it in a small test example:

(1) Linux apparently places variables in slightly different
    places each time the program is started (stack smashing
    protection).
    That can be fixed with
       sysctl -w kernel.randomize_va_space=0

(2) With that out of the way, the runs of the simulator are
    apparently reproducible for the same binary, but not after
    recompilation. Recompiling the code after a slight change
    somewhere else changes the behaviour.

    Now that could indicate usage of an uninitialized variable
    from the stack, only valgrind doesn't report any such.

Anyway, things have gotten too involving for me to spend more
time on this. I have rebuilt my cross-compiler environment with
gcc 4.1.2 and I hope that solves my problems.

Regards,

Claus


-- 
Claus Fischer <claus.fischer@clausfischer.com>
http://www.clausfischer.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]