valgrind-python.supp 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  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. # all tool names: Addrcheck,Memcheck,cachegrind,helgrind,massif
  18. {
  19. ADDRESS_IN_RANGE/Invalid read of size 4
  20. Memcheck:Addr4
  21. fun:address_in_range
  22. }
  23. {
  24. ADDRESS_IN_RANGE/Invalid read of size 4
  25. Memcheck:Value4
  26. fun:address_in_range
  27. }
  28. {
  29. ADDRESS_IN_RANGE/Invalid read of size 8 (x86_64 aka amd64)
  30. Memcheck:Value8
  31. fun:address_in_range
  32. }
  33. {
  34. ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
  35. Memcheck:Cond
  36. fun: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. ADDRESS_IN_RANGE/Invalid read of size 4
  118. Memcheck:Value4
  119. fun:_PyObject_Free
  120. }
  121. {
  122. ADDRESS_IN_RANGE/Use of uninitialised value of size 8
  123. Memcheck:Addr8
  124. fun:_PyObject_Free
  125. }
  126. {
  127. ADDRESS_IN_RANGE/Use of uninitialised value of size 8
  128. Memcheck:Value8
  129. fun:_PyObject_Free
  130. }
  131. {
  132. ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
  133. Memcheck:Cond
  134. fun:_PyObject_Free
  135. }
  136. {
  137. ADDRESS_IN_RANGE/Invalid read of size 4
  138. Memcheck:Addr4
  139. fun:_PyObject_Realloc
  140. }
  141. {
  142. ADDRESS_IN_RANGE/Invalid read of size 4
  143. Memcheck:Value4
  144. fun:_PyObject_Realloc
  145. }
  146. {
  147. ADDRESS_IN_RANGE/Use of uninitialised value of size 8
  148. Memcheck:Addr8
  149. fun:_PyObject_Realloc
  150. }
  151. {
  152. ADDRESS_IN_RANGE/Use of uninitialised value of size 8
  153. Memcheck:Value8
  154. fun:_PyObject_Realloc
  155. }
  156. {
  157. ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
  158. Memcheck:Cond
  159. fun:_PyObject_Realloc
  160. }
  161. ###
  162. ### All the suppressions below are for errors that occur within libraries
  163. ### that Python uses. The problems to not appear to be related to Python's
  164. ### use of the libraries.
  165. ###
  166. {
  167. Generic ubuntu ld problems
  168. Memcheck:Addr8
  169. obj:/lib/ld-2.4.so
  170. obj:/lib/ld-2.4.so
  171. obj:/lib/ld-2.4.so
  172. obj:/lib/ld-2.4.so
  173. }
  174. {
  175. Generic gentoo ld problems
  176. Memcheck:Cond
  177. obj:/lib/ld-2.3.4.so
  178. obj:/lib/ld-2.3.4.so
  179. obj:/lib/ld-2.3.4.so
  180. obj:/lib/ld-2.3.4.so
  181. }
  182. {
  183. DBM problems, see test_dbm
  184. Memcheck:Param
  185. write(buf)
  186. fun:write
  187. obj:/usr/lib/libdb1.so.2
  188. obj:/usr/lib/libdb1.so.2
  189. obj:/usr/lib/libdb1.so.2
  190. obj:/usr/lib/libdb1.so.2
  191. fun:dbm_close
  192. }
  193. {
  194. DBM problems, see test_dbm
  195. Memcheck:Value8
  196. fun:memmove
  197. obj:/usr/lib/libdb1.so.2
  198. obj:/usr/lib/libdb1.so.2
  199. obj:/usr/lib/libdb1.so.2
  200. obj:/usr/lib/libdb1.so.2
  201. fun:dbm_store
  202. fun:dbm_ass_sub
  203. }
  204. {
  205. DBM problems, see test_dbm
  206. Memcheck:Cond
  207. obj:/usr/lib/libdb1.so.2
  208. obj:/usr/lib/libdb1.so.2
  209. obj:/usr/lib/libdb1.so.2
  210. fun:dbm_store
  211. fun:dbm_ass_sub
  212. }
  213. {
  214. DBM problems, see test_dbm
  215. Memcheck:Cond
  216. fun:memmove
  217. obj:/usr/lib/libdb1.so.2
  218. obj:/usr/lib/libdb1.so.2
  219. obj:/usr/lib/libdb1.so.2
  220. obj:/usr/lib/libdb1.so.2
  221. fun:dbm_store
  222. fun:dbm_ass_sub
  223. }
  224. {
  225. GDBM problems, see test_gdbm
  226. Memcheck:Param
  227. write(buf)
  228. fun:write
  229. fun:gdbm_open
  230. }
  231. {
  232. Uninitialised byte(s) false alarm, see bpo-35561
  233. Memcheck:Param
  234. epoll_ctl(event)
  235. fun:epoll_ctl
  236. fun:pyepoll_internal_ctl
  237. }
  238. {
  239. ZLIB problems, see test_gzip
  240. Memcheck:Cond
  241. obj:/lib/libz.so.1.2.3
  242. obj:/lib/libz.so.1.2.3
  243. fun:deflate
  244. }
  245. {
  246. Avoid problems w/readline doing a putenv and leaking on exit
  247. Memcheck:Leak
  248. fun:malloc
  249. fun:xmalloc
  250. fun:sh_set_lines_and_columns
  251. fun:_rl_get_screen_size
  252. fun:_rl_init_terminal_io
  253. obj:/lib/libreadline.so.4.3
  254. fun:rl_initialize
  255. }
  256. # Valgrind emits "Conditional jump or move depends on uninitialised value(s)"
  257. # false alarms on GCC builtin strcmp() function. The GCC code is correct.
  258. #
  259. # Valgrind bug: https://bugs.kde.org/show_bug.cgi?id=264936
  260. {
  261. bpo-38118: Valgrind emits false alarm on GCC builtin strcmp()
  262. Memcheck:Cond
  263. fun:PyUnicode_Decode
  264. }
  265. ###
  266. ### These occur from somewhere within the SSL, when running
  267. ### test_socket_sll. They are too general to leave on by default.
  268. ###
  269. ###{
  270. ### somewhere in SSL stuff
  271. ### Memcheck:Cond
  272. ### fun:memset
  273. ###}
  274. ###{
  275. ### somewhere in SSL stuff
  276. ### Memcheck:Value4
  277. ### fun:memset
  278. ###}
  279. ###
  280. ###{
  281. ### somewhere in SSL stuff
  282. ### Memcheck:Cond
  283. ### fun:MD5_Update
  284. ###}
  285. ###
  286. ###{
  287. ### somewhere in SSL stuff
  288. ### Memcheck:Value4
  289. ### fun:MD5_Update
  290. ###}
  291. # Fedora's package "openssl-1.0.1-0.1.beta2.fc17.x86_64" on x86_64
  292. # See http://bugs.python.org/issue14171
  293. {
  294. openssl 1.0.1 prng 1
  295. Memcheck:Cond
  296. fun:bcmp
  297. fun:fips_get_entropy
  298. fun:FIPS_drbg_instantiate
  299. fun:RAND_init_fips
  300. fun:OPENSSL_init_library
  301. fun:SSL_library_init
  302. fun:init_hashlib
  303. }
  304. {
  305. openssl 1.0.1 prng 2
  306. Memcheck:Cond
  307. fun:fips_get_entropy
  308. fun:FIPS_drbg_instantiate
  309. fun:RAND_init_fips
  310. fun:OPENSSL_init_library
  311. fun:SSL_library_init
  312. fun:init_hashlib
  313. }
  314. {
  315. openssl 1.0.1 prng 3
  316. Memcheck:Value8
  317. fun:_x86_64_AES_encrypt_compact
  318. fun:AES_encrypt
  319. }
  320. #
  321. # All of these problems come from using test_socket_ssl
  322. #
  323. {
  324. from test_socket_ssl
  325. Memcheck:Cond
  326. fun:BN_bin2bn
  327. }
  328. {
  329. from test_socket_ssl
  330. Memcheck:Cond
  331. fun:BN_num_bits_word
  332. }
  333. {
  334. from test_socket_ssl
  335. Memcheck:Value4
  336. fun:BN_num_bits_word
  337. }
  338. {
  339. from test_socket_ssl
  340. Memcheck:Cond
  341. fun:BN_mod_exp_mont_word
  342. }
  343. {
  344. from test_socket_ssl
  345. Memcheck:Cond
  346. fun:BN_mod_exp_mont
  347. }
  348. {
  349. from test_socket_ssl
  350. Memcheck:Param
  351. write(buf)
  352. fun:write
  353. obj:/usr/lib/libcrypto.so.0.9.7
  354. }
  355. {
  356. from test_socket_ssl
  357. Memcheck:Cond
  358. fun:RSA_verify
  359. }
  360. {
  361. from test_socket_ssl
  362. Memcheck:Value4
  363. fun:RSA_verify
  364. }
  365. {
  366. from test_socket_ssl
  367. Memcheck:Value4
  368. fun:DES_set_key_unchecked
  369. }
  370. {
  371. from test_socket_ssl
  372. Memcheck:Value4
  373. fun:DES_encrypt2
  374. }
  375. {
  376. from test_socket_ssl
  377. Memcheck:Cond
  378. obj:/usr/lib/libssl.so.0.9.7
  379. }
  380. {
  381. from test_socket_ssl
  382. Memcheck:Value4
  383. obj:/usr/lib/libssl.so.0.9.7
  384. }
  385. {
  386. from test_socket_ssl
  387. Memcheck:Cond
  388. fun:BUF_MEM_grow_clean
  389. }
  390. {
  391. from test_socket_ssl
  392. Memcheck:Cond
  393. fun:memcpy
  394. fun:ssl3_read_bytes
  395. }
  396. {
  397. from test_socket_ssl
  398. Memcheck:Cond
  399. fun:SHA1_Update
  400. }
  401. {
  402. from test_socket_ssl
  403. Memcheck:Value4
  404. fun:SHA1_Update
  405. }
  406. {
  407. test_buffer_non_debug
  408. Memcheck:Addr4
  409. fun:PyUnicodeUCS2_FSConverter
  410. }
  411. {
  412. test_buffer_non_debug
  413. Memcheck:Addr4
  414. fun:PyUnicode_FSConverter
  415. }
  416. {
  417. wcscmp_false_positive
  418. Memcheck:Addr8
  419. fun:wcscmp
  420. fun:_PyOS_GetOpt
  421. fun:Py_Main
  422. fun:main
  423. }
  424. # Additional suppressions for the unified decimal tests:
  425. {
  426. test_decimal
  427. Memcheck:Addr4
  428. fun:PyUnicodeUCS2_FSConverter
  429. }
  430. {
  431. test_decimal2
  432. Memcheck:Addr4
  433. fun:PyUnicode_FSConverter
  434. }