Skip to content

Commit

Permalink
Set up Valgrind suppressions for possible 1.83 leak
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Nov 28, 2024
1 parent 48933e8 commit 4e70e1a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
32 changes: 32 additions & 0 deletions script/valgrind.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
<rust_1_83_leak_fedora_41>
Memcheck:Leak
match-leak-kinds: possible
fun:malloc
fun:alloc
fun:alloc_impl
fun:allocate
fun:{closure#0}<std::thread::Inner>
fun:allocate_for_layout<core::mem::maybe_uninit::MaybeUninit<std::thread::Inner>, alloc::sync::{impl#14}::new_uninit::{closure_env#0}<std::thread::Inner>, fn(*mut u8) -> *mut alloc::sync::ArcInner<core::mem::maybe_uninit::MaybeUninit<std::thread::Inner>>>
fun:new_uninit<std::thread::Inner>
fun:new_inner
fun:new_main
fun:init
fun:{closure#0}
fun:do_call<std::rt::lang_start_internal::{closure_env#0}, ()>
fun:try<(), std::rt::lang_start_internal::{closure_env#0}>
fun:catch_unwind<std::rt::lang_start_internal::{closure_env#0}, ()>
fun:_ZN3std2rt19lang_start_internal17h1c66660c99c8424cE
fun:_ZN3std2rt10lang_start17h487d345476bc1d6fE
fun:main
}
{
<rust_1_83_leak_ubuntu_22_04>
Memcheck:Leak
match-leak-kinds: possible
fun:malloc
fun:_ZN3std2rt19lang_start_internal17h1c66660c99c8424cE
fun:_ZN3std2rt10lang_start17h487d345476bc1d6fE
fun:main
}

0 comments on commit 4e70e1a

Please sign in to comment.