File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Valgrind suppressions file for Bitcoin.
2
+ #
3
+ # Includes known Valgrind warnings in our dependencies that cannot be fixed
4
+ # in-tree.
5
+ #
6
+ # Example use:
7
+ # $ valgrind --suppressions=contrib/valgrind.supp src/test/test_bitcoin
8
+ # $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
9
+ # --show-leak-kinds=all src/test/test_bitcoin --log_level=test_suite
10
+ {
11
+ Suppress libstdc++ warning - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65434
12
+ Memcheck:Leak
13
+ match-leak-kinds: reachable
14
+ fun:malloc
15
+ obj:*/libstdc++.*
16
+ fun:call_init.part.0
17
+ fun:call_init
18
+ fun:_dl_init
19
+ obj:*/ld-*.so
20
+ }
21
+ {
22
+ Suppress libdb warning - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662917
23
+ Memcheck:Cond
24
+ obj:*/libdb_cxx-*.so
25
+ fun:__log_put
26
+ obj:*/libdb_cxx-*.so
27
+ fun:__log_put_record
28
+ }
29
+ {
30
+ Suppress leveldb warning (leveldb::InitModule()) - https://github.com/google/leveldb/issues/113
31
+ Memcheck:Leak
32
+ match-leak-kinds: reachable
33
+ fun:_Znwm
34
+ fun:_ZN7leveldbL10InitModuleEv
35
+ }
36
+ {
37
+ Suppress leveldb warning (leveldb::Env::Default()) - https://github.com/google/leveldb/issues/113
38
+ Memcheck:Leak
39
+ match-leak-kinds: reachable
40
+ fun:_Znwm
41
+ ...
42
+ fun:_ZN7leveldbL14InitDefaultEnvEv
43
+ }
Original file line number Diff line number Diff line change @@ -167,6 +167,21 @@ can be very difficult to track down. Compiling with -DDEBUG_LOCKORDER (configure
167
167
CXXFLAGS="-DDEBUG_LOCKORDER -g") inserts run-time checks to keep track of which locks
168
168
are held, and adds warnings to the debug.log file if inconsistencies are detected.
169
169
170
+ ** Valgrind suppressions file**
171
+
172
+ Valgrind is a programming tool for memory debugging, memory leak detection, and
173
+ profiling. The repo contains a Valgrind suppressions file
174
+ ([ ` valgrind.supp ` ] ( https://github.com/bitcoin/bitcoin/blob/master/contrib/valgrind.supp ) )
175
+ which includes known Valgrind warnings in our dependencies that cannot be fixed
176
+ in-tree. Example use:
177
+
178
+ ``` shell
179
+ $ valgrind --suppressions=contrib/valgrind.supp src/test/test_bitcoin
180
+ $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
181
+ --show-leak-kinds=all src/test/test_bitcoin --log_level=test_suite
182
+ $ valgrind -v --leak-check=full src/bitcoind -printtoconsole
183
+ ```
184
+
170
185
Locking/mutex usage notes
171
186
-------------------------
172
187
You can’t perform that action at this time.
0 commit comments