diff --git a/modules/renderer/private/backend/vk/context/instance.cpp b/modules/renderer/private/backend/vk/context/instance.cpp index b63f871..bffd4b0 100644 --- a/modules/renderer/private/backend/vk/context/instance.cpp +++ b/modules/renderer/private/backend/vk/context/instance.cpp @@ -231,11 +231,11 @@ void Instance::initialize_instance() void Instance::load_library() { - library = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL); - if(!library) - { - library = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL | RTLD_NODELETE); - } + library = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); + if (!library) + { + library = dlopen("libvulkan.so", RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); + } ensure(library, "Failed to dlopen vulkan library"); // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) @@ -256,8 +256,8 @@ void Instance::unload_library() // eg. https://github.com/google/sanitizers/issues/89 // with no noticable gains, so we just don't bother closing it. - // dlclose(library); - // library = nullptr; + dlclose(library); + library = nullptr; } void Instance::load_global_functions() diff --git a/tools/ci/amd64/clang/lsan.sh b/tools/ci/amd64/clang/lsan.sh index 348ec07..265bd34 100755 --- a/tools/ci/amd64/clang/lsan.sh +++ b/tools/ci/amd64/clang/lsan.sh @@ -17,6 +17,7 @@ cmake . \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_FLAGS=" \ -fsanitize=leak \ +-fno-common \ -g \ -fno-omit-frame-pointer \ -std=c++23 \ @@ -30,7 +31,7 @@ cmake . \ -Wl,-rpath,/libcxx_lsan/lib" \ && cmake --build ./build -j`nproc` -export LSAN_OPTIONS="suppressions=$(git rev-parse --show-toplevel)/tools/ci/amd64/clang/lsan.supp:fast_unwind_on_malloc=0" +export LSAN_OPTIONS="suppressions=$(git rev-parse --show-toplevel)/tools/ci/amd64/clang/lsan.supp:fast_unwind_on_malloc=0:verbosity=1:report_objects=1" export LSAN_SYMBOLIZER_PATH="$(which llvm-symbolizer)" for test in $(find ./build -type f -name '*_tests' -executable); do echo "Running $test"