Add flags to enable ASAN and UBSAN in build process
This is a change that was missing from the tree merged in with !83 (merged). It is obviously a very important piece as it allows for enabling the sanitizers in the first place. I assume it was removed by a rebase accidentally as it was the first commit.
Commit Description
You can now specify sanitize=yes
to the make
command, which enables
the address and UB sanitizers. For Clang builds, it enables checks for
unsigned integer ovewrflow and implicit conversions, additionally. Thus,
it is advised to compile as follows:
make TOOLCHAIN=clang sanitize=yes
There also is the option to pass sanitize-strict=yes
, which will set
-fno-sanitize-recover=
such that the program execution aborts in case
the sanitizers detect something.