Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I didn’t read that closely, but isn’t this is a segfault in the compiler, not a miscompilation?


Yes.

A segfault in the portion of the compiler written in C++ no less, though triggered by invalid input from the portion of the compiler written in rust (due to a logic bug).

Unless GPs point is that "rust code can still have bugs" (so can ADA) or "the rust compiler still has bugs" (I'm willing to bet so do all ADA compilers) I don't see how this supports his claim.


I can confirm. I myself or our teams find compiler bugs every year or so, going from pure compiler crashes, to generate code that segfaults yay. Bugs are everywhere. Ada helps you with some categories of bugs and crashes but saying you can't segfault an Ada application is laughingly untrue. I manage that frequently on legacy codebases. And BTW, for the customer, a segfault or an uncaught top-level exception have the same effect. A crash.


Nothing inspires confidence like the compiler crashing. Given C/C++'s attitude towards UB, a crash just means you got lucky and the program really f'd up before doing something seriously nefarious like silent memory corruption or carrying on with nonsensical results....


As a practical matter, though, I'd much rather the compiler segfault, than miscompile my code so it does something incorrect at runtime.

But agreed that seeing a compiler segfault doesn't inspire confidence!


Me too!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: