mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 19:23:41 +02:00
test: Move valgrind.supp to the other sanitizer_suppressions files
This commit is contained in:
@@ -251,7 +251,7 @@ class Binaries:
|
||||
def __init__(self, paths, bin_dir, *, use_valgrind=False):
|
||||
self.paths = paths
|
||||
self.bin_dir = bin_dir
|
||||
suppressions_file = pathlib.Path(__file__).resolve().parents[3] / "contrib" / "valgrind.supp"
|
||||
suppressions_file = pathlib.Path(__file__).resolve().parents[3] / "test" / "sanitizer_suppressions" / "valgrind.supp"
|
||||
self.valgrind_cmd = [
|
||||
"valgrind",
|
||||
f"--suppressions={suppressions_file}",
|
||||
|
||||
52
test/sanitizer_suppressions/valgrind.supp
Normal file
52
test/sanitizer_suppressions/valgrind.supp
Normal file
@@ -0,0 +1,52 @@
|
||||
# This valgrind suppressions file includes known Valgrind warnings in our
|
||||
# dependencies that cannot be fixed in-tree.
|
||||
#
|
||||
# Example use:
|
||||
# $ valgrind --suppressions=test/sanitizer_suppressions/valgrind.supp build/bin/test_bitcoin
|
||||
# $ valgrind --suppressions=test/sanitizer_suppressions/valgrind.supp --leak-check=full \
|
||||
# --show-leak-kinds=all build/bin/test_bitcoin
|
||||
#
|
||||
# To create suppressions for found issues, use the --gen-suppressions=all option:
|
||||
# $ valgrind --suppressions=test/sanitizer_suppressions/valgrind.supp --leak-check=full \
|
||||
# --show-leak-kinds=all --gen-suppressions=all --show-reachable=yes \
|
||||
# --error-limit=no build/bin/test_bitcoin
|
||||
#
|
||||
# Note that suppressions may depend on OS and/or library versions.
|
||||
# Tested on aarch64 and x86_64 with Ubuntu Noble system libs, using clang-16
|
||||
# and GCC, without gui.
|
||||
{
|
||||
Suppress leaks on shutdown
|
||||
Memcheck:Leak
|
||||
...
|
||||
fun:_Z8ShutdownR11NodeContext
|
||||
}
|
||||
{
|
||||
Suppress leveldb leak
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: reachable
|
||||
fun:_Znwm
|
||||
...
|
||||
fun:_ZN7leveldb6DBImpl14BackgroundCallEv
|
||||
}
|
||||
{
|
||||
Suppress leveldb leak
|
||||
Memcheck:Leak
|
||||
fun:_Znwm
|
||||
...
|
||||
fun:GetCoin
|
||||
}
|
||||
{
|
||||
Suppress LogInstance still reachable memory warning
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: reachable
|
||||
fun:_Znwm
|
||||
fun:_Z11LogInstancev
|
||||
}
|
||||
{
|
||||
Suppress BCLog::Logger::StartLogging() still reachable memory warning
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: reachable
|
||||
fun:malloc
|
||||
...
|
||||
fun:_ZN5BCLog6Logger12StartLoggingEv
|
||||
}
|
||||
Reference in New Issue
Block a user