This commit is contained in:
parent
c1cf35b2af
commit
de2a7f7e14
2 changed files with 9 additions and 8 deletions
|
@ -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()
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue