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

i#2144: better patch for single step with sandboxing #2586

Merged
merged 4 commits into from
Aug 2, 2017

Conversation

Simorfo
Copy link
Contributor

@Simorfo Simorfo commented Aug 1, 2017

Last patch worked fine for single step execution in normal mode.
But it does not work when dynamorio uses at the same time sandboxing.
Because sandboxing and single step both use special exit, there was a confusion.

When a basic block is built, sandboxing is inserted before mangling, which is used to modify special exit reason.
But, sandboxing adds another cti (not a meta app) in case there was a self-modification in the basic block.

So, this patch checks that only the last app instruction at single step address will be mangled

dcontext->single_step_addr = NULL;
instr_t * last_addr = instr_get_next_app(instr);
/* Checks if sandboxing added another app instruction. */
if (!last_addr || last_addr->translation != instr->translation) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: last_addr == NULL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@derekbruening
Copy link
Contributor

Appveyor failure is drmgr-test #1369

@derekbruening derekbruening merged commit 0fa6094 into DynamoRIO:master Aug 2, 2017
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.

2 participants