▲ | zozbot234 4 days ago | ||||||||||||||||
You can't really guarantee that all out-of-bounds accesses will segfault, because memory protection mechanisms are not that granular. (And actual memory segmentation, that did have the required granularity, has fallen out of use - though CHERI is an attempt to revive it.) That's why a segfault is treated as something to be avoided altogether, not as a reliable error mechanism. What you can say though (and the point I made upthread) is that if a language manages to provably never segfault, then it must have some sort of true language-enforced safety because the difference between segfaulting or not is really just a matter of granularity. | |||||||||||||||||
▲ | uecker 4 days ago | parent [-] | ||||||||||||||||
How granular the memory protection mechanism is is part of the implementation. | |||||||||||||||||
|