diff options
author | Eric Blake <eblake@redhat.com> | 2009-07-23 06:47:17 +0400 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2009-07-23 06:47:17 +0400 |
commit | 3f6f9155c9385702dce1d4011759d1ff4aa602fd (patch) | |
tree | 0a98c67a64b4018facfb37c7f34777148d3d6d78 /winsup/cygwin/exceptions.cc | |
parent | d974d420d494228ea759e08013805888c5f13ac0 (diff) |
* exceptions.cc (handle_exceptions): Set si_addr according to
POSIX for SIGSEGV.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 76632854b..df0248947 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -686,7 +686,9 @@ _cygtls::handle_exceptions (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT me.signal_exit (0x80 | si.si_signo); // Flag signal + core dump } - si.si_addr = (void *) in->Eip; + si.si_addr = (si.si_signo == SIGSEGV || si.si_signo == SIGBUS + ? (void *) e->ExceptionInformation[1] + : (void *) in->Eip); si.si_errno = si.si_pid = si.si_uid = 0; me.incyg++; sig_send (NULL, si, &me); // Signal myself |