4 ms·
I doubt writing safe C/C++ code is as straightforward as the Parent post claims, otherwise people at Microsoft, Google and Mozilla must clearly be doing somethi
by SeanDav 9y ago
I doubt writing safe C/C++ code is as straightforward as the Parent post claims, otherwise people at Microsoft, Google and Mozilla must clearly be doing something wrong. They have the budget, the skills and the motivation to always produce safe code, yet their products all contain serious bugs, which would not occur if all their C/C++ code was "safe".
- millstone 9y agoWe know how to write C/C++ code appropriate for safety-critical components, it's just very expensive and slow to develop. Any company who set out to write a social networking system at an ASIL D level (say) would be rapidly out-competed. ISO 26262 recognizes this, which is why different components in your car are developed to different integrity levels. No lives are lost if Firefox misrenders a JPEG, so it has a low rating permitting lax development practices. That said, with crypto-ransomware and other cybersecurity hazards, it's well past time for software development to take some pages from the safety engineering book. STPA-Sec is one example of an attempt at this.
- adrianN 9y agoI've read those safety standards and I disagree. They don't prescribe much that isn't standard practice. The only thing they require that isn't commonly done is very extensive testing or formal verification. They high expensive mostly comes from proving compliance to external auditors. You could have 90% of the results with 10% of the work by just testing your software very thoroughly but not producing all the documentation required to prove compliance to the standard. SQLite for example is at least as rigorously developed as SIL 4 software.