]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
If a signal arrives when a thread which has just finished executing a
authorTom Hughes <tom@compton.nu>
Thu, 29 Oct 2009 14:03:02 +0000 (14:03 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 29 Oct 2009 14:03:02 +0000 (14:03 +0000)
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

coregrind/m_syswrap/syswrap-main.c

index 4cc90119915da8a9d91d4e0915199e147730c412..b1baaef08255284c25aa15eade67702097d1ffbe 100644 (file)
@@ -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);
    }