Merge pull request #1504 from madrang/SafeHandle.SetInvalidRelease
[mono.git] / mono / mini / exceptions-amd64.c
index b8cfe9ad463265a03875569e72534542ce1cb2e4..5df8f2f1805006be4409e4ffa652e744e8272200 100644 (file)
 #include <config.h>
 
 #include <glib.h>
-#include <signal.h>
 #include <string.h>
 
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
 #ifdef HAVE_UCONTEXT_H
 #include <ucontext.h>
 #endif
@@ -55,7 +57,7 @@ static LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
        }
 #endif
 
-       mono_handle_native_sigsegv (SIGSEGV, NULL);
+       mono_handle_native_sigsegv (SIGSEGV, NULL, NULL);
 
        return EXCEPTION_CONTINUE_SEARCH;
 }
@@ -834,7 +836,7 @@ altstack_handle_and_restore (MonoContext *ctx, gpointer obj, gboolean stack_ovf)
 }
 
 void
-mono_arch_handle_altstack_exception (void *sigctx, gpointer fault_addr, gboolean stack_ovf)
+mono_arch_handle_altstack_exception (void *sigctx, MONO_SIG_HANDLER_INFO_TYPE *siginfo, gpointer fault_addr, gboolean stack_ovf)
 {
 #if defined(MONO_ARCH_USE_SIGACTION)
        MonoException *exc = NULL;
@@ -846,7 +848,7 @@ mono_arch_handle_altstack_exception (void *sigctx, gpointer fault_addr, gboolean
        if (stack_ovf)
                exc = mono_domain_get ()->stack_overflow_ex;
        if (!ji)
-               mono_handle_native_sigsegv (SIGSEGV, sigctx);
+               mono_handle_native_sigsegv (SIGSEGV, sigctx, siginfo);
 
        /* setup a call frame on the real stack so that control is returned there
         * and exception handling can continue.