-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
proc: adds pointer pinning to call injection #3787
Conversation
dc74e97
to
93bdc6d
Compare
93bdc6d
to
ebad15c
Compare
ebad15c
to
5cec6dc
Compare
There's a rare failure that seems to be happening with this changeset and windows, I want to investigate it before merging. |
1aa9e50
to
d91f58d
Compare
This commit adds a new mode to call injection. If the runtime.debugPinner function is available in the target executable it obtains a pinner by calling it and then uses it to pin the pointers in the results of call injection. This allows the code for call injection to be refactored to execute the calls in the normal order, since it doesn't need to be concerned with having space on the target's memory to store intermediate values. Updates go-delve#3310
d91f58d
to
f7b8acf
Compare
For the record: this issue was fixed. It was a preexisting issue exposed by this change where if we have to call injections happening simultaneously it's possible that when we resume execution of the target one of them will not make any progress (the other stops the process before the thread executing the first one is ever scheduled). When that happened we didn't notice and assumed that both had progressed. The solution is to check for thread.SoftExc() so that we only take into consideration threads for which we received a breakpoint exception. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit adds a new mode to call injection. If the runtime.debugPinner
function is available in the target executable it obtains a pinner by
calling it and then uses it to pin the pointers in the results of call
injection.
This allows the code for call injection to be refactored to execute the
calls in the normal order, since it doesn't need to be concerned with having
space on the target's memory to store intermediate values.
Updates #3310