
report at bugs
Aug 12, 2012, 3:36 PM
Post #3 of 5
(105 views)
Permalink
|
|
[issue15632] regrtest.py: spurious leaks with -R option
[In reply to]
|
|
Stefan Krah added the comment: I'm attaching a test case. You're right, in test_buffer it's hard to reproduce but I've encountered the "leak" several times in the past months. Today I realized that the "leak" always occurred with format code 'c'. There's this passage in test_buffer: x = randrange(*fmtdict[mode][char]) if char == 'c': x = bytes(chr(x), 'latin1') After some head scratching I looked into regrtest.py and found the warm_char_cache() function. The whole thing makes sense: In each repetition of the refleak mode new characters can be added to the unicode_latin1 cache. So, you should be able to reproduce the issue: $ ./python -m test -uall -R 2:2 test_pseudo_leak [1/1] test_pseudo_leak beginning 4 repetitions 1234 .... test_pseudo_leak leaked [8, 8] references, sum=16 1 test failed: test_pseudo_leak [151225 refs] ---------- Added file: http://bugs.python.org/file26778/test_pseudo_leak.py _______________________________________ Python tracker <report [at] bugs> <http://bugs.python.org/issue15632> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|