Skip to content
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

Stepping sometimes misses instructions #2226

Open
eddwod opened this issue Oct 14, 2019 · 2 comments
Open

Stepping sometimes misses instructions #2226

eddwod opened this issue Oct 14, 2019 · 2 comments
Labels
bug The issue describes a bug. It does not mean the bug has been reproduced by a developer. try this This issue needs to be tried by a developer to see if more information is needed.

Comments

@eddwod
Copy link

eddwod commented Oct 14, 2019

  • Debugger version (Sep 1 2019 (tested back to 2018 though, only tested in x32dbg).
  • Operating system version and Service Pack (Tried many but for the sake of def reproducing en_windows_7_professional_x64_dvd_x15-65805.iso, no updates).
  • Descriptions (Stepping by holding F8 sometimes causes instructions to be missed/maybe execution of 0xcc?)
  • Elaborate reproduction steps for the bug/issue being reported.

This is tricky as it is unpredictable and easier to see in a vm, but I have seen it on a native Win10 x64 1903 host. I guess it is linked to performance which is why it can be tricky to repeat.

For a poc, I do a simple write 0x00-0xff to a buffer (stepped through holding F8) and then a check of the buffer via F9. The following gif (apologies if not clear, should show the loop and you can clearly see in some instances al isn't written to memory. This is an extreme example, sometimes it's a single byte and sometimes not at all. As a point, in this instance I have cleared the memory first but if memory contains a value and the bug happens it isn't overwritten. Poc is attached. If you want to repro please try and test this in a vm, hopefully if you give it a few goes it will repro.

As a side note, I haven't got this to repro using animate, but I can reach similar behaviour from an external app doing sendkeys in a loop, where I lower the delay between each key sent. In the latter instance I saw the debuggger try and execute the second byte of the 7 byte mov instruction.

Happy to try and help with any more details of course.

test

x32test.zip

@mrexodia mrexodia added bug The issue describes a bug. It does not mean the bug has been reproduced by a developer. try this This issue needs to be tried by a developer to see if more information is needed. labels Oct 20, 2019
@eddwod
Copy link
Author

eddwod commented Oct 29, 2019

OK, try this poc, Start x32dbg, Set a break so you can see the loop working like above. Then run this simple .net app. It will send an F8 every 100ms and this should work fine. Change it to send F8 every 50ms and on my native host it should show some corruption like documented above, i.e. will end up executing mid x86 instruction.
x64stepper.zip

@mrexodia
Copy link
Member

Potentially related to #1764

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue describes a bug. It does not mean the bug has been reproduced by a developer. try this This issue needs to be tried by a developer to see if more information is needed.
Projects
None yet
Development

No branches or pull requests

2 participants