ci(amd64/clang/lsan): attempt to fix lsan
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
light7734 2025-10-08 13:35:42 +03:30
parent a19e095a8e
commit 49596c31f3
Signed by: light7734
GPG key ID: 8C30176798F1A6BA
2 changed files with 11 additions and 3 deletions

View file

@ -231,8 +231,12 @@ void Instance::initialize_instance()
void Instance::load_library()
{
library = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL | RTLD_NODELETE);
ensure(library, "Failed to dlopen libvulkan.so");
library = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL);
if(!library)
{
library = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL | RTLD_NODELETE);
}
ensure(library, "Failed to dlopen vulkan library");
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
vk_get_instance_proc_address = reinterpret_cast<PFN_vkGetInstanceProcAddr>(
@ -248,6 +252,10 @@ void Instance::unload_library()
return;
}
// calling dlclose causes many issues with runtime analyzers
// eg. https://github.com/google/sanitizers/issues/89
// with no noticable gains, so we just don't bother closing it.
// dlclose(library);
// library = nullptr;
}

View file

@ -14,7 +14,7 @@ cmake . \
-GNinja \
-DCMAKE_LINKER_TYPE=MOLD \
-DENABLE_UNIT_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS=" \
-fsanitize=leak \
-g \