News for hackers. Stuff that matters.
Re:Things you can’t do in Rust (and what to do instead) by sk1459 on Saturday May 15, 2021 @08:46PM (#27170265)
>impossible to write code containing a data race

https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=Rust+data+r...

Re:Things you can’t do in Rust (and what to do instead) by andrewaylett on Monday May 17, 2021 @07:42AM (#27182362)
OK, I'll grant I should have added scare quotes to "impossible".

A quick check suggests that (as would be expected) they're caused by `unsafe` blocks. Specifically, by the developer claiming that a value was safe to send to a different thread while it actually wasn't. One thing to note is that these bugs neutralised the compiler's validation is these specific cases -- allowing, rather than causing, races. Using unsafe means the developer needs to ensure they maintain the invariants themselves within the unsafe block, while in C++ one has to maintain these invariants in _all_ code.