From: SF/projects/mingw n. l. <min...@li...> - 2011-10-21 10:28:25
|
Bugs item #3426555, was opened at 2011-10-20 22:06 Message generated for change (Comment added) made by zhnmju123 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3426555&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: MinGW Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: ZenJu (zhnmju123) Assigned to: Nobody/Anonymous (nobody) Summary: Compiler bug in GCC 4.6.2 Initial Comment: Hi, this one has cost me a good part of my sanity. After hours of painful trial and error I was able to create a minmal sample: Symptoms: The compiled application crashes due to an allegedly uncaught exception. However the exception should be catched, as can be seen in the sourcecode. Reproduce: 1. get MinGW latest repository catalogues (GCC 4.62) via automatic installer 2. Create a new CodeBlocks console project 3. Set optimization to O3 - this is important! 4. integrate file "main.cpp" from the attachment Alternative: load test.cbp directly from attachment. However note that this is nothing more than steps 1 -4. 5. Compile, start and let it crash. Further remarks: This example is *really* minimal. If I make any change, the bug is not reproducible anymore, for example: - Set optimization to O2 instead of O3 -> no crash - Set size of char array "errorMessage" to 2000 instead of 20000 -> no crash - use an older compiler from automatic installer: pre-packaged repository catalogues 20110802 -> no crash - remove any of the other seemingly unused or superfluous pieced of code -> no crash - This is not some theoretical problem, actually my users currently suffer from application crashes that can be attributed to this bug. My Setup: - Windows7 x64, - latest repository catalogues (GCC 4.62) complete new install as of today, for the purpose of verification - IDE: Codeblocks nighly Regards, ZenJu ---------------------------------------------------------------------- >Comment By: ZenJu (zhnmju123) Date: 2011-10-21 10:28 Message: > I assume you mean gcc 4.6.1 Yes, it's 4.6.1-2 > Or are you running mingw-w64's No, I'm using the ordinary 32-bit MinGW compiler. > try adding '-fno-omit-frame-pointer' Great, this works!!! Now I'm crossing fingers, this really worked around the problem and it doesn't pop up elsewhere... ---------------------------------------------------------------------- Comment By: Chris Sutcliffe (ir0nh34d) Date: 2011-10-21 01:01 Message: I assume you mean gcc 4.6.1? Or are you running mingw-w64's gcc 4.6.2? Regardless, try adding '-fno-omit-frame-pointer' to your compile options. I ran in to a similar issue with the O2 optimization when compiling the latest GDB. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3426555&group_id=2435 |