Skip to content

Commit

Permalink
Supress mem leak in Rust's rt
Browse files Browse the repository at this point in the history
  • Loading branch information
DoumanAsh committed Dec 19, 2024
1 parent 1821288 commit 119c5e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,19 @@ jobs:

- name: Valgrind Test
env:
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --leak-check=full --error-exitcode=1"
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --leak-check=full --error-exitcode=1 --suppressions=valgrind.supp""
run: cargo test --release --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3
- name: Valgrind Test(No SSE2)
env:
RUSTFLAGS: "-Ctarget-feature=-sse2"
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --leak-check=full --error-exitcode=1"
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --leak-check=full --error-exitcode=1 --suppressions=valgrind.supp""
run: cargo test --release --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3
- name: Valgrind Test(AVX2)
env:
RUSTFLAGS: "-Ctarget-feature=+avx2"
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --leak-check=full --error-exitcode=1"
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --leak-check=full --error-exitcode=1 --suppressions=valgrind.supp""
run: cargo test --release --features xxh32,const_xxh32,xxh64,const_xxh64,xxh3,const_xxh3
#- name: Miri Test(No SSE2)
Expand Down
9 changes: 9 additions & 0 deletions valgrind.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
rust_compiler_leak_error_on_panic_in_rt
Memcheck:Leak
match-leak-kinds: possible
fun:malloc
fun:*rt*lang_start_internal*
fun:*rt*lang_start*
fun:main
}

0 comments on commit 119c5e1

Please sign in to comment.