Skip to content

Fix repeat receiver lifetime after cleanup - #2187

Merged
ericniebler merged 3 commits into
NVIDIA:mainfrom
fallintoplace:fix/repeat-receiver-lifetime
Aug 11, 2026
Merged

Fix repeat receiver lifetime after cleanup#2187
ericniebler merged 3 commits into
NVIDIA:mainfrom
fallintoplace:fix/repeat-receiver-lifetime

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

  • save the parent operation-state pointer before cleaning up the child operation
  • use the saved pointer for downstream completion in repeat_n and repeat_until
  • add regression coverage for value, error, and stopped completions

Why

Cleanup resets the child operation, which owns the repeat receiver that is currently completing. Reading __state_ from that receiver after cleanup accesses an object whose lifetime has ended.

Testing

  • full test.exec suite: 3,326 assertions across 328 test cases
  • focused [repeat_n] and [repeat_until] test groups
  • focused test groups with -fno-exceptions

@copy-pr-bot

copy-pr-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ericniebler ericniebler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test 3e3af77

@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test bc767f6

@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test fd72a80

@ericniebler
ericniebler merged commit b237a61 into NVIDIA:main Aug 11, 2026
38 checks passed
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.

2 participants