Neal Norwitz | c3cd9df | 2004-06-06 19:58:40 +0000 | [diff] [blame] | 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 \ |
Georg Brandl | 1158a33 | 2009-06-04 09:30:30 +0000 | [diff] [blame] | 8 | # ./python -E ./Lib/test/regrtest.py -u gui,network |
Neal Norwitz | c3cd9df | 2004-06-06 19:58:40 +0000 | [diff] [blame] | 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 | { |
Neal Norwitz | 497b19a | 2005-11-13 18:58:32 +0000 | [diff] [blame] | 32 | ADDRESS_IN_RANGE/Invalid read of size 8 (x86_64 aka amd64) |
Neal Norwitz | 76390de | 2005-10-03 07:46:34 +0000 | [diff] [blame] | 33 | Memcheck:Value8 |
| 34 | fun:Py_ADDRESS_IN_RANGE |
| 35 | } |
| 36 | |
| 37 | { |
Neal Norwitz | c3cd9df | 2004-06-06 19:58:40 +0000 | [diff] [blame] | 38 | ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value |
| 39 | Memcheck:Cond |
| 40 | fun:Py_ADDRESS_IN_RANGE |
| 41 | } |
| 42 | |
Neal Norwitz | 497b19a | 2005-11-13 18:58:32 +0000 | [diff] [blame] | 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 | { |
Neal Norwitz | 2f99b24 | 2008-08-24 05:48:10 +0000 | [diff] [blame] | 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 | { |
Neal Norwitz | 497b19a | 2005-11-13 18:58:32 +0000 | [diff] [blame] | 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 | |
Neal Norwitz | c3cd9df | 2004-06-06 19:58:40 +0000 | [diff] [blame] | 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/Conditional jump or move depends on uninitialised value |
| 141 | ### Memcheck:Cond |
| 142 | ### fun:PyObject_Free |
| 143 | ###} |
| 144 | |
| 145 | ###{ |
| 146 | ### ADDRESS_IN_RANGE/Invalid read of size 4 |
| 147 | ### Memcheck:Addr4 |
| 148 | ### fun:PyObject_Realloc |
| 149 | ###} |
| 150 | ### |
| 151 | ###{ |
| 152 | ### ADDRESS_IN_RANGE/Invalid read of size 4 |
| 153 | ### Memcheck:Value4 |
| 154 | ### fun:PyObject_Realloc |
| 155 | ###} |
| 156 | ### |
| 157 | ###{ |
| 158 | ### ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value |
| 159 | ### Memcheck:Cond |
| 160 | ### fun:PyObject_Realloc |
| 161 | ###} |
| 162 | |
| 163 | ### |
| 164 | ### All the suppressions below are for errors that occur within libraries |
| 165 | ### that Python uses. The problems to not appear to be related to Python's |
| 166 | ### use of the libraries. |
| 167 | ### |
Neal Norwitz | 497b19a | 2005-11-13 18:58:32 +0000 | [diff] [blame] | 168 | |
| 169 | { |
Guido van Rossum | cd16bf6 | 2007-06-13 18:07:49 +0000 | [diff] [blame] | 170 | Generic ubuntu ld problems |
| 171 | Memcheck:Addr8 |
| 172 | obj:/lib/ld-2.4.so |
| 173 | obj:/lib/ld-2.4.so |
| 174 | obj:/lib/ld-2.4.so |
| 175 | obj:/lib/ld-2.4.so |
| 176 | } |
| 177 | |
| 178 | { |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 179 | Generic gentoo ld problems |
| 180 | Memcheck:Cond |
| 181 | obj:/lib/ld-2.3.4.so |
| 182 | obj:/lib/ld-2.3.4.so |
| 183 | obj:/lib/ld-2.3.4.so |
| 184 | obj:/lib/ld-2.3.4.so |
| 185 | } |
| 186 | |
| 187 | { |
Neal Norwitz | 497b19a | 2005-11-13 18:58:32 +0000 | [diff] [blame] | 188 | DBM problems, see test_dbm |
| 189 | Memcheck:Param |
| 190 | write(buf) |
| 191 | fun:write |
| 192 | obj:/usr/lib/libdb1.so.2 |
| 193 | obj:/usr/lib/libdb1.so.2 |
| 194 | obj:/usr/lib/libdb1.so.2 |
| 195 | obj:/usr/lib/libdb1.so.2 |
| 196 | fun:dbm_close |
| 197 | } |
| 198 | |
| 199 | { |
| 200 | DBM problems, see test_dbm |
| 201 | Memcheck:Value8 |
| 202 | fun:memmove |
| 203 | obj:/usr/lib/libdb1.so.2 |
| 204 | obj:/usr/lib/libdb1.so.2 |
| 205 | obj:/usr/lib/libdb1.so.2 |
| 206 | obj:/usr/lib/libdb1.so.2 |
| 207 | fun:dbm_store |
| 208 | fun:dbm_ass_sub |
| 209 | } |
| 210 | |
| 211 | { |
| 212 | DBM problems, see test_dbm |
| 213 | Memcheck:Cond |
| 214 | obj:/usr/lib/libdb1.so.2 |
| 215 | obj:/usr/lib/libdb1.so.2 |
| 216 | obj:/usr/lib/libdb1.so.2 |
| 217 | fun:dbm_store |
| 218 | fun:dbm_ass_sub |
| 219 | } |
| 220 | |
| 221 | { |
| 222 | DBM problems, see test_dbm |
| 223 | Memcheck:Cond |
| 224 | fun:memmove |
| 225 | obj:/usr/lib/libdb1.so.2 |
| 226 | obj:/usr/lib/libdb1.so.2 |
| 227 | obj:/usr/lib/libdb1.so.2 |
| 228 | obj:/usr/lib/libdb1.so.2 |
| 229 | fun:dbm_store |
| 230 | fun:dbm_ass_sub |
| 231 | } |
| 232 | |
Neal Norwitz | c3cd9df | 2004-06-06 19:58:40 +0000 | [diff] [blame] | 233 | { |
| 234 | GDBM problems, see test_gdbm |
| 235 | Memcheck:Param |
| 236 | write(buf) |
| 237 | fun:write |
| 238 | fun:gdbm_open |
| 239 | |
| 240 | } |
| 241 | |
Neal Norwitz | 76390de | 2005-10-03 07:46:34 +0000 | [diff] [blame] | 242 | { |
Neal Norwitz | 497b19a | 2005-11-13 18:58:32 +0000 | [diff] [blame] | 243 | ZLIB problems, see test_gzip |
Neal Norwitz | 76390de | 2005-10-03 07:46:34 +0000 | [diff] [blame] | 244 | Memcheck:Cond |
Neal Norwitz | 497b19a | 2005-11-13 18:58:32 +0000 | [diff] [blame] | 245 | obj:/lib/libz.so.1.2.3 |
| 246 | obj:/lib/libz.so.1.2.3 |
| 247 | fun:deflate |
Neal Norwitz | 76390de | 2005-10-03 07:46:34 +0000 | [diff] [blame] | 248 | } |
| 249 | |
| 250 | { |
| 251 | Avoid problems w/readline doing a putenv and leaking on exit |
| 252 | Memcheck:Leak |
| 253 | fun:malloc |
| 254 | fun:xmalloc |
| 255 | fun:sh_set_lines_and_columns |
| 256 | fun:_rl_get_screen_size |
| 257 | fun:_rl_init_terminal_io |
| 258 | obj:/lib/libreadline.so.4.3 |
| 259 | fun:rl_initialize |
Neal Norwitz | 76390de | 2005-10-03 07:46:34 +0000 | [diff] [blame] | 260 | } |
| 261 | |
Neal Norwitz | c3cd9df | 2004-06-06 19:58:40 +0000 | [diff] [blame] | 262 | ### |
| 263 | ### These occur from somewhere within the SSL, when running |
| 264 | ### test_socket_sll. They are too general to leave on by default. |
| 265 | ### |
| 266 | ###{ |
| 267 | ### somewhere in SSL stuff |
| 268 | ### Memcheck:Cond |
| 269 | ### fun:memset |
| 270 | ###} |
| 271 | ###{ |
| 272 | ### somewhere in SSL stuff |
| 273 | ### Memcheck:Value4 |
| 274 | ### fun:memset |
| 275 | ###} |
| 276 | ### |
| 277 | ###{ |
| 278 | ### somewhere in SSL stuff |
| 279 | ### Memcheck:Cond |
| 280 | ### fun:MD5_Update |
| 281 | ###} |
| 282 | ### |
| 283 | ###{ |
| 284 | ### somewhere in SSL stuff |
| 285 | ### Memcheck:Value4 |
| 286 | ### fun:MD5_Update |
| 287 | ###} |
| 288 | |
| 289 | # |
| 290 | # All of these problems come from using test_socket_ssl |
| 291 | # |
| 292 | { |
| 293 | from test_socket_ssl |
| 294 | Memcheck:Cond |
| 295 | fun:BN_bin2bn |
| 296 | } |
| 297 | |
| 298 | { |
| 299 | from test_socket_ssl |
| 300 | Memcheck:Cond |
| 301 | fun:BN_num_bits_word |
| 302 | } |
| 303 | |
| 304 | { |
| 305 | from test_socket_ssl |
| 306 | Memcheck:Value4 |
| 307 | fun:BN_num_bits_word |
| 308 | } |
| 309 | |
| 310 | { |
| 311 | from test_socket_ssl |
| 312 | Memcheck:Cond |
| 313 | fun:BN_mod_exp_mont_word |
| 314 | } |
| 315 | |
| 316 | { |
| 317 | from test_socket_ssl |
| 318 | Memcheck:Cond |
| 319 | fun:BN_mod_exp_mont |
| 320 | } |
| 321 | |
| 322 | { |
| 323 | from test_socket_ssl |
| 324 | Memcheck:Param |
| 325 | write(buf) |
| 326 | fun:write |
| 327 | obj:/usr/lib/libcrypto.so.0.9.7 |
| 328 | } |
| 329 | |
| 330 | { |
| 331 | from test_socket_ssl |
| 332 | Memcheck:Cond |
| 333 | fun:RSA_verify |
| 334 | } |
| 335 | |
| 336 | { |
| 337 | from test_socket_ssl |
| 338 | Memcheck:Value4 |
| 339 | fun:RSA_verify |
| 340 | } |
| 341 | |
| 342 | { |
| 343 | from test_socket_ssl |
| 344 | Memcheck:Value4 |
| 345 | fun:DES_set_key_unchecked |
| 346 | } |
| 347 | |
| 348 | { |
| 349 | from test_socket_ssl |
| 350 | Memcheck:Value4 |
| 351 | fun:DES_encrypt2 |
| 352 | } |
| 353 | |
| 354 | { |
| 355 | from test_socket_ssl |
| 356 | Memcheck:Cond |
| 357 | obj:/usr/lib/libssl.so.0.9.7 |
| 358 | } |
| 359 | |
| 360 | { |
| 361 | from test_socket_ssl |
| 362 | Memcheck:Value4 |
| 363 | obj:/usr/lib/libssl.so.0.9.7 |
| 364 | } |
| 365 | |
| 366 | { |
| 367 | from test_socket_ssl |
| 368 | Memcheck:Cond |
| 369 | fun:BUF_MEM_grow_clean |
| 370 | } |
| 371 | |
| 372 | { |
| 373 | from test_socket_ssl |
| 374 | Memcheck:Cond |
| 375 | fun:memcpy |
| 376 | fun:ssl3_read_bytes |
| 377 | } |
| 378 | |
| 379 | { |
| 380 | from test_socket_ssl |
| 381 | Memcheck:Cond |
| 382 | fun:SHA1_Update |
| 383 | } |
| 384 | |
| 385 | { |
| 386 | from test_socket_ssl |
| 387 | Memcheck:Value4 |
| 388 | fun:SHA1_Update |
| 389 | } |
| 390 | |
| 391 | |