3 ms·
> I'm guessing aside form a dangling pointer GC doesn't offer much protection form a segfault? Correct. By using GC and banning free() you avoid use-after-free
by rntz 11y ago
> I'm guessing aside form a dangling pointer GC doesn't offer much protection form a segfault?
Correct. By using GC and banning free() you avoid use-after-free bugs, but not out-of-bounds accesses.
Out of bounds accesses have to be forbidden in some other fashion; most languages do bounds-checking and throw an exception rather than trying to access the memory and getting a segfault (or, worse, reading some random other object's memory).
- bogomipz 11y agoThanks