Skip to content

Commit 4b58af1

Browse files
committed
fix(x86): 'hlt' propagates noret
1 parent 06e5998 commit 4b58af1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

x86/plugin.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ static void x86_decode(RDContext* ctx, RDInstruction* instr,
276276
switch(zinstr.mnemonic) {
277277
case ZYDIS_MNEMONIC_HLT:
278278
case ZYDIS_MNEMONIC_INT3:
279+
instr->no_ret = true;
280+
instr->flow = RD_IF_STOP;
281+
break;
282+
279283
case ZYDIS_MNEMONIC_RET:
280284
case ZYDIS_MNEMONIC_IRET: instr->flow = RD_IF_STOP; break;
281285

0 commit comments

Comments
 (0)