Hacker News new | ask | show | jobs
by preseinger 1478 days ago
Data races are violations of the memory model; of course any code which produces data races cannot be understood as memory safe?
2 comments

As far as I remember, some languages like Java are memory safe even if the code produces data races. That means you can't have a reference to a value supposed to be of type A being actually of type B.
That's part of what the Rust borrow checker does for you: tracking who owns what and enforcing single ownership makes data races that much harder to cause.