]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix timerfd-syscall testcase on s390x.
authorFlorian Krohm <florian@eich-krohm.de>
Thu, 20 Oct 2011 21:15:55 +0000 (21:15 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Thu, 20 Oct 2011 21:15:55 +0000 (21:15 +0000)
This was caused by an interaction of resteering and the infamous
EX insn. This sequence

j  someplace
ex ....

with the unconditional jump being subject to restering caused madness.
Such a sequence is found in glibc's syscall.S with the effect that all
system calls > 255 would have run into the same problem as timerfd_*.

Patch by Christian Borntraeger (borntraeger@de.ibm.com).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2222

VEX/priv/guest_s390_toIR.c

index 9ce453e405e35f0a73907b5ba58faad415ab8114..ec898601e5846d2d87c85324a0aafe94a94e1f67 100644 (file)
@@ -13209,7 +13209,8 @@ s390_decode_and_irgen(UChar *bytes, UInt insn_length, DisResult *dres)
       }
    }
    /* If next instruction is execute, stop here */
-   if (irsb->next == NULL && bytes[insn_length] == 0x44) {
+   if (irsb->next == NULL && dis_res->whatNext == Dis_Continue
+       && bytes[insn_length] == 0x44) {
       irsb->next = IRExpr_Const(IRConst_U64(guest_IA_next_instr));
       dis_res->whatNext = Dis_StopHere;
       dis_res->continueAt = 0;