-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Stalker
does not ensure the life-time of the transformer passed to follow_me
.
#76
Comments
If the transformer isn't used in other contexts (?), the function could also take transformer by value, and store it in the stalker struct |
I am not sure that it is simpler to ensure that the transformer outlives the stalker instance. Personally, I feel that |
Also, does this line take a double-reference to the
I had a few problems when I copied the approach for the
|
Probably the function should just take a mut ptr directly(?) |
Ensure that the transformer (and optionally event sink) live for at least as long as the stalker by keeping a mutable reference to them in a StalkerSession. Fixes: frida#76
Is this issue closed? |
I'm not sure. Looks like the PR which mentioned it above was closed and not merged? |
do you mind taking a peek at the code to see if the issue has been fixed? |
Do you feel like taking a stab at a PR to fix them? |
The transformer provided to
Stalker.follow_me
should remain in scope until the correspondingunfollow_me
is called. It does not appear that this life-time constraint is described by the wrapper class here...frida-rust/frida-gum/src/stalker.rs
Line 162 in c93bd23
Perhaps the
follow_me
function should return a handle which callsunfollow_me
when it falls out of scope and itsDrop
is called and whose lifetime is tied to the providedtransformer
? Or perhaps it is just simpler to ensure that thetransformer
outlives the stalker instance?Its probably worth checking for other instances of the same issue elsewhere as I may have done the same for the observer stuff I was working on?
The text was updated successfully, but these errors were encountered: