3 ms·
TBH segfaults are not necessarily a sign of memory unsafety, but _unexpected_ segfaults are. For some examples, Rust (although this is not specific to it) uses
by SkiFire13 1y ago
TBH segfaults are not necessarily a sign of memory unsafety, but _unexpected_ segfaults are.
For some examples, Rust (although this is not specific to it) uses stack guard pages to detect stack overflows by _forcing_ a segfault (as opposed to reading/writing arbitrary memory after the usual stack). Some JVMs also expect and handle segfaults when dereferencing null pointers, to avoid always paying the cost for checking them.