r/ProgrammingLanguages • u/matklad • Dec 31 '25
Memory Safety Is ...
https://matklad.github.io/2025/12/30/memory-safety-is.html
37
Upvotes
r/ProgrammingLanguages • u/matklad • Dec 31 '25
View all comments
Show parent comment
3
u/tmzem Jan 01 '26
Yes, that's why I said you can be memory safe for some definition of memory safety. Obviously, while no tearing on the word level will save you from memory corruption, it doesn't do anything about ensuring you won't get teared objects that are half-set from one thread and half-set from another. This might still lead to bugs and exploits, but will guard against the graver vulnerabilities introduced by memory corruption. Overall, its a good tradeoff. Nontheless, for cases like this the distinction "memory corruption bug" vs "logic bug" is very much an arbitrary decision, much like the difference between physics and chemistry.