Closed AnduinBrian closed 11 months ago
Hey,
Probably because the idiv
instruction raised an exception. processing
can return these following exception enums:
EXCEPTION.NO_FAULT
: No fault, execution succeed.EXCEPTION.FAULT_DE
: Fault raised: Divide-by-zero.EXCEPTION.FAULT_BP
: Fault raised: Breakpoint.EXCEPTION.FAULT_UD
: Fault raised: Instruction not supported.EXCEPTION.FAULT_GP
: Fault raised: General Protection Fault.Maybe you got EXCEPTION.FAULT_DE
. In this case, the program counter is not incremented and you loop on the same instruction.
Two solutions:
1) If you got an exception, just ignore it and increment the program counter yourself. (e.g ip = inst.getNextAddress()
)
2) define an initial context that will not raise a div by zero exception.
maybe div by zero. I think so
Hello, im writing a script to detect opaque predicate. I use this sample and script but dont recieved anything. When i try to write it myself, i notice i was stucked at the idiv instruction. Here is a detail look: In IDA, i got this block:![image](https://github.com/JonathanSalwan/Triton/assets/36282595/20f4e109-a6e8-4f85-b617-f19c2c030f88)
My script will process every instruction in this block and print out instruction Disassembly. But the result i got show me that my script wont pass through the idiv, it just stay there:![image](https://github.com/JonathanSalwan/Triton/assets/36282595/3f8c3e4a-9c99-40bb-8ce9-adc1e49ace3a)
my script:
Why is this happend and how can i fix this. Thanks Best Regards,