-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
X86_64 code behaves differnt execute single stepped compared to just let it run #999
Comments
I was able to pinpoint the problem and create a test for it. const uint8_t Code[] = { const uint64_t ADDR_CODE = 0x1000; int main(void) {
} |
The problem seems to be related to the injected code by check_exit_request. |
i tested the code with FreePascal on Mac OS and there's a problem with "shl" on single step i try to trace the problem , but failed 😕 @aquynh i think you need to look into this i tested it with i set CF to 1 before the Execution just runcode --- PC is 0x100000 - Flag CF : 1 ================================== Single Stepcode --- PC is 0x100000 - Flag CF : 1 but when i remove 0x0 : $C1 ,$E6 ,$12 , // shl esi, 12h` and set CF manually it run as expected in both "just run" & "single step" 0x0 : $0F ,$82 ,$01 ,$00 ,$00 ,$00 // jb 0000000A CF = 1just runcode --- PC is 0x100000 - Flag CF : 1 ================================== Single Stepcode --- PC is 0x100000 - Flag CF : 1 CF = 0just runcode --- PC is 0x100000 - Flag CF : 0 ================================== Single Stepcode --- PC is 0x100000 - Flag CF : 0 |
@aquynh |
When I single step the x86_64 code with:
uc_emu_start(uc, CurrentVA, -1, 0, 1);
then the code flow is correct.
But when I execute the code with with:
uc_emu_start(uc, CurrentVA, -1, 0, 0);
The code will take a wrong branch and the application will crash.
So far I don't have a test case because its a big application but maybe someone knows the reason and how to avoid the bug.
Thanks
The text was updated successfully, but these errors were encountered: