From fa35814af1fe24f596142c993f050f5eb0a74914 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 2 Jun 2013 09:11:09 +0000 Subject: [PATCH] * exceptions.cc (exception::handle): Resurrect accidentally lost patch from 2009-07-22: Set si_addr according to POSIX for SIGSEGV. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/exceptions.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index da887a61c..3d18cd50b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2013-06-02 Corinna Vinschen + + * exceptions.cc (exception::handle): Resurrect accidentally lost + patch from 2009-07-22: Set si_addr according to POSIX for SIGSEGV. + 2013-05-31 Corinna Vinschen * include/sys/socket.h: Move SHUT_xx definitoins from here... diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 31d84bd24..abb973528 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -753,7 +753,8 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void } cygwin_exception exc (framep, in, e); si.si_cyg = (void *) &exc; - si.si_addr = (void *) in->_GR(ip); + si.si_addr = (si.si_signo == SIGSEGV || si.si_signo == SIGBUS) + ? (void *) e->ExceptionInformation[1] : (void *) in->_GR(ip); me.incyg++; sig_send (NULL, si, &me); /* Signal myself */ me.incyg--;