• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
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 \
8#		./python -E -tt ./Lib/test/regrtest.py -u bsddb,network
9#
10# You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER
11# to use the preferred suppressions with Py_ADDRESS_IN_RANGE.
12#
13# If you do not want to recompile Python, you can uncomment
14# suppressions for PyObject_Free and PyObject_Realloc.
15#
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
22   fun:Py_ADDRESS_IN_RANGE
23}
24
25{
26   ADDRESS_IN_RANGE/Invalid read of size 4
27   Memcheck:Value4
28   fun:Py_ADDRESS_IN_RANGE
29}
30
31{
32   ADDRESS_IN_RANGE/Invalid read of size 8 (x86_64 aka amd64)
33   Memcheck:Value8
34   fun:Py_ADDRESS_IN_RANGE
35}
36
37{
38   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
39   Memcheck:Cond
40   fun:Py_ADDRESS_IN_RANGE
41}
42
43#
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{
50   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{
83   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
127###{
128###   ADDRESS_IN_RANGE/Invalid read of size 4
129###   Memcheck:Addr4
130###   fun:PyObject_Free
131###}
132###
133###{
134###   ADDRESS_IN_RANGE/Invalid read of size 4
135###   Memcheck:Value4
136###   fun:PyObject_Free
137###}
138###
139###{
140###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
141###   Memcheck:Addr8
142###   fun:PyObject_Free
143###}
144###
145###{
146###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
147###   Memcheck:Value8
148###   fun:PyObject_Free
149###}
150###
151###{
152###   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
153###   Memcheck:Cond
154###   fun:PyObject_Free
155###}
156
157###{
158###   ADDRESS_IN_RANGE/Invalid read of size 4
159###   Memcheck:Addr4
160###   fun:PyObject_Realloc
161###}
162###
163###{
164###   ADDRESS_IN_RANGE/Invalid read of size 4
165###   Memcheck:Value4
166###   fun:PyObject_Realloc
167###}
168###
169###{
170###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
171###   Memcheck:Addr8
172###   fun:PyObject_Realloc
173###}
174###
175###{
176###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
177###   Memcheck:Value8
178###   fun:PyObject_Realloc
179###}
180###
181###{
182###   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
183###   Memcheck:Cond
184###   fun:PyObject_Realloc
185###}
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###
192
193{
194   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{
203   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{
212   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
257{
258   GDBM problems, see test_gdbm
259   Memcheck:Param
260   write(buf)
261   fun:write
262   fun:gdbm_open
263
264}
265
266{
267   ZLIB problems, see test_gzip
268   Memcheck:Cond
269   obj:/lib/libz.so.1.2.3
270   obj:/lib/libz.so.1.2.3
271   fun:deflate
272}
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
284}
285
286###
287### These occur from somewhere within the SSL, when running
288###  test_socket_sll.  They are too general to leave on by default.
289###
290###{
291###   somewhere in SSL stuff
292###   Memcheck:Cond
293###   fun:memset
294###}
295###{
296###   somewhere in SSL stuff
297###   Memcheck:Value4
298###   fun:memset
299###}
300###
301###{
302###   somewhere in SSL stuff
303###   Memcheck:Cond
304###   fun:MD5_Update
305###}
306###
307###{
308###   somewhere in SSL stuff
309###   Memcheck:Value4
310###   fun:MD5_Update
311###}
312
313#
314# All of these problems come from using test_socket_ssl
315#
316{
317   from test_socket_ssl
318   Memcheck:Cond
319   fun:BN_bin2bn
320}
321
322{
323   from test_socket_ssl
324   Memcheck:Cond
325   fun:BN_num_bits_word
326}
327
328{
329   from test_socket_ssl
330   Memcheck:Value4
331   fun:BN_num_bits_word
332}
333
334{
335   from test_socket_ssl
336   Memcheck:Cond
337   fun:BN_mod_exp_mont_word
338}
339
340{
341   from test_socket_ssl
342   Memcheck:Cond
343   fun:BN_mod_exp_mont
344}
345
346{
347   from test_socket_ssl
348   Memcheck:Param
349   write(buf)
350   fun:write
351   obj:/usr/lib/libcrypto.so.0.9.7
352}
353
354{
355   from test_socket_ssl
356   Memcheck:Cond
357   fun:RSA_verify
358}
359
360{
361   from test_socket_ssl
362   Memcheck:Value4
363   fun:RSA_verify
364}
365
366{
367   from test_socket_ssl
368   Memcheck:Value4
369   fun:DES_set_key_unchecked
370}
371
372{
373   from test_socket_ssl
374   Memcheck:Value4
375   fun:DES_encrypt2
376}
377
378{
379   from test_socket_ssl
380   Memcheck:Cond
381   obj:/usr/lib/libssl.so.0.9.7
382}
383
384{
385   from test_socket_ssl
386   Memcheck:Value4
387   obj:/usr/lib/libssl.so.0.9.7
388}
389
390{
391   from test_socket_ssl
392   Memcheck:Cond
393   fun:BUF_MEM_grow_clean
394}
395
396{
397   from test_socket_ssl
398   Memcheck:Cond
399   fun:memcpy
400   fun:ssl3_read_bytes
401}
402
403{
404   from test_socket_ssl
405   Memcheck:Cond
406   fun:SHA1_Update
407}
408
409{
410   from test_socket_ssl
411   Memcheck:Value4
412   fun:SHA1_Update
413}
414
415
416