Skip to content

feat: magic in headers; proper atomic sync#53

Merged
OliverNChalk merged 5 commits intomainfrom
feat/add-magic-to-headers
Mar 9, 2026
Merged

feat: magic in headers; proper atomic sync#53
OliverNChalk merged 5 commits intomainfrom
feat/add-magic-to-headers

Conversation

@OliverNChalk
Copy link
Contributor

@OliverNChalk OliverNChalk commented Mar 9, 2026

Problem

  • It's possible to try to join an SPSC queue file as an MPMC queue participant and vice versa. This will lead to the bytes being interpreted incorrectly - likely leading to panics or UB.

Solution

  • Similar to rts-alloc, let's store a 64 bit magic value in the headers. We also update the code to write this value last as an atomic commit of the header.

@OliverNChalk OliverNChalk reopened this Mar 9, 2026
@OliverNChalk OliverNChalk requested a review from apfitzge March 9, 2026 16:01
apfitzge
apfitzge previously approved these changes Mar 9, 2026
@OliverNChalk OliverNChalk merged commit 49499ea into main Mar 9, 2026
2 checks passed
@OliverNChalk OliverNChalk deleted the feat/add-magic-to-headers branch March 9, 2026 17:02
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