by uecker · 2w ago · 0 comments
And to the GP: yes, if your safe Rust program segfaults because of a bug in the Rust standard library, then you file a bug with the Rust project. I agree this is nice!
But in most real-world cases, your Rust program will segfault (or panic) due to a bug in your own code or in some code in one of its many dependencies. Then you also debug it.
But indeed you are in a good place if you manage to get a segfault. The much worse case is that the program misbehaves in some unexplainable way.
The problem is if the program misbehaves in some unexplainable way due to random corruption. And memory safety is the right path to reduce such problems. But only in the imaginary world of perfectly safe Rust code is this a reality, or with Fil-C, or verified C code, or some other memory safe language. In the actual world of most systems programming scenarious even with Rust it is only somewhat better than C.