blob: 38a5ea3cd2b828f8625448ccffbd23b376b12efc [file] [log] [blame]
Neal Norwitzc3cd9df2004-06-06 19:58:40 +00001#
2# This is a valgrind suppression file that should be used when using valgrind.
3#
4# Here's an example of running valgrind:
5#
6# cd python/dist/src
7# valgrind --tool=memcheck --suppressions=Misc/valgrind-python.supp \
Georg Brandl1158a332009-06-04 09:30:30 +00008# ./python -E ./Lib/test/regrtest.py -u gui,network
Neal Norwitzc3cd9df2004-06-06 19:58:40 +00009#
10# You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER
Paul Priceba518802018-02-21 01:00:01 -050011# to use the preferred suppressions with address_in_range.
Neal Norwitzc3cd9df2004-06-06 19:58:40 +000012#
13# If you do not want to recompile Python, you can uncomment
Paul Pricedb6075a2018-08-11 02:41:34 -040014# suppressions for _PyObject_Free and _PyObject_Realloc.
Neal Norwitzc3cd9df2004-06-06 19:58:40 +000015#
16# See Misc/README.valgrind for more information.
17
18# all tool names: Addrcheck,Memcheck,cachegrind,helgrind,massif
19{
20 ADDRESS_IN_RANGE/Invalid read of size 4
21 Memcheck:Addr4
Paul Priceba518802018-02-21 01:00:01 -050022 fun:address_in_range
Neal Norwitzc3cd9df2004-06-06 19:58:40 +000023}
24
25{
26 ADDRESS_IN_RANGE/Invalid read of size 4
27 Memcheck:Value4
Paul Priceba518802018-02-21 01:00:01 -050028 fun:address_in_range
Neal Norwitzc3cd9df2004-06-06 19:58:40 +000029}
30
31{
Neal Norwitz497b19a2005-11-13 18:58:32 +000032 ADDRESS_IN_RANGE/Invalid read of size 8 (x86_64 aka amd64)
Neal Norwitz76390de2005-10-03 07:46:34 +000033 Memcheck:Value8
Paul Priceba518802018-02-21 01:00:01 -050034 fun:address_in_range
Neal Norwitz76390de2005-10-03 07:46:34 +000035}
36
37{
Neal Norwitzc3cd9df2004-06-06 19:58:40 +000038 ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
39 Memcheck:Cond
Paul Priceba518802018-02-21 01:00:01 -050040 fun:address_in_range
Neal Norwitzc3cd9df2004-06-06 19:58:40 +000041}
42
Neal Norwitz497b19a2005-11-13 18:58:32 +000043#
44# Leaks (including possible leaks)
45# Hmmm, I wonder if this masks some real leaks. I think it does.
46# Will need to fix that.
47#
48
49{
Neal Norwitz2f99b242008-08-24 05:48:10 +000050 Suppress leaking the GIL. Happens once per process, see comment in ceval.c.
51 Memcheck:Leak
52 fun:malloc
53 fun:PyThread_allocate_lock
54 fun:PyEval_InitThreads
55}
56
57{
58 Suppress leaking the GIL after a fork.
59 Memcheck:Leak
60 fun:malloc
61 fun:PyThread_allocate_lock
62 fun:PyEval_ReInitThreads
63}
64
65{
66 Suppress leaking the autoTLSkey. This looks like it shouldn't leak though.
67 Memcheck:Leak
68 fun:malloc
69 fun:PyThread_create_key
70 fun:_PyGILState_Init
71 fun:Py_InitializeEx
72 fun:Py_Main
73}
74
75{
76 Hmmm, is this a real leak or like the GIL?
77 Memcheck:Leak
78 fun:malloc
79 fun:PyThread_ReInitTLS
80}
81
82{
Neal Norwitz497b19a2005-11-13 18:58:32 +000083 Handle PyMalloc confusing valgrind (possibly leaked)
84 Memcheck:Leak
85 fun:realloc
86 fun:_PyObject_GC_Resize
87 fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
88}
89
90{
91 Handle PyMalloc confusing valgrind (possibly leaked)
92 Memcheck:Leak
93 fun:malloc
94 fun:_PyObject_GC_New
95 fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
96}
97
98{
99 Handle PyMalloc confusing valgrind (possibly leaked)
100 Memcheck:Leak
101 fun:malloc
102 fun:_PyObject_GC_NewVar
103 fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
104}
105
106#
107# Non-python specific leaks
108#
109
110{
111 Handle pthread issue (possibly leaked)
112 Memcheck:Leak
113 fun:calloc
114 fun:allocate_dtv
115 fun:_dl_allocate_tls_storage
116 fun:_dl_allocate_tls
117}
118
119{
120 Handle pthread issue (possibly leaked)
121 Memcheck:Leak
122 fun:memalign
123 fun:_dl_allocate_tls_storage
124 fun:_dl_allocate_tls
125}
126
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000127###{
128### ADDRESS_IN_RANGE/Invalid read of size 4
129### Memcheck:Addr4
Paul Pricedb6075a2018-08-11 02:41:34 -0400130### fun:_PyObject_Free
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000131###}
132###
133###{
134### ADDRESS_IN_RANGE/Invalid read of size 4
135### Memcheck:Value4
Paul Pricedb6075a2018-08-11 02:41:34 -0400136### fun:_PyObject_Free
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000137###}
138###
139###{
Charles-François Natali506b3612011-12-03 14:43:57 +0100140### ADDRESS_IN_RANGE/Use of uninitialised value of size 8
141### Memcheck:Addr8
Paul Pricedb6075a2018-08-11 02:41:34 -0400142### fun:_PyObject_Free
Charles-François Natali506b3612011-12-03 14:43:57 +0100143###}
144###
145###{
146### ADDRESS_IN_RANGE/Use of uninitialised value of size 8
147### Memcheck:Value8
Paul Pricedb6075a2018-08-11 02:41:34 -0400148### fun:_PyObject_Free
Charles-François Natali506b3612011-12-03 14:43:57 +0100149###}
150###
151###{
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000152### ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
153### Memcheck:Cond
Paul Pricedb6075a2018-08-11 02:41:34 -0400154### fun:_PyObject_Free
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000155###}
156
157###{
158### ADDRESS_IN_RANGE/Invalid read of size 4
159### Memcheck:Addr4
Paul Pricedb6075a2018-08-11 02:41:34 -0400160### fun:_PyObject_Realloc
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000161###}
162###
163###{
164### ADDRESS_IN_RANGE/Invalid read of size 4
165### Memcheck:Value4
Paul Pricedb6075a2018-08-11 02:41:34 -0400166### fun:_PyObject_Realloc
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000167###}
168###
169###{
Charles-François Natali506b3612011-12-03 14:43:57 +0100170### ADDRESS_IN_RANGE/Use of uninitialised value of size 8
171### Memcheck:Addr8
Paul Pricedb6075a2018-08-11 02:41:34 -0400172### fun:_PyObject_Realloc
Charles-François Natali506b3612011-12-03 14:43:57 +0100173###}
174###
175###{
176### ADDRESS_IN_RANGE/Use of uninitialised value of size 8
177### Memcheck:Value8
Paul Pricedb6075a2018-08-11 02:41:34 -0400178### fun:_PyObject_Realloc
Charles-François Natali506b3612011-12-03 14:43:57 +0100179###}
180###
181###{
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000182### ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
183### Memcheck:Cond
Paul Pricedb6075a2018-08-11 02:41:34 -0400184### fun:_PyObject_Realloc
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000185###}
186
187###
188### All the suppressions below are for errors that occur within libraries
189### that Python uses. The problems to not appear to be related to Python's
190### use of the libraries.
191###
Neal Norwitz497b19a2005-11-13 18:58:32 +0000192
193{
Guido van Rossumcd16bf62007-06-13 18:07:49 +0000194 Generic ubuntu ld problems
195 Memcheck:Addr8
196 obj:/lib/ld-2.4.so
197 obj:/lib/ld-2.4.so
198 obj:/lib/ld-2.4.so
199 obj:/lib/ld-2.4.so
200}
201
202{
Thomas Wouters0e3f5912006-08-11 14:57:12 +0000203 Generic gentoo ld problems
204 Memcheck:Cond
205 obj:/lib/ld-2.3.4.so
206 obj:/lib/ld-2.3.4.so
207 obj:/lib/ld-2.3.4.so
208 obj:/lib/ld-2.3.4.so
209}
210
211{
Neal Norwitz497b19a2005-11-13 18:58:32 +0000212 DBM problems, see test_dbm
213 Memcheck:Param
214 write(buf)
215 fun:write
216 obj:/usr/lib/libdb1.so.2
217 obj:/usr/lib/libdb1.so.2
218 obj:/usr/lib/libdb1.so.2
219 obj:/usr/lib/libdb1.so.2
220 fun:dbm_close
221}
222
223{
224 DBM problems, see test_dbm
225 Memcheck:Value8
226 fun:memmove
227 obj:/usr/lib/libdb1.so.2
228 obj:/usr/lib/libdb1.so.2
229 obj:/usr/lib/libdb1.so.2
230 obj:/usr/lib/libdb1.so.2
231 fun:dbm_store
232 fun:dbm_ass_sub
233}
234
235{
236 DBM problems, see test_dbm
237 Memcheck:Cond
238 obj:/usr/lib/libdb1.so.2
239 obj:/usr/lib/libdb1.so.2
240 obj:/usr/lib/libdb1.so.2
241 fun:dbm_store
242 fun:dbm_ass_sub
243}
244
245{
246 DBM problems, see test_dbm
247 Memcheck:Cond
248 fun:memmove
249 obj:/usr/lib/libdb1.so.2
250 obj:/usr/lib/libdb1.so.2
251 obj:/usr/lib/libdb1.so.2
252 obj:/usr/lib/libdb1.so.2
253 fun:dbm_store
254 fun:dbm_ass_sub
255}
256
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000257{
258 GDBM problems, see test_gdbm
259 Memcheck:Param
260 write(buf)
261 fun:write
262 fun:gdbm_open
263
264}
265
Neal Norwitz76390de2005-10-03 07:46:34 +0000266{
Neal Norwitz497b19a2005-11-13 18:58:32 +0000267 ZLIB problems, see test_gzip
Neal Norwitz76390de2005-10-03 07:46:34 +0000268 Memcheck:Cond
Neal Norwitz497b19a2005-11-13 18:58:32 +0000269 obj:/lib/libz.so.1.2.3
270 obj:/lib/libz.so.1.2.3
271 fun:deflate
Neal Norwitz76390de2005-10-03 07:46:34 +0000272}
273
274{
275 Avoid problems w/readline doing a putenv and leaking on exit
276 Memcheck:Leak
277 fun:malloc
278 fun:xmalloc
279 fun:sh_set_lines_and_columns
280 fun:_rl_get_screen_size
281 fun:_rl_init_terminal_io
282 obj:/lib/libreadline.so.4.3
283 fun:rl_initialize
Neal Norwitz76390de2005-10-03 07:46:34 +0000284}
285
Victor Stinner03ab6b42019-10-08 15:42:17 +0200286# Valgrind emits "Conditional jump or move depends on uninitialised value(s)"
287# false alarms on GCC builtin strcmp() function. The GCC code is correct.
288#
289# Valgrind bug: https://bugs.kde.org/show_bug.cgi?id=264936
290{
291 bpo-38118: Valgrind emits false alarm on GCC builtin strcmp()
292 Memcheck:Cond
293 fun:PyUnicode_Decode
294}
295
296
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000297###
298### These occur from somewhere within the SSL, when running
299### test_socket_sll. They are too general to leave on by default.
300###
301###{
302### somewhere in SSL stuff
303### Memcheck:Cond
304### fun:memset
305###}
306###{
307### somewhere in SSL stuff
308### Memcheck:Value4
309### fun:memset
310###}
311###
312###{
313### somewhere in SSL stuff
314### Memcheck:Cond
315### fun:MD5_Update
316###}
317###
318###{
319### somewhere in SSL stuff
320### Memcheck:Value4
321### fun:MD5_Update
322###}
323
Martin v. Löwis942f2dd2012-03-04 21:16:39 +0100324# Fedora's package "openssl-1.0.1-0.1.beta2.fc17.x86_64" on x86_64
325# See http://bugs.python.org/issue14171
326{
327 openssl 1.0.1 prng 1
328 Memcheck:Cond
329 fun:bcmp
330 fun:fips_get_entropy
331 fun:FIPS_drbg_instantiate
332 fun:RAND_init_fips
333 fun:OPENSSL_init_library
334 fun:SSL_library_init
335 fun:init_hashlib
336}
337
338{
339 openssl 1.0.1 prng 2
340 Memcheck:Cond
341 fun:fips_get_entropy
342 fun:FIPS_drbg_instantiate
343 fun:RAND_init_fips
344 fun:OPENSSL_init_library
345 fun:SSL_library_init
346 fun:init_hashlib
347}
348
349{
350 openssl 1.0.1 prng 3
351 Memcheck:Value8
352 fun:_x86_64_AES_encrypt_compact
353 fun:AES_encrypt
354}
355
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000356#
357# All of these problems come from using test_socket_ssl
358#
359{
360 from test_socket_ssl
361 Memcheck:Cond
362 fun:BN_bin2bn
363}
364
365{
366 from test_socket_ssl
367 Memcheck:Cond
368 fun:BN_num_bits_word
369}
370
371{
372 from test_socket_ssl
373 Memcheck:Value4
374 fun:BN_num_bits_word
375}
376
377{
378 from test_socket_ssl
379 Memcheck:Cond
380 fun:BN_mod_exp_mont_word
381}
382
383{
384 from test_socket_ssl
385 Memcheck:Cond
386 fun:BN_mod_exp_mont
387}
388
389{
390 from test_socket_ssl
391 Memcheck:Param
392 write(buf)
393 fun:write
394 obj:/usr/lib/libcrypto.so.0.9.7
395}
396
397{
398 from test_socket_ssl
399 Memcheck:Cond
400 fun:RSA_verify
401}
402
403{
404 from test_socket_ssl
405 Memcheck:Value4
406 fun:RSA_verify
407}
408
409{
410 from test_socket_ssl
411 Memcheck:Value4
412 fun:DES_set_key_unchecked
413}
414
415{
416 from test_socket_ssl
417 Memcheck:Value4
418 fun:DES_encrypt2
419}
420
421{
422 from test_socket_ssl
423 Memcheck:Cond
424 obj:/usr/lib/libssl.so.0.9.7
425}
426
427{
428 from test_socket_ssl
429 Memcheck:Value4
430 obj:/usr/lib/libssl.so.0.9.7
431}
432
433{
434 from test_socket_ssl
435 Memcheck:Cond
436 fun:BUF_MEM_grow_clean
437}
438
439{
440 from test_socket_ssl
441 Memcheck:Cond
442 fun:memcpy
443 fun:ssl3_read_bytes
444}
445
446{
447 from test_socket_ssl
448 Memcheck:Cond
449 fun:SHA1_Update
450}
451
452{
453 from test_socket_ssl
454 Memcheck:Value4
455 fun:SHA1_Update
456}
457
Stefan Krah9a2d99e2012-02-25 12:24:21 +0100458{
459 test_buffer_non_debug
460 Memcheck:Addr4
461 fun:PyUnicodeUCS2_FSConverter
462}
463
464{
465 test_buffer_non_debug
466 Memcheck:Addr4
467 fun:PyUnicode_FSConverter
468}
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000469
Stefan Krah3a973902013-11-08 20:18:09 +0100470{
471 wcscmp_false_positive
472 Memcheck:Addr8
473 fun:wcscmp
474 fun:_PyOS_GetOpt
475 fun:Py_Main
476 fun:main
477}
478
Stefan Krah1919b7e2012-03-21 18:25:23 +0100479# Additional suppressions for the unified decimal tests:
480{
481 test_decimal
482 Memcheck:Addr4
483 fun:PyUnicodeUCS2_FSConverter
484}
485
486{
487 test_decimal2
488 Memcheck:Addr4
489 fun:PyUnicode_FSConverter
490}
491