diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b9b46f7..5bdc3086 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,7 +116,7 @@ jobs: - name: Install cargo-valgrind run: cargo install cargo-valgrind - name: Run --lib tests under valgrind - run: cargo valgrind test --lib + run: VALGRINDFLAGS="--suppressions=script/valgrind.supp" cargo valgrind test --lib gdal_static: name: "ci gdal-static" diff --git a/Cargo.toml b/Cargo.toml index 0b259ffa..af9daba9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ categories = ["science::geo", "api-bindings"] repository = "https://github.com/georust/gdal" edition = "2021" rust-version = "1.80" +exclude = ["script"] [features] default = [] diff --git a/script/valgrind.supp b/script/valgrind.supp new file mode 100644 index 00000000..77ef314d --- /dev/null +++ b/script/valgrind.supp @@ -0,0 +1,32 @@ +{ + + Memcheck:Leak + match-leak-kinds: possible + fun:malloc + fun:alloc + fun:alloc_impl + fun:allocate + fun:{closure#0} + fun:allocate_for_layout, alloc::sync::{impl#14}::new_uninit::{closure_env#0}, fn(*mut u8) -> *mut alloc::sync::ArcInner>> + fun:new_uninit + fun:new_inner + fun:new_main + fun:init + fun:{closure#0} + fun:do_call + fun:try<(), std::rt::lang_start_internal::{closure_env#0}> + fun:catch_unwind + fun:_ZN3std2rt19lang_start_internal17h1c66660c99c8424cE + fun:_ZN3std2rt10lang_start17h487d345476bc1d6fE + fun:main +} +{ + + Memcheck:Leak + match-leak-kinds: possible + fun:malloc + fun:_ZN3std2rt19lang_start_internal17h1c66660c99c8424cE + fun:_ZN3std2rt10lang_start17h487d345476bc1d6fE + fun:main +} +