Skip to content

Move a non-leader exec's task when replay reaches its exec - #4164

Open
Keno wants to merge 1 commit into
rr-debugger:masterfrom
ChronitonAI:replay-exec-current-task
Open

Keno wants to merge 1 commit into
rr-debugger:masterfrom
ChronitonAI:replay-exec-current-task

Conversation

@Keno

@Keno Keno commented Nov 18, 2026

Copy link
Copy Markdown
Member

[Patch/test by AI. Part of the exec handling series]

When a thread other than the leader execs, its first frame under the leader's tid is the execve's exit. Replay moved its task to that tid only when it replayed that frame, so until then current_task() found no task: gdb continuing over such an exec made rr abort in require_timeline_current_task(), and rr replay -a -t stepping across it crashed. Move the task when replay reads that frame.

Test: continue_exec_from_other_thread.

When a thread other than the leader execs, its first frame under the
leader's tid is the execve's exit. Replay moved its task to that tid
only when it replayed that frame, so until then current_task() found
no task: gdb continuing over such an exec made rr abort in
require_timeline_current_task(), and `rr replay -a -t` stepping across
it crashed. Move the task when replay reads that frame.

Test: continue_exec_from_other_thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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