]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Handle UD2 a bit better. This change causes Vex to decode UD2 like
authorJulian Seward <jseward@acm.org>
Sat, 14 Jul 2012 14:31:17 +0000 (14:31 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 14 Jul 2012 14:31:17 +0000 (14:31 +0000)
any other instruction -- so it doesn't complain -- but Valgrind still
complains when synthesising the SIGILL for the guest.  Marginally less
confusing than it was before.

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

VEX/priv/guest_amd64_toIR.c

index f290a17d45bbf512c66f173f6de39a549305cfc8..56a0249e2b48f36619fc303ac5d8d03c1a6e14f0 100644 (file)
@@ -19653,6 +19653,13 @@ Long dis_ESC_0F (
       DIP("syscall\n");
       return delta;
 
+   case 0x0B: /* UD2 */
+      stmt( IRStmt_Put( OFFB_RIP, mkU64(guest_RIP_curr_instr) ) );
+      jmp_lit(dres, Ijk_NoDecode, guest_RIP_curr_instr);
+      vassert(dres->whatNext == Dis_StopHere);
+      DIP("ud2\n");
+      return delta;
+
    case 0x1F:
       if (haveF2orF3(pfx)) goto decode_failure;
       modrm = getUChar(delta);