4 ms·
I would personally describe memory safety as "all memory accesses to variables are guaranteed to yield a valid value under the type specified by the variable".
by znwu 5y ago
I would personally describe memory safety as "all memory accesses to variables are guaranteed to yield a valid value under the type specified by the variable".
So that immediately rules out buffer overflows, use-after-free, double-free, non-atomic data race, dangling pointers, wrong cast, etc.
Some people think memory leaking counts, but I have the same view as Rust. Memory leaking does not corrupt the correctness of a program. And there is no accepted method to universally define "memory leaking" in the first place.