This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin 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]

Fw: [ mingw-Bugs-630952 ] Crash using Kernel32 and C++ exceptions


Another gotcha in the Dwarf2 vs sjlj story.  This affects cygwin just as much
as mingw.
I am leaning more and more towards a reversion of Dwarf2 eh to sjlj for mingw
(ASAP,ie with next release of 3.2.x series) , but will await the sage consensus
of cygwin and mingw devlprs.

I do not think that addition of  MD_FALLBACK_FRAME_STATE_FOR code will
fix this problem (or the other win32 callback problem reported by
Oscar), since AFAICT, the fallback is only used when signal is raised.

----- Original Message -----
From: <noreply@sourceforge.net>
To: <noreply@sourceforge.net>
Sent: Wednesday, 30 October 2002 23:53
Subject: [Mingw-notify] [ mingw-Bugs-630952 ] Crash using Kernel32 and
C++ exceptions


> This list is used to send updates of submitted patches, bug reports
and file releases.  You are discouraged from posting to this list.  If
you wish to unsubscribe you can do so at
https://lists.sourceforge.net/lists/listinfo/mingw-notify.Bugs item
#630952, was opened at 2002-10-30 22:32
> You can respond by visiting:
>
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=630952&grou
p_id=2435
>
> Category: w32api
> Group: None
> Status: Open
> Resolution: None
> Priority: 5
> Submitted By: Florin Ghido (ghido)
> >Assigned to: Danny Smith (dannysmith)
> Summary: Crash using Kernel32 and C++ exceptions
>
> Initial Comment:
>
> Hi!
>
> There is a big problem with using Kernel32.dll functions
> and C++ exceptions. After calling a Kernel32.dll function
> with at least one parameter, the program fails to catch
> any C++ exception.
> This appears only when compiling with the option:
> -fomit-frame-pointer
>
> The command line used is:
> gcc -fomit-frame-pointer Test.cpp -lstdc++ -o Test.exe -s
>
> I am using the latest packages:
> MinGW-2.0.0-3.exe
> binutils-2.13.90-20021006-2.tar.gz
>
> The source.cpp file is:
> --------------------------------------
> #include <windows.h>
>
> void test()
> {
>   SYSTEMTIME p;
>   GetSystemTime(&p);
>   throw 1;
> }
>
> int main(int argc,char* argv[])
> {
>   try
>   {
>     test();
>     return 0;
>   }
>   catch(...)
>   {
>     return 1;
>   }
> }
> -----------------------------------------
> Running it under W98 SE and W2000 P produces
> the following result:
>
> abnormal program termination
>
> Best regards,
> Florin Ghido
>
>
> ----------------------------------------------------------------------
>
> >Comment By: Danny Smith (dannysmith)
> Date: 2002-10-31 12:53
>
> Message:
> Logged In: YES
> user_id=11494
>
> Thanks for your report and testcase.
>
> I confirm the bug on GCC 3.3 (CVS) built with with
> Dwarf2 EH handling.  The workaround is to add -
> maccumulate-outgoing-args switch when using -fomit-
> frame-pointer with Dwarf 2.
>
> Could you try that with gcc 3.2 please?
>
> With same gcc 3.3 source built with sjlj exception
> model, the  -fomit-frame-pointer switch works on your
> testcase, _without_ need for -maccumulate-outgoing-
> args switch.
>
> Have a look at PR 6764 at gnatsweb for another
> testcase that shows the same bug and the same
> workaround.
>
> Gnatsweb is here:
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?database=gcc
>
> Also, PR6764 tescase works fine with sjlj exception
> handling.
>
>  Danny
>
> ----------------------------------------------------------------------
>
> You can respond by visiting:
>
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=630952&grou
p_id=2435
>


http://careers.yahoo.com.au - Yahoo! Careers
- 1,000's of jobs waiting online for you!


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