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

static DR re-attach extension support #3065

Open
derekbruening opened this issue Jun 22, 2018 · 2 comments
Open

static DR re-attach extension support #3065

derekbruening opened this issue Jun 22, 2018 · 2 comments

Comments

@derekbruening
Copy link
Contributor

Split from #2157

Pasting from PR #3049:

This brings up two thoughts:

  1. For large data structures zeroing at exit is costly when there's no chance or re-attach: which is all of the time for regular non-static DR. Inside DR we only zero for doing_detach. We may want to export that for extensions.

  2. We should add a re-attach test for drwrap.

Louis-Ye added a commit to Louis-Ye/dynamorio that referenced this issue Jun 22, 2018
derekbruening pushed a commit that referenced this issue Jun 22, 2018
This commit is the supplement for PR #3050.
We also need to clean postcall_cache on drwrap_exit, otherwise
post_callback will not be invoked at re-attach. This is because the registration
of post_callback relies on pre_callback, and the pre_callback checks postcall_cache
before registering the post_callback. The stale data in postcall_cache prevents
post_callback being registered to the hash table.

Issue: #3065, #2157 
Fixes #3049
@Louis-Ye
Copy link
Contributor

Louis-Ye commented Jun 23, 2018

Report another potential re-attach problem:
droption_t with DROPTION_FLAG_ACCUMULATE flag set.
Such an option will re-append the same argument at re-attach, which is probably not as expected. Example: the -record_function in #3057 will show the value twice for the same function at re-attach, and id detection will raise alarm for it, which causes crash(instead of crash, the latest #3057 only notifies user about the duplicated value and skips)

@Carrotman42
Copy link
Contributor

The reattach + ACCUMULATE issue is filed under #2661

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

No branches or pull requests

3 participants