AddressSanitizer instruments our code at run time to detect certain kinds of memory errors. It is useful to have around for testing. The -DTT_SANITIZE option can be passed to cmake to enable the sanitizer in Debug builds when using clang and gcc. It is possible to use AddressSanitizer with MSVC as well, but it requires some more complicated linking strategies.
This PR also sets the TT_SANITIZE flag on GitHub Actions when running on Ubuntu with Clang in Debug mode.
AddressSanitizer already caught some memory leaks caused by not cleaning up allocations in some of the test functions. Those have also been fixed in this PR to ensure that CI succeeds.
Fixes #59
AddressSanitizer instruments our code at run time to detect certain kinds of memory errors. It is useful to have around for testing. The
-DTT_SANITIZE
option can be passed tocmake
to enable the sanitizer in Debug builds when using clang and gcc. It is possible to use AddressSanitizer with MSVC as well, but it requires some more complicated linking strategies.This PR also sets the TT_SANITIZE flag on GitHub Actions when running on Ubuntu with Clang in Debug mode.
AddressSanitizer already caught some memory leaks caused by not cleaning up allocations in some of the test functions. Those have also been fixed in this PR to ensure that CI succeeds.