Skip to content

New primitive - canary: defense against opstate destruction in start()#692

Merged
MaxMotovilov merged 1 commit into
facebookexperimental:mainfrom
MaxMotovilov:main
Apr 21, 2026
Merged

New primitive - canary: defense against opstate destruction in start()#692
MaxMotovilov merged 1 commit into
facebookexperimental:mainfrom
MaxMotovilov:main

Conversation

@MaxMotovilov

Copy link
Copy Markdown
Contributor

[AI-generated code: Claude 4.6 Opus]

Completion of a sender prior to completion of start() results in a dangling this. Lambda-based operation states are particularly hard to defend against this scenario. This is a solution based on an "entangled" pair of objects - one in opstate, the other in start()'s stack frame - that either gives an early warning or delays destruction with a spinlock.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 21, 2026
@MaxMotovilov
MaxMotovilov merged commit 8c5fa96 into facebookexperimental:main Apr 21, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant