From: Tom Hughes Date: Thu, 29 Oct 2009 14:03:02 +0000 (+0000) Subject: If a signal arrives when a thread which has just finished executing a X-Git-Tag: svn/VALGRIND_3_6_0~488 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=239f21d07eea3cf530dd119fa6730929d30578cc;p=thirdparty%2Fvalgrind.git 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. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10921 --- diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c index 4cc9011991..b1baaef082 100644 --- a/coregrind/m_syswrap/syswrap-main.c +++ b/coregrind/m_syswrap/syswrap-main.c @@ -2058,6 +2058,8 @@ VG_(fixup_guest_state_after_syscall_interrupted)( ThreadId tid, 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); }