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
This commit is contained in:
Tom Hughes 2004-08-26 23:09:26 +00:00
parent 22681c7c0a
commit 8cec8a36cc

View File

@ -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)",