News for hackers. Stuff that matters.
Re:Violating memory safety with Haskell's value restriction by newpavlov on Monday May 26, 2025 @10:11AM (#44097591)
>In Rust, it's considered a bug for any code which isn't using `unsafe` to encounter a memory error (e.g., to segfault)

Teeechnically, it's not true. Unfortunately, you can trigger a memory error in safe code by overflowing stack by allocating big objects on stack, executing poorly written recursive code, or spawning a thread with small stack. In older Rust versions you literally got segfault in such cases.

Re:Violating memory safety with Haskell's value restriction by Rusky on Monday May 26, 2025 @02:51PM (#44100395)
Isn't stack overflow made safe via guard pages and probes (on sufficiently high-tier target platforms)? That is you should get a guaranteed error, even if that is a segfault, and not memory corruption.