From 617e673e9bd6d4d4d6bc68924e8528a81cca6f7b Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Wed, 3 Oct 2018 15:26:48 +0200 Subject: [PATCH] x86 front end: handle UD2 as an officially recognised, unimplemented instruction, like the amd64 front end does. n-i-bz. This doesn't change anything downstream -- a SIGILL is still raised -- but there's a bit less debug printing now. --- VEX/priv/guest_x86_toIR.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/VEX/priv/guest_x86_toIR.c b/VEX/priv/guest_x86_toIR.c index ad1f8d8385..2e3b80303e 100644 --- a/VEX/priv/guest_x86_toIR.c +++ b/VEX/priv/guest_x86_toIR.c @@ -15408,6 +15408,15 @@ DisResult disInstr_X86_WRK ( DIP("syscall\n"); break; + /* =-=-=-=-=-=-=-=-=-=- UD2 =-=-=-=-=-=-=-=-=-=-=-= */ + + case 0x0B: /* UD2 */ + stmt( IRStmt_Put( OFFB_EIP, mkU32(guest_EIP_curr_instr) ) ); + jmp_lit(&dres, Ijk_NoDecode, guest_EIP_curr_instr); + vassert(dres.whatNext == Dis_StopHere); + DIP("ud2\n"); + break; + /* =-=-=-=-=-=-=-=-=- unimp2 =-=-=-=-=-=-=-=-=-=-= */ default: -- 2.47.2