I would assert that virtually every non-trivial C&#x2F;C++ program (&gt;100KLOC) contains undefined behavior.<p>Here&#x27;s a list of undefined behaviors that&#x27;s almost impossible to get rid of:<p>* Data race. This is particularly fun for anyone who started doing multithreaded code pre-C11&#x2F;C++11, since volatile does not let you use code across multiple threads without locking.<p>* Signed integer overflow. Are you sure that there is absolutely no input to your program that would not cause one of your thousands of signed arithmetic operations to overflow?<p>* Buffer overflow. This is something like 90% of all security vulnerabilities.<p>* Uninitialized variables. Note that -Wuninitialized doesn&#x27;t catch all cases, although this is relatively easy to mitigate with a paranoid style guide.<p>* Strict aliasing rules. Better yet, if you have any sort of custom memory allocation scheme, you&#x27;re pretty much guaranteed to break this, since the only way you can access an object with a dynamic type of bytes (signed&#x2F;unsigned char) is via signed&#x2F;unsigned char. Functions like memcpy or malloc cannot legally be written in C without breaking this behavior. Also, there is not (to my knowledge) any dynamic checker for violations of this property, unlike the other things in this list.<p>Your program probably has undefined behavior. You just don&#x27;t know it yet, and your compiler hasn&#x27;t figured out how to squeak out a 0.5% speedup from screwing you over because of it yet.