python3.supp 8.7 KB

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