* [patch libgcc]: Fix PR target/55445 Always defined __SEH__ when build from trunk
@ 2012-11-25 15:39 Kai Tietz
2012-11-28 18:01 ` Kai Tietz
0 siblings, 1 reply; 3+ messages in thread
From: Kai Tietz @ 2012-11-25 15:39 UTC (permalink / raw)
To: GCC Patches
Hi,
the issue here is that the predefined macro __SEH__ does just indicate
that SEH-infrastructure is present. It doesn't mean that SEH is used
as exception-mechansim. Therefore the checks in libgcc's (and as
followup in libstdc++'s) eh exception-mechansim for SEH were not
regarding that there might SjLj enabled instead.
ChangeLog
2012-11-25 Kai Tietz
PR target/55445
* unwind-c (__SEH__): Make sure SjLj isn't
active.
* unwind-generic.h: Likewise.
* unwind-seh.c: Likewise.
Tested for multilib i686-w64-mingw32, and x86_64-w64-mingw32. Ok for apply?
Regards,
Kai
Index: unwind-c.c
===================================================================
--- unwind-c.c (Revision 193669)
+++ unwind-c.c (Arbeitskopie)
@@ -109,7 +109,7 @@
struct _Unwind_Exception * ue_header,
struct _Unwind_Context * context)
#else
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
static
#endif
_Unwind_Reason_Code
@@ -233,7 +233,7 @@
return _URC_INSTALL_CONTEXT;
}
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
EXCEPTION_DISPOSITION
__gcc_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame,
PCONTEXT ms_orig_context, PDISPATCHER_CONTEXT ms_disp)
Index: unwind-generic.h
===================================================================
--- unwind-generic.h (Revision 193669)
+++ unwind-generic.h (Arbeitskopie)
@@ -28,7 +28,7 @@
#ifndef _UNWIND_H
#define _UNWIND_H
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
/* Only for _GCC_specific_handler. */
#include <windows.h>
#endif
@@ -275,7 +275,7 @@
# error "What type shall we use for _sleb128_t?"
#endif
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
/* Handles the mapping from SEH to GCC interfaces. */
EXCEPTION_DISPOSITION _GCC_specific_handler (PEXCEPTION_RECORD, void *,
PCONTEXT, PDISPATCHER_CONTEXT,
Index: unwind-seh.c
===================================================================
--- unwind-seh.c (Revision 193669)
+++ unwind-seh.c (Arbeitskopie)
@@ -28,7 +28,7 @@
#include "tm.h"
#include "unwind.h"
-#ifdef __SEH__
+#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
/* At the moment everything is written for x64, but in theory this could
also be used for i386, arm, mips and other extant embedded Windows. */
@@ -480,4 +480,4 @@
return _URC_END_OF_STACK;
#endif
}
-#endif /* __SEH__ */
+#endif /* __SEH__ && !defined (__USING_SJLJ_EXCEPTIONS__) */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch libgcc]: Fix PR target/55445 Always defined __SEH__ when build from trunk
2012-11-25 15:39 [patch libgcc]: Fix PR target/55445 Always defined __SEH__ when build from trunk Kai Tietz
@ 2012-11-28 18:01 ` Kai Tietz
2012-11-28 18:31 ` Richard Henderson
0 siblings, 1 reply; 3+ messages in thread
From: Kai Tietz @ 2012-11-28 18:01 UTC (permalink / raw)
To: GCC Patches; +Cc: Richard Henderson
Ping
2012/11/25 Kai Tietz <ktietz70@googlemail.com>:
> Hi,
>
> the issue here is that the predefined macro __SEH__ does just indicate
> that SEH-infrastructure is present. It doesn't mean that SEH is used
> as exception-mechansim. Therefore the checks in libgcc's (and as
> followup in libstdc++'s) eh exception-mechansim for SEH were not
> regarding that there might SjLj enabled instead.
>
> ChangeLog
>
> 2012-11-25 Kai Tietz
>
> PR target/55445
> * unwind-c (__SEH__): Make sure SjLj isn't
> active.
> * unwind-generic.h: Likewise.
> * unwind-seh.c: Likewise.
>
> Tested for multilib i686-w64-mingw32, and x86_64-w64-mingw32. Ok for apply?
>
> Regards,
> Kai
>
> Index: unwind-c.c
> ===================================================================
> --- unwind-c.c (Revision 193669)
> +++ unwind-c.c (Arbeitskopie)
> @@ -109,7 +109,7 @@
> struct _Unwind_Exception * ue_header,
> struct _Unwind_Context * context)
> #else
> -#ifdef __SEH__
> +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
> static
> #endif
> _Unwind_Reason_Code
> @@ -233,7 +233,7 @@
> return _URC_INSTALL_CONTEXT;
> }
>
> -#ifdef __SEH__
> +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
> EXCEPTION_DISPOSITION
> __gcc_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame,
> PCONTEXT ms_orig_context, PDISPATCHER_CONTEXT ms_disp)
> Index: unwind-generic.h
> ===================================================================
> --- unwind-generic.h (Revision 193669)
> +++ unwind-generic.h (Arbeitskopie)
> @@ -28,7 +28,7 @@
> #ifndef _UNWIND_H
> #define _UNWIND_H
>
> -#ifdef __SEH__
> +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
> /* Only for _GCC_specific_handler. */
> #include <windows.h>
> #endif
> @@ -275,7 +275,7 @@
> # error "What type shall we use for _sleb128_t?"
> #endif
>
> -#ifdef __SEH__
> +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
> /* Handles the mapping from SEH to GCC interfaces. */
> EXCEPTION_DISPOSITION _GCC_specific_handler (PEXCEPTION_RECORD, void *,
> PCONTEXT, PDISPATCHER_CONTEXT,
> Index: unwind-seh.c
> ===================================================================
> --- unwind-seh.c (Revision 193669)
> +++ unwind-seh.c (Arbeitskopie)
> @@ -28,7 +28,7 @@
> #include "tm.h"
> #include "unwind.h"
>
> -#ifdef __SEH__
> +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__)
>
> /* At the moment everything is written for x64, but in theory this could
> also be used for i386, arm, mips and other extant embedded Windows. */
> @@ -480,4 +480,4 @@
> return _URC_END_OF_STACK;
> #endif
> }
> -#endif /* __SEH__ */
> +#endif /* __SEH__ && !defined (__USING_SJLJ_EXCEPTIONS__) */
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-28 18:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-25 15:39 [patch libgcc]: Fix PR target/55445 Always defined __SEH__ when build from trunk Kai Tietz
2012-11-28 18:01 ` Kai Tietz
2012-11-28 18:31 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).