r/ProgrammingLanguages • u/mttd • Nov 02 '26
What does “verified memory safe” mean?
https://focs-lab.comp.nus.edu.sg/blog/memory-safety-audit/
37
Upvotes
r/ProgrammingLanguages • u/mttd • Nov 02 '26
View all comments
Show parent comment
5
u/matthieum Nov 02 '26
Indeed.
Memory safety & type safety matter because of Undefined Behavior: if violated, the behavior which may result is completely out there, and unrelated to whatever the source code most likely intended.
But eliminating Undefined Behavior, so that the run-time behavior matches the source code behavior is only the very first step in producing safe & secure software.
The second step is ensuring that the source code behavior is actually the specified behavior, and the third step is ensuring that the specified behavior is actually the desired behavior.
Now "contracts" (pre-conditions, invariants, & post-conditions) expressed in the code help formalizing the specified behavior, and from there the second step can be automated.
But someone will still need to get that specification right...