valgrind-python.supp 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  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 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. # all tool names: Addrcheck,Memcheck,cachegrind,helgrind,massif
  18. {
  19. ADDRESS_IN_RANGE/Invalid read of size 4
  20. Memcheck:Addr4
  21. fun:Py_ADDRESS_IN_RANGE
  22. }
  23. {
  24. ADDRESS_IN_RANGE/Invalid read of size 4
  25. Memcheck:Value4
  26. fun:Py_ADDRESS_IN_RANGE
  27. }
  28. {
  29. ADDRESS_IN_RANGE/Invalid read of size 8 (x86_64 aka amd64)
  30. Memcheck:Value8
  31. fun:Py_ADDRESS_IN_RANGE
  32. }
  33. {
  34. ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
  35. Memcheck:Cond
  36. fun:Py_ADDRESS_IN_RANGE
  37. }
  38. #
  39. # Leaks (including possible leaks)
  40. # Hmmm, I wonder if this masks some real leaks. I think it does.
  41. # Will need to fix that.
  42. #
  43. {
  44. Suppress leaking the GIL. Happens once per process, see comment in ceval.c.
  45. Memcheck:Leak
  46. fun:malloc
  47. fun:PyThread_allocate_lock
  48. fun:PyEval_InitThreads
  49. }
  50. {
  51. Suppress leaking the GIL after a fork.
  52. Memcheck:Leak
  53. fun:malloc
  54. fun:PyThread_allocate_lock
  55. fun:PyEval_ReInitThreads
  56. }
  57. {
  58. Suppress leaking the autoTLSkey. This looks like it shouldn't leak though.
  59. Memcheck:Leak
  60. fun:malloc
  61. fun:PyThread_create_key
  62. fun:_PyGILState_Init
  63. fun:Py_InitializeEx
  64. fun:Py_Main
  65. }
  66. {
  67. Hmmm, is this a real leak or like the GIL?
  68. Memcheck:Leak
  69. fun:malloc
  70. fun:PyThread_ReInitTLS
  71. }
  72. {
  73. Handle PyMalloc confusing valgrind (possibly leaked)
  74. Memcheck:Leak
  75. fun:realloc
  76. fun:_PyObject_GC_Resize
  77. fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
  78. }
  79. {
  80. Handle PyMalloc confusing valgrind (possibly leaked)
  81. Memcheck:Leak
  82. fun:malloc
  83. fun:_PyObject_GC_New
  84. fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
  85. }
  86. {
  87. Handle PyMalloc confusing valgrind (possibly leaked)
  88. Memcheck:Leak
  89. fun:malloc
  90. fun:_PyObject_GC_NewVar
  91. fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
  92. }
  93. #
  94. # Non-python specific leaks
  95. #
  96. {
  97. Handle pthread issue (possibly leaked)
  98. Memcheck:Leak
  99. fun:calloc
  100. fun:allocate_dtv
  101. fun:_dl_allocate_tls_storage
  102. fun:_dl_allocate_tls
  103. }
  104. {
  105. Handle pthread issue (possibly leaked)
  106. Memcheck:Leak
  107. fun:memalign
  108. fun:_dl_allocate_tls_storage
  109. fun:_dl_allocate_tls
  110. }
  111. ###{
  112. ### ADDRESS_IN_RANGE/Invalid read of size 4
  113. ### Memcheck:Addr4
  114. ### fun:PyObject_Free
  115. ###}
  116. ###
  117. ###{
  118. ### ADDRESS_IN_RANGE/Invalid read of size 4
  119. ### Memcheck:Value4
  120. ### fun:PyObject_Free
  121. ###}
  122. ###
  123. ###{
  124. ### ADDRESS_IN_RANGE/Use of uninitialised value of size 8
  125. ### Memcheck:Addr8
  126. ### fun:PyObject_Free
  127. ###}
  128. ###
  129. ###{
  130. ### ADDRESS_IN_RANGE/Use of uninitialised value of size 8
  131. ### Memcheck:Value8
  132. ### fun:PyObject_Free
  133. ###}
  134. ###
  135. ###{
  136. ### ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
  137. ### Memcheck:Cond
  138. ### fun:PyObject_Free
  139. ###}
  140. ###{
  141. ### ADDRESS_IN_RANGE/Invalid read of size 4
  142. ### Memcheck:Addr4
  143. ### fun:PyObject_Realloc
  144. ###}
  145. ###
  146. ###{
  147. ### ADDRESS_IN_RANGE/Invalid read of size 4
  148. ### Memcheck:Value4
  149. ### fun:PyObject_Realloc
  150. ###}
  151. ###
  152. ###{
  153. ### ADDRESS_IN_RANGE/Use of uninitialised value of size 8
  154. ### Memcheck:Addr8
  155. ### fun:PyObject_Realloc
  156. ###}
  157. ###
  158. ###{
  159. ### ADDRESS_IN_RANGE/Use of uninitialised value of size 8
  160. ### Memcheck:Value8
  161. ### fun:PyObject_Realloc
  162. ###}
  163. ###
  164. ###{
  165. ### ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
  166. ### Memcheck:Cond
  167. ### fun:PyObject_Realloc
  168. ###}
  169. ###
  170. ### All the suppressions below are for errors that occur within libraries
  171. ### that Python uses. The problems to not appear to be related to Python's
  172. ### use of the libraries.
  173. ###
  174. {
  175. Generic ubuntu ld problems
  176. Memcheck:Addr8
  177. obj:/lib/ld-2.4.so
  178. obj:/lib/ld-2.4.so
  179. obj:/lib/ld-2.4.so
  180. obj:/lib/ld-2.4.so
  181. }
  182. {
  183. Generic gentoo ld problems
  184. Memcheck:Cond
  185. obj:/lib/ld-2.3.4.so
  186. obj:/lib/ld-2.3.4.so
  187. obj:/lib/ld-2.3.4.so
  188. obj:/lib/ld-2.3.4.so
  189. }
  190. {
  191. DBM problems, see test_dbm
  192. Memcheck:Param
  193. write(buf)
  194. fun:write
  195. obj:/usr/lib/libdb1.so.2
  196. obj:/usr/lib/libdb1.so.2
  197. obj:/usr/lib/libdb1.so.2
  198. obj:/usr/lib/libdb1.so.2
  199. fun:dbm_close
  200. }
  201. {
  202. DBM problems, see test_dbm
  203. Memcheck:Value8
  204. fun:memmove
  205. obj:/usr/lib/libdb1.so.2
  206. obj:/usr/lib/libdb1.so.2
  207. obj:/usr/lib/libdb1.so.2
  208. obj:/usr/lib/libdb1.so.2
  209. fun:dbm_store
  210. fun:dbm_ass_sub
  211. }
  212. {
  213. DBM problems, see test_dbm
  214. Memcheck:Cond
  215. obj:/usr/lib/libdb1.so.2
  216. obj:/usr/lib/libdb1.so.2
  217. obj:/usr/lib/libdb1.so.2
  218. fun:dbm_store
  219. fun:dbm_ass_sub
  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. {
  233. GDBM problems, see test_gdbm
  234. Memcheck:Param
  235. write(buf)
  236. fun:write
  237. fun:gdbm_open
  238. }
  239. {
  240. ZLIB problems, see test_gzip
  241. Memcheck:Cond
  242. obj:/lib/libz.so.1.2.3
  243. obj:/lib/libz.so.1.2.3
  244. fun:deflate
  245. }
  246. {
  247. Avoid problems w/readline doing a putenv and leaking on exit
  248. Memcheck:Leak
  249. fun:malloc
  250. fun:xmalloc
  251. fun:sh_set_lines_and_columns
  252. fun:_rl_get_screen_size
  253. fun:_rl_init_terminal_io
  254. obj:/lib/libreadline.so.4.3
  255. fun:rl_initialize
  256. }
  257. ###
  258. ### These occur from somewhere within the SSL, when running
  259. ### test_socket_sll. They are too general to leave on by default.
  260. ###
  261. ###{
  262. ### somewhere in SSL stuff
  263. ### Memcheck:Cond
  264. ### fun:memset
  265. ###}
  266. ###{
  267. ### somewhere in SSL stuff
  268. ### Memcheck:Value4
  269. ### fun:memset
  270. ###}
  271. ###
  272. ###{
  273. ### somewhere in SSL stuff
  274. ### Memcheck:Cond
  275. ### fun:MD5_Update
  276. ###}
  277. ###
  278. ###{
  279. ### somewhere in SSL stuff
  280. ### Memcheck:Value4
  281. ### fun:MD5_Update
  282. ###}
  283. # Fedora's package "openssl-1.0.1-0.1.beta2.fc17.x86_64" on x86_64
  284. # See http://bugs.python.org/issue14171
  285. {
  286. openssl 1.0.1 prng 1
  287. Memcheck:Cond
  288. fun:bcmp
  289. fun:fips_get_entropy
  290. fun:FIPS_drbg_instantiate
  291. fun:RAND_init_fips
  292. fun:OPENSSL_init_library
  293. fun:SSL_library_init
  294. fun:init_hashlib
  295. }
  296. {
  297. openssl 1.0.1 prng 2
  298. Memcheck:Cond
  299. fun:fips_get_entropy
  300. fun:FIPS_drbg_instantiate
  301. fun:RAND_init_fips
  302. fun:OPENSSL_init_library
  303. fun:SSL_library_init
  304. fun:init_hashlib
  305. }
  306. {
  307. openssl 1.0.1 prng 3
  308. Memcheck:Value8
  309. fun:_x86_64_AES_encrypt_compact
  310. fun:AES_encrypt
  311. }
  312. #
  313. # All of these problems come from using test_socket_ssl
  314. #
  315. {
  316. from test_socket_ssl
  317. Memcheck:Cond
  318. fun:BN_bin2bn
  319. }
  320. {
  321. from test_socket_ssl
  322. Memcheck:Cond
  323. fun:BN_num_bits_word
  324. }
  325. {
  326. from test_socket_ssl
  327. Memcheck:Value4
  328. fun:BN_num_bits_word
  329. }
  330. {
  331. from test_socket_ssl
  332. Memcheck:Cond
  333. fun:BN_mod_exp_mont_word
  334. }
  335. {
  336. from test_socket_ssl
  337. Memcheck:Cond
  338. fun:BN_mod_exp_mont
  339. }
  340. {
  341. from test_socket_ssl
  342. Memcheck:Param
  343. write(buf)
  344. fun:write
  345. obj:/usr/lib/libcrypto.so.0.9.7
  346. }
  347. {
  348. from test_socket_ssl
  349. Memcheck:Cond
  350. fun:RSA_verify
  351. }
  352. {
  353. from test_socket_ssl
  354. Memcheck:Value4
  355. fun:RSA_verify
  356. }
  357. {
  358. from test_socket_ssl
  359. Memcheck:Value4
  360. fun:DES_set_key_unchecked
  361. }
  362. {
  363. from test_socket_ssl
  364. Memcheck:Value4
  365. fun:DES_encrypt2
  366. }
  367. {
  368. from test_socket_ssl
  369. Memcheck:Cond
  370. obj:/usr/lib/libssl.so.0.9.7
  371. }
  372. {
  373. from test_socket_ssl
  374. Memcheck:Value4
  375. obj:/usr/lib/libssl.so.0.9.7
  376. }
  377. {
  378. from test_socket_ssl
  379. Memcheck:Cond
  380. fun:BUF_MEM_grow_clean
  381. }
  382. {
  383. from test_socket_ssl
  384. Memcheck:Cond
  385. fun:memcpy
  386. fun:ssl3_read_bytes
  387. }
  388. {
  389. from test_socket_ssl
  390. Memcheck:Cond
  391. fun:SHA1_Update
  392. }
  393. {
  394. from test_socket_ssl
  395. Memcheck:Value4
  396. fun:SHA1_Update
  397. }
  398. {
  399. test_buffer_non_debug
  400. Memcheck:Addr4
  401. fun:PyUnicodeUCS2_FSConverter
  402. }
  403. {
  404. test_buffer_non_debug
  405. Memcheck:Addr4
  406. fun:PyUnicode_FSConverter
  407. }
  408. # Additional suppressions for the unified decimal tests:
  409. {
  410. test_decimal
  411. Memcheck:Addr4
  412. fun:PyUnicodeUCS2_FSConverter
  413. }
  414. {
  415. test_decimal2
  416. Memcheck:Addr4
  417. fun:PyUnicode_FSConverter
  418. }