top | item 44674452

(no title)

adamwk | 7 months ago

Crashing on shared access is the safe thing to do

discuss

order

mirashii|7 months ago

An intentional exit by a runtime is a safe crash. A segfault is not, and is here a clear sign that memory safety has been violated.

Gibbon1|7 months ago

Yeah it's not the segfault that's bad, it's when it's when the write to address 0x20001854 succeeds and now some hapless postal clerk is going to jail.

adamwk|7 months ago

I guess I was thinking specifically of the swift case where values have exclusive access enforcement. Normally caught by a compiler, they will safely crash if the compiler didn’t catch it. I think the only way to segfault would be by using Unsafe*Pointer types, which are explicitly marked unsafe

sapiogram|7 months ago

"Crashing" is a very positive spin. "The heap getting the corrupted until it was killed by the operating system" is another interpretation.