2011/10/22 xunxun <xunxun1...@gmail.com>: > 于 2011/10/22 13:13, xunxun 写道: >> >> Hi, all >> >> It seems that gcc's auto-omit-frame-pointer has other problems. >> >> The example is from mingw bug tracker: >> http://sourceforge.net/tracker/?func=detail&aid=3426555&group_id=2435&atid=102435 >> >> g++ -O3 main.cpp running will crash. >> g++ -O2 main.cpp running no crash. >> g++ -O3 -fno-omit-frame-pointer running no crash. >> >> I don't know in the end which optimize option defaultly contains this >> switch "-fomit-frame-pointer" on i686-pc-mingw32 or x86_64-w64-mingw32? >> > It crashes on Win7.
Well, this issue isn't related to this thread. It is more related to dw2 and SjLj used. For toolchains using dw2 exception mechanism, you will see this crash. By using SjLj you won't (thanks for checking this). This shows indeed my strong concerns about dw2 exception mechanism for 32-bit Windows targets. The implementation depends too much on code-patterns and is therefore a bit inconsitant. Secondly it causes harm if you try to throw exceptions over VC generated code. So I would strongly recomment to use the slower, but more reliable SjLj throwing mechanism on Windows 32-bit. Regards, Kai