viv-utils
viv-utils copied to clipboard
Emulation hook / avoid_calls
Via @upside2
I think there's a problem in viv_utils even with my alloca_probe fix. The test for [vivisect] PR #515 gets to https://github.com/williballenthin/viv-utils/blob/e6e372c51221ca3e6d2858d62d8be80ba00029b7/viv_utils/emulator_drivers.py#L293 where executeOpcode() correctly steps into the function (alloca_probe) at 0x10001220. handle_hook is True (with alloca_probe hooking). viv_utils therefore raises StopEmulation at line 307. I think it needs logic for avoid_calls like in the following elif block, because it has stepped into alloca_probe with avoid_calls=False.