From: Tom Hughes Date: Thu, 26 Aug 2004 23:09:26 +0000 (+0000) Subject: When delivering SIGFPE make sure we patch up si_addr in any siginfo X-Git-Tag: svn/VALGRIND_2_2_0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cec8a36cc7e58413563f720a358c8c0ca4a2f9b;p=thirdparty%2Fvalgrind.git When delivering SIGFPE make sure we patch up si_addr in any siginfo structure to match the address of the instruction in the client program which caused the fault. CCMAIL: 88115-done@bugs.kde.org git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2623 --- diff --git a/coregrind/vg_signals.c b/coregrind/vg_signals.c index 683b93adf3..41c2b89b8e 100644 --- a/coregrind/vg_signals.c +++ b/coregrind/vg_signals.c @@ -1024,6 +1024,9 @@ void vg_push_signal_frame ( ThreadId tid, const vki_ksiginfo_t *siginfo ) VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal handler frame (siginfo)", (Addr)&frame->sigInfo, sizeof(frame->sigInfo) ); VG_(memcpy)(&frame->sigInfo, siginfo, sizeof(vki_ksiginfo_t)); + if (sigNo == VKI_SIGFPE) { + frame->sigInfo._sifields._sigfault._addr = (void *)tst->m_eip; + } VG_TRACK( post_mem_write, (Addr)&frame->sigInfo, sizeof(frame->sigInfo) ); VG_TRACK( pre_mem_write, Vg_CoreSignal, tid, "signal handler frame (siginfo)",