You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_type_comments leaks references and memory blocks #80062
After some hours of debugging, I have identified the (possible) cause of the majority of the refleaks.
The type_comments created in ast.c with new_type_comment() never reaches 0 reference counts. This **seems** to be because the cleanup for the stmt_ty elements where the type_comments are included never call DECREF on these elements when destroyed unless I am missing something fundamental.
Activity
pablogsal commentedon Feb 1, 2019
The refleak buildbots have detected that test_type_comments is leaking references. Example failure:
https://buildbot.python.org/all/#/builders/1/builds/490/steps/4/logs/stdio
test_type_comments leaked [37, 37, 37] references, sum=111
test_type_comments leaked [11, 12, 11] memory blocks, sum=34
1 test failed again:
test_type_comments
Bisecting shows that PR11645 is the one that introduced the refleaks:
https://github.com/python/cpython/pull/11645/files#
After some hours of debugging, I have identified the (possible) cause of the majority of the refleaks.
The type_comments created in ast.c with new_type_comment() never reaches 0 reference counts. This **seems** to be because the cleanup for the stmt_ty elements where the type_comments are included never call DECREF on these elements when destroyed unless I am missing something fundamental.
tirkarthi commentedon Feb 1, 2019
This looks like the same as https://bugs.python.org/issue35879
vstinner commentedon Feb 1, 2019
Yeah, as usual Pablo is way too slow: he posted the same bug 1h30 after me.
pablogsal commentedon Feb 1, 2019
:(
vstinner commentedon Feb 1, 2019
I'm kidding :-) Sorry for not reviewing emails from buildbot-status.