[issue43779] Fix possible parser/AST ref leaks

2021-04-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43779] Fix possible parser/AST ref leaks

2021-04-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 76d270ec2b776cc5331935cc58c2d63622f1c0e9 by Erlend Egeberg Aasland in branch '3.9': [3.9] bpo-43779: Fix possible refleak involving _PyArena_AddPyObject (GH-25289). (GH-25294) https://github.com/python/cpython/commit/76d270ec2b776cc53319

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +24030 pull_request: https://github.com/python/cpython/pull/25294 ___ Python tracker ___ __

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: +1 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: We could also adjust Parser/asdl_c.py to decref right after a failed _PyArena_AddPyObject() call, instead of goto failure and Py_XDECREF. I'm not sure it's worth it though. -- Added file: https://bugs.python.org/file49944/parser.diff ___

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > We could also adjust Parser/asdl_c.py to decref right after a failed > _PyArena_AddPyObject() call, instead of goto failure and Py_XDECREF. I'm not > sure it's worth it though. I normally recommend having the least amount of exist paths possible, ma

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +24024 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25289 ___ Python tracker ___ __

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Yes, I'll do that. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Ah, I see that the Parser/asdl_c.py case is handled by the callers. So that leaves only Parser/pegen.c. -- ___ Python tracker ___ __

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks Erlend. Mind creating a PR from the patch? -- ___ Python tracker ___ ___ Python-bug

[issue43779] Fix possible parser/AST ref leaks

2021-04-08 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- title: Fix possible _PyArena_AddPyObject ref leaks -> Fix possible parser/AST ref leaks ___ Python tracker ___ __