]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390x: Fix definedness of syscall return value register
authorAndreas Arnez <arnez@linux.ibm.com>
Wed, 13 Mar 2024 16:47:59 +0000 (17:47 +0100)
committerAndreas Arnez <arnez@linux.ibm.com>
Wed, 13 Mar 2024 17:22:20 +0000 (18:22 +0100)
The memcheck test case for the close_range syscall showed that Valgrind on
s390x doesn't correctly set the definedness of the return value register
after having invoked a system call.  Fix this.

coregrind/m_syswrap/syswrap-main.c

index 20d02c7fa5210b3234916bccb88a37ec914e6c41..eae3f8a6259c5bb16f1d77dcadb1b6764a4af0dc 100644 (file)
@@ -1562,6 +1562,8 @@ void putSyscallStatusIntoGuestState ( /*IN*/ ThreadId tid,
    } else {
       gst->guest_r2 = sr_Res(canonical->sres);
    }
+   VG_TRACK( post_reg_write, Vg_CoreSysCall, tid,
+             OFFSET_s390x_r2, sizeof(UWord) );
 
 #  elif defined(VGP_mips32_linux)
    VexGuestMIPS32State* gst = (VexGuestMIPS32State*)gst_vanilla;