-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
bpo-44856: Possible reference leak in error paths of update_bases() and __build_class__ #27647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
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 <[email protected]>
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 <[email protected]>
…nd __build_class__ (GH-27647) (GH-27652) (cherry picked from commit a40675c) Co-authored-by: Pablo Galindo Salgado <[email protected]>
…nd __build_class__ (GH-27647) (GH-27651) (cherry picked from commit a40675c) Co-authored-by: Pablo Galindo Salgado <[email protected]>
…nd __build_class__ (GH-27647) (cherry picked from commit a40675c) Co-authored-by: Pablo Galindo Salgado <[email protected]>
https://bugs.python.org/issue44856