by spaceywilly · 2y ago · 0 comments
I worked for a space-related defense contractor. They are using MISRA C, and everything is very thoroughly designed, documented, and tested. I haven’t seen any research into bugs in safety critical systems caused by memory safety issues, but I think that in practice it is very possible to write memory safe C code if you follow industry standards.
> Dir 4.12 Dynamic memory allocation shall not be used
> Rule 2.2 There shall be no dead code
https://github.com/sakura1083841400/MISRA-C/blob/main/MISRA%...
This provides nothing approaching the guarantees of safe Rust, as far as I can tell.
There is a growing number of people and organizations that do see Rust as bringing advantages in this area.
That said, your parent isn’t wrong that the safety critical space has developed numerous ways of mitigating the risk of writing software, no matter what language it’s written in. But that doesn’t mean that language is irrelevant.