blob: c9c45ba7ed6de4fde761e6c1ca2bd917e44b3bc3 [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{
Zackery Spytzd8ef6442020-01-19 15:38:37 -0700267 Uninitialised byte(s) false alarm, see bpo-35561
268 Memcheck:Param
269 epoll_ctl(event)
270 fun:epoll_ctl
271 fun:pyepoll_internal_ctl
272}
273
274{
Neal Norwitz497b19a2005-11-13 18:58:32 +0000275 ZLIB problems, see test_gzip
Neal Norwitz76390de2005-10-03 07:46:34 +0000276 Memcheck:Cond
Neal Norwitz497b19a2005-11-13 18:58:32 +0000277 obj:/lib/libz.so.1.2.3
278 obj:/lib/libz.so.1.2.3
279 fun:deflate
Neal Norwitz76390de2005-10-03 07:46:34 +0000280}
281
282{
283 Avoid problems w/readline doing a putenv and leaking on exit
284 Memcheck:Leak
285 fun:malloc
286 fun:xmalloc
287 fun:sh_set_lines_and_columns
288 fun:_rl_get_screen_size
289 fun:_rl_init_terminal_io
290 obj:/lib/libreadline.so.4.3
291 fun:rl_initialize
Neal Norwitz76390de2005-10-03 07:46:34 +0000292}
293
Victor Stinner03ab6b42019-10-08 15:42:17 +0200294# Valgrind emits "Conditional jump or move depends on uninitialised value(s)"
295# false alarms on GCC builtin strcmp() function. The GCC code is correct.
296#
297# Valgrind bug: https://bugs.kde.org/show_bug.cgi?id=264936
298{
299 bpo-38118: Valgrind emits false alarm on GCC builtin strcmp()
300 Memcheck:Cond
301 fun:PyUnicode_Decode
302}
303
304
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000305###
306### These occur from somewhere within the SSL, when running
307### test_socket_sll. They are too general to leave on by default.
308###
309###{
310### somewhere in SSL stuff
311### Memcheck:Cond
312### fun:memset
313###}
314###{
315### somewhere in SSL stuff
316### Memcheck:Value4
317### fun:memset
318###}
319###
320###{
321### somewhere in SSL stuff
322### Memcheck:Cond
323### fun:MD5_Update
324###}
325###
326###{
327### somewhere in SSL stuff
328### Memcheck:Value4
329### fun:MD5_Update
330###}
331
Martin v. Löwis942f2dd2012-03-04 21:16:39 +0100332# Fedora's package "openssl-1.0.1-0.1.beta2.fc17.x86_64" on x86_64
333# See http://bugs.python.org/issue14171
334{
335 openssl 1.0.1 prng 1
336 Memcheck:Cond
337 fun:bcmp
338 fun:fips_get_entropy
339 fun:FIPS_drbg_instantiate
340 fun:RAND_init_fips
341 fun:OPENSSL_init_library
342 fun:SSL_library_init
343 fun:init_hashlib
344}
345
346{
347 openssl 1.0.1 prng 2
348 Memcheck:Cond
349 fun:fips_get_entropy
350 fun:FIPS_drbg_instantiate
351 fun:RAND_init_fips
352 fun:OPENSSL_init_library
353 fun:SSL_library_init
354 fun:init_hashlib
355}
356
357{
358 openssl 1.0.1 prng 3
359 Memcheck:Value8
360 fun:_x86_64_AES_encrypt_compact
361 fun:AES_encrypt
362}
363
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000364#
365# All of these problems come from using test_socket_ssl
366#
367{
368 from test_socket_ssl
369 Memcheck:Cond
370 fun:BN_bin2bn
371}
372
373{
374 from test_socket_ssl
375 Memcheck:Cond
376 fun:BN_num_bits_word
377}
378
379{
380 from test_socket_ssl
381 Memcheck:Value4
382 fun:BN_num_bits_word
383}
384
385{
386 from test_socket_ssl
387 Memcheck:Cond
388 fun:BN_mod_exp_mont_word
389}
390
391{
392 from test_socket_ssl
393 Memcheck:Cond
394 fun:BN_mod_exp_mont
395}
396
397{
398 from test_socket_ssl
399 Memcheck:Param
400 write(buf)
401 fun:write
402 obj:/usr/lib/libcrypto.so.0.9.7
403}
404
405{
406 from test_socket_ssl
407 Memcheck:Cond
408 fun:RSA_verify
409}
410
411{
412 from test_socket_ssl
413 Memcheck:Value4
414 fun:RSA_verify
415}
416
417{
418 from test_socket_ssl
419 Memcheck:Value4
420 fun:DES_set_key_unchecked
421}
422
423{
424 from test_socket_ssl
425 Memcheck:Value4
426 fun:DES_encrypt2
427}
428
429{
430 from test_socket_ssl
431 Memcheck:Cond
432 obj:/usr/lib/libssl.so.0.9.7
433}
434
435{
436 from test_socket_ssl
437 Memcheck:Value4
438 obj:/usr/lib/libssl.so.0.9.7
439}
440
441{
442 from test_socket_ssl
443 Memcheck:Cond
444 fun:BUF_MEM_grow_clean
445}
446
447{
448 from test_socket_ssl
449 Memcheck:Cond
450 fun:memcpy
451 fun:ssl3_read_bytes
452}
453
454{
455 from test_socket_ssl
456 Memcheck:Cond
457 fun:SHA1_Update
458}
459
460{
461 from test_socket_ssl
462 Memcheck:Value4
463 fun:SHA1_Update
464}
465
Stefan Krah9a2d99e2012-02-25 12:24:21 +0100466{
467 test_buffer_non_debug
468 Memcheck:Addr4
469 fun:PyUnicodeUCS2_FSConverter
470}
471
472{
473 test_buffer_non_debug
474 Memcheck:Addr4
475 fun:PyUnicode_FSConverter
476}
Neal Norwitzc3cd9df2004-06-06 19:58:40 +0000477
Stefan Krah3a973902013-11-08 20:18:09 +0100478{
479 wcscmp_false_positive
480 Memcheck:Addr8
481 fun:wcscmp
482 fun:_PyOS_GetOpt
483 fun:Py_Main
484 fun:main
485}
486
Stefan Krah1919b7e2012-03-21 18:25:23 +0100487# Additional suppressions for the unified decimal tests:
488{
489 test_decimal
490 Memcheck:Addr4
491 fun:PyUnicodeUCS2_FSConverter
492}
493
494{
495 test_decimal2
496 Memcheck:Addr4
497 fun:PyUnicode_FSConverter
498}
499