From: Florian Krohm Date: Thu, 20 Oct 2011 21:15:55 +0000 (+0000) Subject: Fix timerfd-syscall testcase on s390x. X-Git-Tag: svn/VALGRIND_3_7_0^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ebf7928736d3ff9160386fea27d1fd135fbe0db;p=thirdparty%2Fvalgrind.git Fix timerfd-syscall testcase on s390x. 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 --- diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 9ce453e405..ec898601e5 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -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;