This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients louielu, vstinner, zvyn
Date 2017-06-07.16:51:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496854267.47.0.535239725089.issue30542@psf.upfronthosting.co.za>
In-reply-to
Content
I isolated the leak to attached bug.py script. Output:
---
haypo@selma$ ./python bug.py 
[ Top 10 differences ]
bug.py:40: size=6728 B (+6728 B), count=80 (+80), average=84 B
bug.py:46: size=2464 B (+2464 B), count=28 (+28), average=88 B
bug.py:43: size=2464 B (+2464 B), count=28 (+28), average=88 B
---

It seems like compiling a Python source to AST causes the leak. The Python source uses the following bytecodes:

 25         170 LOAD_DEREF               0 (trace)
            172 LOAD_METHOD              0 (append)
            174 LOAD_CONST               0 (None)
            176 CALL_METHOD              1
            178 POP_TOP

AST of the code:

Expr(value=Call(func=Attribute(value=Name(id='trace', ctx=Load()), attr='append', ctx=Load()), args=[NameConstant(value=None)], keywords=[]))
History
Date User Action Args
2017-06-07 16:51:07vstinnersetrecipients: + vstinner, zvyn, louielu
2017-06-07 16:51:07vstinnersetmessageid: <1496854267.47.0.535239725089.issue30542@psf.upfronthosting.co.za>
2017-06-07 16:51:07vstinnerlinkissue30542 messages
2017-06-07 16:51:07vstinnercreate