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#2157 re-attach: add best-effort re-attach support #2182

Merged
merged 1 commit into from
Feb 14, 2017

Conversation

derekbruening
Copy link
Contributor

While there are many globals that are not reset, we take a best-effort
approach here and reset the ones that matter, allowing us to re-attach with
a memtrace client and static DR.

Portions of this were initially based on
https://codereview.appspot.com/13314047/ from Peter Goodman.

For DO_ONCE, an incremented counter is used.

For numerous other globals, at exit time if doing_detach is set we reset
them to NULL.

For locks, we simply reset count_times_acquired but leave the deleted field
as it does not matter much (part of the whole theme here: this may never be
rock-solid for unusual option combinations but our goal is supporting the
common case).

For drreg, with the new multi-init feature we have to zero the options at
exit time.

Adds several tests by adding loops around existing start/stop tests, but
stops short on burst_threads until i#2175 is fixed.

Review-URL: https://codereview.appspot.com/318520043

While there are many globals that are not reset, we take a best-effort
approach here and reset the ones that matter, allowing us to re-attach with
a memtrace client and static DR.

Portions of this were initially based on
https://codereview.appspot.com/13314047/ from Peter Goodman.

For DO_ONCE, an incremented counter is used.

For numerous other globals, at exit time if doing_detach is set we reset
them to NULL.

For locks, we simply reset count_times_acquired but leave the deleted field
as it does not matter much (part of the whole theme here: this may never be
rock-solid for unusual option combinations but our goal is supporting the
common case).

For drreg, with the new multi-init feature we have to zero the options at
exit time.

Adds several tests by adding loops around existing start/stop tests, but
stops short on burst_threads until i#2175 is fixed.

Review-URL: https://codereview.appspot.com/318520043
@derekbruening
Copy link
Contributor Author

The failure is i#2066 -- someone should really fix that...

@derekbruening derekbruening merged commit 3a8abd3 into master Feb 14, 2017
@derekbruening derekbruening deleted the i2157-reattach branch February 14, 2017 21:10
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.

1 participant