bpo-44856: Possible reference leak in error paths of update_bases() and __build_class__#27647
bpo-44856: Possible reference leak in error paths of update_bases() and __build_class__#27647ambv merged 2 commits intopython:mainfrom
Conversation
18f0d16 to
bfc121a
Compare
|
With this PR: |
|
This could have been a nightmare to track down since the leak happens in very old code that is quite complex but funny enough, I tracked this super efficiently with the memory profiler that allows to track Python and C at the same time I am building at work with my team: |
Misc/NEWS.d/next/Core and Builtins/2021-08-07-01-26-12.bpo-44856.9rk3li.rst
Outdated
Show resolved
Hide resolved
Fidget-Spinner
left a comment
There was a problem hiding this comment.
FWIW, I tested this on Windows and it also fixes the refleaks. Thanks Pablo, this LGTM.
python_d.exe -m test test_typing -R 3:3
0:00:00 Run tests sequentially
0:00:00 [1/1] test_typing
beginning 6 repetitions
123456
......
== Tests result: SUCCESS ==
1 test OK.
|
Thanks @pablogsal for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9, 3.10. |
|
Sorry @pablogsal and @ambv, I had trouble checking out the |
|
GH-27651 is a backport of this pull request to the 3.9 branch. |
|
GH-27652 is a backport of this pull request to the 3.8 branch. |
…nd __build_class__ (pythonGH-27647) (cherry picked from commit a40675c) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
Thanks @pablogsal for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
|
GH-27653 is a backport of this pull request to the 3.10 branch. |
…nd __build_class__ (pythonGH-27647) (cherry picked from commit a40675c) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

https://bugs.python.org/issue44856