Re:Memory Safety in a Modern System Programming Language Pt. 1
by blep_ on Wednesday June 22, 2022 @08:46PM
(#31843809)
Most definitions of memory safety include not crashing.
[ Parent
| on HN ]
Re:Memory Safety in a Modern System Programming Language Pt. 1
by dukc on Thursday June 23, 2022 @05:23AM
(#31846718)
Nope. Memory safety means no undefined behaviour. Crashing is defined behaviour. Indeed, at least in the D philosophy it is better to crash than to just do something and continue when a bug is detected. If that were not the case, assertions in released code would be total humbug.
Now, detecting such errors statically at compile time is still valuable where it is practical. But it's common knowledge that no language guarantees no bugs. It follows that a complete "no crashing" guarantee is not even desirable, let alone part of a memory safety guarantee.
Re:Memory Safety in a Modern System Programming Language Pt. 1
by WalterBright on Thursday June 23, 2022 @02:06AM
(#31845681)
Having the program exit when a memory safety fault is detected is entirely safe.