debugging a segfault in my rust programhttps://jvns.ca/blog/2017/12/23/segfault-debugging/ …
I thought segfaults are UB regardless of language? (like literally what the CPU does with SIGSEGV is undefined I thought?)
-
-
Each cpu and OS fairly clearly documents what happens on a segfault, as far as I know. Many low-level systems (such as the rust runtime) rely on pagefaults being handled in specific ways. It's just another platform specific detail, like how to implement atomics.
-
That said, most programs are operating on sufficiently high-level semantics that any pagefault is either a symptom of UB or part of a lower-level runtime optimization (CoW memory from the OS, null pointer checks in Java, stack guards in Rust, cooperative switches in Go, etc.)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.