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

Ignore BX_INSERTED_OPCODE in BeforeExecutionHook #58

Merged
merged 13 commits into from
Dec 20, 2021
Merged

Conversation

0vercl0k
Copy link
Owner

@0vercl0k 0vercl0k commented Dec 20, 2021

This PR fixes the issue that happened in #45 - basically bx inserts a 'special' instruction (w/o changing its address) which gets treated like a normal instruction and so the before_execution hook gets invoked on it as well but right after, another before_execution gets dispatched on the 'real' instruction. This triggered RIP traces to generate traces that looked like:

0x7ffbd6641ff9
0x7ffbd6641ff9
0x7ffbd6642001
0x7ffbd6642001

Instead of:

0x7ffbd6641ff9
0x7ffbd6642001

This behavior also meant that it triggered the code that generates the Tenet deltas to generate an empty line which the Tenet plugin doesn't like :).

On top of the above the PR does a few other things:

  • Fix a bug in Tenet where state wasn't reset in between runs,
  • Fix a bug in Tenet where the last delta could be empty which generated two empty lines at the end of the file,
  • Rename ShowRegisters to PrintRegisters, updated the bx dependencies to the 2.7 version, CI uses clang13, added Backend::Rsi/Backend::Rdi, remove the virtual keyword from the hook functions in the bxcpu backend.

@0vercl0k 0vercl0k merged commit ef02342 into main Dec 20, 2021
@0vercl0k 0vercl0k deleted the fbl_tenet_fix branch December 20, 2021 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant