Issue 25725: Memory leak on unpickling bogus data (original) (raw)

Created on 2015-11-24 20:49 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
load_counted_tuple_leak.patch serhiy.storchaka,2015-11-24 20:49 review
pickle.patch vstinner,2015-11-24 22:42 review
Messages (6)
msg255289 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-11-24 20:49
New tests added in exposed memory leak on unpickling TUPLE1..TUPLE3 opcodes with insufficient stack. Proposed patch fixes the leak.
msg255290 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-11-24 20:51
$ ./python -m test.regrtest -R 3:3 -m test_bad_stack test_pickle [1/1] test_pickle beginning 6 repetitions 123456 ...... test_pickle leaked [20, 20, 20] references, sum=60 test_pickle leaked [12, 14, 14] memory blocks, sum=40 1 test failed: test_pickle
msg255295 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-11-24 22:42
Oh... I didn't notice that you wrote a patch :-) I started to write a similar patch: see attached pickle.patch.
msg255297 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-11-24 22:45
I reviewed load_counted_tuple_leak.patch. Forget my patch, Serhiy's patch is better.
msg255300 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-11-24 23:03
You patch is just the first version of my patch. :-) But tests are crashed with it.
msg255338 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-11-25 13:08
New changeset c85eca74f3a5 by Serhiy Storchaka in branch '3.4': Issue #25725: Fixed a reference leak in pickle.loads() when unpickling https://hg.python.org/cpython/rev/c85eca74f3a5 New changeset 88ad2b8480b1 by Serhiy Storchaka in branch '3.5': Issue #25725: Fixed a reference leak in pickle.loads() when unpickling https://hg.python.org/cpython/rev/88ad2b8480b1 New changeset 935debb548a3 by Serhiy Storchaka in branch 'default': Issue #25725: Fixed a reference leak in pickle.loads() when unpickling https://hg.python.org/cpython/rev/935debb548a3 New changeset 9a4db1ac5e10 by Serhiy Storchaka in branch '2.7': Issue #25725: Fixed a reference leak in cPickle.loads() when unpickling https://hg.python.org/cpython/rev/9a4db1ac5e10
History
Date User Action Args
2022-04-11 14:58:24 admin set github: 69911
2015-11-25 13:09:28 serhiy.storchaka set status: open -> closedresolution: fixedstage: patch review -> resolved
2015-11-25 13:08:53 python-dev set nosy: + python-devmessages: +
2015-11-24 23:03:24 serhiy.storchaka set messages: +
2015-11-24 22:45:12 vstinner set messages: +
2015-11-24 22:42:31 vstinner set files: + pickle.patchmessages: +
2015-11-24 20:51:45 serhiy.storchaka set messages: +
2015-11-24 20:50:19 vstinner set nosy: + vstinner
2015-11-24 20:49:41 serhiy.storchaka create