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 ./Lib/test/regrtest.py -u gui,network 9 # 10 # You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER 11 # to use the preferred suppressions with 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:address_in_range 23 } 24 25 { 26 ADDRESS_IN_RANGE/Invalid read of size 4 27 Memcheck:Value4 28 fun:address_in_range 29 } 30 31 { 32 ADDRESS_IN_RANGE/Invalid read of size 8 (x86_64 aka amd64) 33 Memcheck:Value8 34 fun:address_in_range 35 } 36 37 { 38 ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value 39 Memcheck:Cond 40 fun: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 # Fedora's package "openssl-1.0.1-0.1.beta2.fc17.x86_64" on x86_64 314 # See http://bugs.python.org/issue14171 315 { 316 openssl 1.0.1 prng 1 317 Memcheck:Cond 318 fun:bcmp 319 fun:fips_get_entropy 320 fun:FIPS_drbg_instantiate 321 fun:RAND_init_fips 322 fun:OPENSSL_init_library 323 fun:SSL_library_init 324 fun:init_hashlib 325 } 326 327 { 328 openssl 1.0.1 prng 2 329 Memcheck:Cond 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 3 340 Memcheck:Value8 341 fun:_x86_64_AES_encrypt_compact 342 fun:AES_encrypt 343 } 344 345 # 346 # All of these problems come from using test_socket_ssl 347 # 348 { 349 from test_socket_ssl 350 Memcheck:Cond 351 fun:BN_bin2bn 352 } 353 354 { 355 from test_socket_ssl 356 Memcheck:Cond 357 fun:BN_num_bits_word 358 } 359 360 { 361 from test_socket_ssl 362 Memcheck:Value4 363 fun:BN_num_bits_word 364 } 365 366 { 367 from test_socket_ssl 368 Memcheck:Cond 369 fun:BN_mod_exp_mont_word 370 } 371 372 { 373 from test_socket_ssl 374 Memcheck:Cond 375 fun:BN_mod_exp_mont 376 } 377 378 { 379 from test_socket_ssl 380 Memcheck:Param 381 write(buf) 382 fun:write 383 obj:/usr/lib/libcrypto.so.0.9.7 384 } 385 386 { 387 from test_socket_ssl 388 Memcheck:Cond 389 fun:RSA_verify 390 } 391 392 { 393 from test_socket_ssl 394 Memcheck:Value4 395 fun:RSA_verify 396 } 397 398 { 399 from test_socket_ssl 400 Memcheck:Value4 401 fun:DES_set_key_unchecked 402 } 403 404 { 405 from test_socket_ssl 406 Memcheck:Value4 407 fun:DES_encrypt2 408 } 409 410 { 411 from test_socket_ssl 412 Memcheck:Cond 413 obj:/usr/lib/libssl.so.0.9.7 414 } 415 416 { 417 from test_socket_ssl 418 Memcheck:Value4 419 obj:/usr/lib/libssl.so.0.9.7 420 } 421 422 { 423 from test_socket_ssl 424 Memcheck:Cond 425 fun:BUF_MEM_grow_clean 426 } 427 428 { 429 from test_socket_ssl 430 Memcheck:Cond 431 fun:memcpy 432 fun:ssl3_read_bytes 433 } 434 435 { 436 from test_socket_ssl 437 Memcheck:Cond 438 fun:SHA1_Update 439 } 440 441 { 442 from test_socket_ssl 443 Memcheck:Value4 444 fun:SHA1_Update 445 } 446 447 { 448 test_buffer_non_debug 449 Memcheck:Addr4 450 fun:PyUnicodeUCS2_FSConverter 451 } 452 453 { 454 test_buffer_non_debug 455 Memcheck:Addr4 456 fun:PyUnicode_FSConverter 457 } 458 459 { 460 wcscmp_false_positive 461 Memcheck:Addr8 462 fun:wcscmp 463 fun:_PyOS_GetOpt 464 fun:Py_Main 465 fun:main 466 } 467 468 # Additional suppressions for the unified decimal tests: 469 { 470 test_decimal 471 Memcheck:Addr4 472 fun:PyUnicodeUCS2_FSConverter 473 } 474 475 { 476 test_decimal2 477 Memcheck:Addr4 478 fun:PyUnicode_FSConverter 479 } 480 481