DEV Community

Discussion on: Core dump for Rust

Collapse
 
koutheir profile image
Dr. Koutheir Attouchi

Most of fatal errors in Rust comes from a panic, unwraps that we considered safe (probably?).

If that is the case, then why talk about all signals that can kill a process, e.g., SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGSEGV, etc?

Most non-trivial Rust applications execute unsafe code (written in Rust or otherwise) that can cause the signals above to be sent to the process, and that can happen at some tricky hardly-predictable moments, where one does not get a nice call stack trace like the one produced in a panic, and that is when a core dump is the most useful.