From cc5b39e44ec2133df32e059bbe124e33c0a23401 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 20 Jul 2022 09:11:15 +0100 Subject: [PATCH 1/2] ci: better pin to dwarf4 in valgrind job Use `-gdwarf` and also set CFLAGS. I was seeing Valgrind issues otherwise. --- ci/test/00_setup_env_native_fuzz_with_valgrind.sh | 2 +- ci/test/00_setup_env_native_valgrind.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh index 9477fb2d9fe..97c530e19e6 100755 --- a/ci/test/00_setup_env_native_fuzz_with_valgrind.sh +++ b/ci/test/00_setup_env_native_fuzz_with_valgrind.sh @@ -16,5 +16,5 @@ export RUN_FUZZ_TESTS=true export FUZZ_TESTS_CONFIG="--valgrind" export GOAL="install" # Temporarily pin dwarf 4, until valgrind can understand clang's dwarf 5 -export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++ CXXFLAGS='-fdebug-default-version=4'" +export BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer CC=clang CXX=clang++ CFLAGS='-gdwarf-4' CXXFLAGS='-gdwarf-4'" export CCACHE_SIZE=200M diff --git a/ci/test/00_setup_env_native_valgrind.sh b/ci/test/00_setup_env_native_valgrind.sh index 7b714dff5c4..d8c08fca39c 100755 --- a/ci/test/00_setup_env_native_valgrind.sh +++ b/ci/test/00_setup_env_native_valgrind.sh @@ -14,4 +14,4 @@ export NO_DEPENDS=1 export TEST_RUNNER_EXTRA="--nosandbox --exclude feature_init,rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547 export GOAL="install" # Temporarily pin dwarf 4, until valgrind can understand clang's dwarf 5 -export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++ CXXFLAGS='-fdebug-default-version=4'" # TODO enable GUI +export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=no CC=clang CXX=clang++ CFLAGS='-gdwarf-4' CXXFLAGS='-gdwarf-4'" # TODO enable GUI From a08c9723f50945edfc82ed9ae1d0106231c2babc Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 19 Jul 2022 18:41:02 +0100 Subject: [PATCH 2/2] contrib: remove unneeded valgrind suppressions --- contrib/valgrind.supp | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/contrib/valgrind.supp b/contrib/valgrind.supp index 6efe49254b9..d6856b42749 100644 --- a/contrib/valgrind.supp +++ b/contrib/valgrind.supp @@ -64,12 +64,6 @@ ... obj:*/libdb_cxx-*.so } -{ - Suppress leaks on init - Memcheck:Leak - ... - fun:_Z11AppInitMainR11NodeContext -} { Suppress leaks on shutdown Memcheck:Leak @@ -82,21 +76,6 @@ ... obj:/usr/lib64/libgdk-3.so.0.2404.7 } -{ - Suppress leveldb warning (leveldb::InitModule()) - https://github.com/google/leveldb/issues/113 - Memcheck:Leak - match-leak-kinds: reachable - fun:_Znwm - fun:_ZN7leveldbL10InitModuleEv -} -{ - Suppress leveldb warning (leveldb::Env::Default()) - https://github.com/google/leveldb/issues/113 - Memcheck:Leak - match-leak-kinds: reachable - fun:_Znwm - ... - fun:_ZN7leveldbL14InitDefaultEnvEv -} { Suppress leveldb leak Memcheck:Leak