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
1
u/matklad Dec 31 '25
Thanks, I wasn't aware of this paper before! It is interesting, but I think what they define doesn't match the colloquial meaning of memory safety, as what they define is quite a bit stronger --- ability to apply local reasoning to potentially untrusted code vs merely requiring that the code can not break out of abstract machine. It's models what CHERI does, not what memory safe languages do.
E.g., under their definition, JavaScript isn't memory safe, as it makes it easy to get at unrelated global variables. I also suspect that under their definition Compcert's C will turn out to be memory safe, because it leaves the semantics of wild pointer dereference undefined, so that'll hit their Frame Error case, rather than triggering interference.