[Bug target/37750] a lot of crashes with tree optimizations on mingw

dbkr at mxtelecom dot com gcc-bugzilla@gcc.gnu.org
Tue May 25 12:09:00 GMT 2010



------- Comment #13 from dbkr at mxtelecom dot com  2010-05-25 12:09 -------
I've just run into this problem too with MinGW's packaged GCC 4.4.0. It was
working fine for some time but recently started crashing when both libevent and
the C++ program that libevent was calling back into were both compiled at at
least -O1. This causes libevent to use the edi register whose value is
corrupted (set to null, actually) by a callback into our C++ program.

The C++ app seems to use the edi register at any optimisation level and in any
case seems to push it onto the stack and pop it off at the end of the callback,
but some kind of stack corruption goes on within the callback that means the
value popped off the stack at the end is zero when the app is compiled at -O1.

Compiling the app at -O0 or at -O1 with -fno-dce prevents the crash, although
compiling with -O2 -fno-dce causes the same crash.


-- 

dbkr at mxtelecom dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dbkr at mxtelecom dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37750



More information about the Gcc-bugs mailing list