[Bug rtl-optimization/49230] New: please provide workaround for setjmp/longjmp in mingw32

jojelino at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon May 30 11:55:00 GMT 2011


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

           Summary: please provide workaround for setjmp/longjmp in
                    mingw32
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jojelino@gmail.com
              Host: i686-pc-cygwin
            Target: i686-pc-mingw32
             Build: i686-pc-cygwin


in mingw32, there is setjmp/longjmp which its implementation is specific to
msvc.
and, in latest gcc trunk ebp register doesn't have to have its caller's frame
address.(
unfortunately, this could cause mingw32 application which use setjmp/longjmp to
SIGSEGV. because in msvcrt, __NLG_Notify dereferences ebp+8 which is
*(((void*)jmp_buf[0])+2) which msvcrt assumes it's correct address(maybe first
parameter of caller function), and which it assumes is wrong for now.



More information about the Gcc-bugs mailing list