In the face of so much UB potential in complex software projects written on C/C++, the concerned developer might well ask, What are we to do?
Source:
https://blog.regehr.org/archives/1520. Here is a snippet from the excellent blog article, Undefined Behavior in 2017, by Cuoq and Regehr.
What is the modern C or C++ developer to do?
- Be comfortable with the easy UB tools—the ones that can usually be enabled just by adjusting a makefile, such as compiler warnings and ASan and UBSan. Use these early and often, and (crucially) act upon their findings.
- Be familiar with the hard UB tools—those such as TIS Interpreter that typically require more effort to run—and use them when appropriate.
- Invest in broad-based ...