[issue27981] Reference leak in fp_setreadl() of Parser/tokenizer.c

2016-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2be31da53dcc by Benjamin Peterson in branch '3.5': restructure fp_setreadl so as to avoid refleaks (closes #27981) https://hg.python.org/cpython/rev/2be31da53dcc New changeset 4ac3de437100 by Benjamin Peterson in branch '3.6': merge 3.5 (#27981) htt

[issue27981] Reference leak in fp_setreadl() of Parser/tokenizer.c

2016-09-12 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, David! -- components: +Interpreter Core nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.5, Python 3.7 ___ Python tracke

[issue27981] Reference leak in fp_setreadl() of Parser/tokenizer.c

2016-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset aa88456f1749 by Berker Peksag in branch '3.5': Issue #27981: Fix refleak in fp_setreadl() https://hg.python.org/cpython/rev/aa88456f1749 New changeset 095c77323a6e by Berker Peksag in branch '3.6': Issue #27981: Merge from 3.5 https://hg.python.org/

[issue27981] Reference leak in fp_setreadl() of Parser/tokenizer.c

2016-09-12 Thread David Dudson (BigDaveNz)
David Dudson (BigDaveNz) added the comment: Please find a fix attached. This applies cleanly to 3.5/3.6/3.7 but not 2.7 Ran tests on 3.7 (master branch HEAD) only. -- keywords: +patch nosy: +David Dudson (BigDaveNz) Added file: http://bugs.python.org/file44614/0001-Issue-27981-Prevent

[issue27981] Reference leak in fp_setreadl() of Parser/tokenizer.c

2016-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, you are right, there is a leak. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue27981] Reference leak in fp_setreadl() of Parser/tokenizer.c

2016-09-06 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: > No, readline is borrowed reference. My question is one the function call result. What if it is not NULL: I don't see any DECREF. -- ___ Python tracker

[issue27981] Reference leak in fp_setreadl() of Parser/tokenizer.c

2016-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, readline is borrowed reference. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-b

[issue27981] Reference leak in fp_setreadl() of Parser/tokenizer.c

2016-09-06 Thread STINNER Victor
New submission from STINNER Victor: Does the following function call leaks a reference? if (PyObject_CallObject(readline, NULL) == NULL) { readline = NULL; goto cleanup; } -- messages: 274622 nosy: haypo priority: normal severity: normal status: o