In this recipe, we will learn how to leverage Google's address sanitizer (ASAN)—which is a dynamic analysis tool—to check for memory corruption errors in our code. This recipe is important because it provides a simple means to ensure that your code is both reliable and stable, with a minimal number of changes to your build system.
Working with ASAN, the address sanitizer
Getting ready
Before beginning, please ensure that all of the technical requirements are met, including the installation of Ubuntu 18.04 or higher and running the following in a Terminal window:
> sudo apt-get install build-essential git cmake
This will ensure that your operating system has the proper tools to compile and execute the...