Skip to content

Correct soundness hole, add Sync bound#800

Merged
frankmcsherry merged 1 commit into
TimelyDataflow:masterfrom
frankmcsherry:bytes_soundness
May 28, 2026
Merged

Correct soundness hole, add Sync bound#800
frankmcsherry merged 1 commit into
TimelyDataflow:masterfrom
frankmcsherry:bytes_soundness

Conversation

@frankmcsherry
Copy link
Copy Markdown
Member

Bytes had a soundness hole, that you could construct BytesMut with a B: !Send, then convert to a Bytes and send it around (the B type has been erased by this point). The fix is to insist on B: Send in the constructor for BytesMut, which is the only way to form one of these.

At the same time, add a Sync implementation (Claude is quite sure that B: Sync is not necessary; the doccomment explains the reasoning; bit of a risk if anyone adds methods that allow access to &B but .. no plans to do this).

@frankmcsherry frankmcsherry merged commit bcc74cb into TimelyDataflow:master May 28, 2026
9 checks passed
@github-actions github-actions Bot mentioned this pull request May 28, 2026
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