From 60f10c64aa57d613471446ea3ec1b3ce6d3b9500 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 7 Jul 2015 20:45:06 +0200 Subject: x86_64: Handle myfault exceptions when running on alternate signal stack x86_64 only: * cygtls.cc (san::leave): Restore _my_tls.andreas. * cygtls.h (class san): Add _clemente as in 32 bit case. Add ret and frame members. (san::san): Handle _my_tls.andreas as on 32 bit. Take parameter and write it to new member ret. Store current stack pointer in frame. (san::~san): New destructor to restore _my_tls.andreas. (__try): Use __l_except address as parameter to san::san. * dcrt0.cc (dll_crt0_0): Add myfault_altstack_handler as vectored continuation handler. * exception.h (myfault_altstack_handler): Declare. * exceptions.cc (myfault_altstack_handler): New function. Explain what it's good for. Signed-off-by: Corinna Vinschen --- winsup/cygwin/exception.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'winsup/cygwin/exception.h') diff --git a/winsup/cygwin/exception.h b/winsup/cygwin/exception.h index 0478daf79..13160feb8 100644 --- a/winsup/cygwin/exception.h +++ b/winsup/cygwin/exception.h @@ -160,6 +160,8 @@ public: } }; +LONG CALLBACK myfault_altstack_handler (EXCEPTION_POINTERS *); + #endif /* !__x86_64__ */ class cygwin_exception -- cgit v1.2.3