|
From: <sv...@va...> - 2009-10-29 14:03:20
|
Author: tom
Date: 2009-10-29 14:03:02 +0000 (Thu, 29 Oct 2009)
New Revision: 10921
Log:
If a signal arrives when a thread which has just finished executing a
system call is between the blksys_committed and blksys_finished markers
in the system call routine then the post handler for the system call
was failing to run.
This commit fixes that by ensuring that the syscall status is recovered
from the guest state before the post VG_(post_syscall) is called just
as VG_(client_syscall) would normally do when the assembly wrapper
returned. Without that VG_(post_syscall) will not do anything a it
will think the system call is still running.
Fixes #212267.
Modified:
trunk/coregrind/m_syswrap/syswrap-main.c
Modified: trunk/coregrind/m_syswrap/syswrap-main.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-main.c 2009-10-29 09:27:11 UTC (rev 10920)
+++ trunk/coregrind/m_syswrap/syswrap-main.c 2009-10-29 14:03:02 UTC (rev 10921)
@@ -2058,6 +2058,8 @@
if (VG_(clo_trace_signals))
VG_(message)( Vg_DebugMsg,
" completed and committed: nothing to do");
+ getSyscallStatusFromGuestState( &sci->status, &th_regs->vex );
+ vg_assert(sci->status.what == SsComplete);
VG_(post_syscall)(tid);
}
|