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

Can't configure ptrace in non-main thread #3929

Open
Tracked by #3930
theIDinside opened this issue Mar 4, 2025 · 0 comments
Open
Tracked by #3930

Can't configure ptrace in non-main thread #3929

theIDinside opened this issue Mar 4, 2025 · 0 comments

Comments

@theIDinside
Copy link
Contributor

Using ptrace from another thread than the main thread, even if that thread is the one that does a fork + exec dance, will fail on PTRACE_SETOPTIONS call.

This behavior can be witnessed in the moved-main.cpp file in the rr-waitpid-bug repo.

Just building it with ./build.sh and then running it with

# this will work just fine
./tracer-moved-main

# this will fail by having ptrace setoptions fail
rr record ./tracer-moved-main
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

1 participant