11 year old unsoundness bugs found in Rust borrow checker
Related Stories
An hour of audio transcribed in about 13s on MacBook Air
Hacker News
1 hour ago
Show HN: Use your OpenAI subscription to create audiobooks
Hacker News
2 hours ago
CFTC Staff Were Told to Retract Analysis of Suspicious Oil Trades
Hacker News
2 hours ago
Were Software Engineers blue-collar workers all along?
Hacker News
3 hours ago
The Art of Dithering and Retro Shading for the Web
Hacker News
3 hours ago
Activity
theemathas commentedon Oct 13, 2026
The core of the unsoundness:
rustbot commentedon Oct 13, 2026
theemathas commentedon Oct 13, 2026
My version of the code has been compiling ever since 1.18.0 (2017)
How on earth was this not found before this???
theemathas commentedon Oct 13, 2026
Possibly related: #128225
lcnr commentedon Oct 13, 2026
without relying on a
staticlcnr commentedon Oct 13, 2026
unsound since 1.4 🤣 https://rust.godbolt.org/z/j1s1TevhP
rustbot commentedon Oct 13, 2026
Assigning P-high (discussion on Zulip).
theemathas commentedon Oct 13, 2026
maxdexh commentedon Oct 13, 2026
Another version that segfaults/prints freed memory since 1.4
[-]struct's `T: 'static` bound bypassed via covariant field assignment[/-][+]struct's lifetime requirements can be bypassed via covariant field assignment[/+]theemathas commentedon Oct 13, 2026
Another version, cuz why not. I think this version is probably the easiest to understand.
maxdexh commentedon Oct 13, 2026
I think unification just generally doesn't check lifetime bounds of the type. Example with regular unification, without field assignment: