Closed archercreat closed 2 years ago
Do you think it's doable to create a minimalist PoC that can reproduce the crash?
The problem is we're using std::stoi (string->int32) to convert the string addresses from an instructions disassembly but they can be larger than 32-bit. You probably just want to replace this with std::stoull, but ideally you should have a reference to the Instruction corresponding to a SymbolicExpression instead of only the disassembly. I'm guessing it's not that simple because the lifetime of an Instruction object seems to be managed by the user.
Indeed, stoull fixes the issue, thanks!
Calling
stoi
on0x140010eba: push -0x171ed
crashes tritonAlso I'm not sure if this is really necessary: https://github.com/JonathanSalwan/Triton/blob/005accc4f3dbbba49797f9c35bc837c533fbb6cd/src/libtriton/arch/basicBlock.cpp#L44
Although by definition basic block is a set of instruction without any branches, in real world basic blocks can be obfuscated with conditional/unconditional branches (e.g. in vmprotect, themida, etc) and it would be more useful if we could merge those blocks in one block. Right now I've solved this issue by just directly inserting instructions into the basic block: