summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/crt1.c
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/crt1.c')
-rw-r--r--winsup/mingw/crt1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/winsup/mingw/crt1.c b/winsup/mingw/crt1.c
index 780b75e5a..b9b2bd5b1 100644
--- a/winsup/mingw/crt1.c
+++ b/winsup/mingw/crt1.c
@@ -124,6 +124,25 @@ _gnu_exception_handler (EXCEPTION_POINTERS * exception_data)
}
break;
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
+ case EXCEPTION_PRIV_INSTRUCTION:
+ /* test if the user has set SIGILL */
+ old_handler = signal (SIGILL, SIG_DFL);
+ if (old_handler == SIG_IGN)
+ {
+ /* this is undefined if the signal was raised by anything other
+ than raise (). */
+ signal (SIGILL, SIG_IGN);
+ action = EXCEPTION_CONTINUE_EXECUTION;
+ }
+ else if (old_handler != SIG_DFL)
+ {
+ /* This means 'old' is a user defined function. Call it */
+ (*old_handler) (SIGILL);
+ action = EXCEPTION_CONTINUE_EXECUTION;
+ }
+ break;
+
case EXCEPTION_FLT_INVALID_OPERATION:
case EXCEPTION_FLT_DIVIDE_BY_ZERO:
case EXCEPTION_FLT_DENORMAL_OPERAND: