From 66ead8f9892920998bd864c72aeeb11b0d6c6e87 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Tue, 13 Feb 2024 19:11:56 +0100 Subject: [PATCH] hunt --- .github/workflows/ubuntu.yml | 4 ++++ tests/test_cvnp_cpp.cpp | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 71547c8..2ca6879 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -31,7 +31,11 @@ jobs: make -j - name: tests + # Our code is compiled with -fsanitize=address + # We disable leak detection, since python (or pybind11) has some leaks + # which are not interesting to use (inside PyUnicode_New) run: | + export ASAN_OPTIONS=detect_leaks=0 source venv/bin/activate cd build/ cmake --build . --target test diff --git a/tests/test_cvnp_cpp.cpp b/tests/test_cvnp_cpp.cpp index 80014f8..eac5d54 100644 --- a/tests/test_cvnp_cpp.cpp +++ b/tests/test_cvnp_cpp.cpp @@ -199,14 +199,6 @@ void test_lifetime() py::str(img).cast().c_str()); } -// Disable leak detection, since python (or pybind11) has some leaks -// which are not interesting to use (inside PyUnicode_New) -#ifdef __cplusplus -extern "C" -#endif -const char* __asan_default_options() { return "detect_leaks=0"; } - - //#define ENABLE_TEST_LIFETIME