Allow the loader to enable ASAN outside of testing
authorCharles Giessen <charles@lunarg.com>
Tue, 7 Mar 2023 22:14:43 +0000 (15:14 -0700)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Tue, 7 Mar 2023 23:39:27 +0000 (16:39 -0700)
commite4895e86f7da0226b92fcc29d53bbf4e0bb55d1f
treefec346d71b5c182077e1e7f849dfe1b1131ae72a
parent3db19f3e3d8b0c96dc1ffcb5888c06e306df478c
Allow the loader to enable ASAN outside of testing

This commit promotes the build option TEST_USE_ADDRESS_SANITIZER and
TEST_USE_THREAD_SANITIZER to not be behind BUILD_TESTS. This allows users
of the loader to enable ASAN & TSAN support on the loader without enabling
the loader's tests.

The new options are called LOADER_ENABLE_ADDRESS_SANITIZER and
LOADER_ENABLE_THREAD_SANITIZER.

There is also a new build option: `LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING`.
This is to allow layers & drivers that use Address Sanitizer to get useful
stack traces when running their code. Because vkDestroyInstance unloads all
layer and driver dynamic libraries, leak sanitizer cannot create complete
stack traces, making debugging the leaks much more difficult than necessary.
This option is only available when LOADER_ENABLE_ADDRESS_SANITIZER is also
enabled, due to that being the only reason to prevent the unloading of
libraries.
.github/workflows/build.yml
BUILD.md
CMakeLists.txt
loader/CMakeLists.txt
loader/vk_loader_platform.h
tests/CMakeLists.txt
tests/README.md
tests/framework/CMakeLists.txt
tests/framework/README.md
tests/loader_regression_tests.cpp