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 <>
I isolated the leak to attached script. Output:
haypo@selma$ ./python 
[ Top 10 differences ] size=6728 B (+6728 B), count=80 (+80), average=84 B size=2464 B (+2464 B), count=28 (+28), average=88 B 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=[]))
Date User Action Args
2017-06-07 16:51:07vstinnersetrecipients: + vstinner, zvyn, louielu
2017-06-07 16:51:07vstinnersetmessageid: <>
2017-06-07 16:51:07vstinnerlinkissue30542 messages
2017-06-07 16:51:07vstinnercreate