In this recipe, we will learn how to use the UBSAN dynamic analysis tool with our C++ applications, which is capable of detecting undefined behavior. There are many different types of errors that can be introduced in our applications, and undefined behavior is likely the most common type, as the C and C++ specifications define several instances where undefined behavior is possible.
This recipe is important because it will teach you how to enable this simple feature and how it can be used in your applications.