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/koflerdavid Jan 03 '26
Both points are true, however, segfaulting and hardware exceptions are the actual behaviors on common platforms. "Undefined" does not mean "arbitrary", although aborting with a helpful error message is for sure better. And I'm also aware that the segmentation fault will not occur if the null pointer is used with a sufficiently large index.
As for optimizations that assume there are no null pointers or division by zero problems: they are simply incorrect since one cannot assume these properties unless they have been verified in some way.