bpo-33622: Add checks for exceptions leaks in the garbage collector.#7126
bpo-33622: Add checks for exceptions leaks in the garbage collector.#7126serhiy-storchaka merged 3 commits into
Conversation
Failure in adding to gc.garbage is no longer fatal.
vstinner
left a comment
There was a problem hiding this comment.
LGTM.
My comments are just minor suggestions. The current change is good, if you want to apply it as it is.
Sorry, something went wrong.
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Thank you Victor! I hoped on your review.
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
The PR is now perfect :-D
Exception handling at the C level is hard :-( It's so easy to get it wrong (clear or replace the current exception by mistake). These assertions should help to detect such bugs earlier.
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
Still LGTM even with the latest change ;-)
Sorry, something went wrong.
|
I have replaced the assertion with this check because I have found few cases in the stdlib (very unlikely) in which |
Sorry, something went wrong.
Oh. It's a bug, right? Do you plan to open a new issue or write a fix for these bugs? If the bug is "very unlikely" and the case is now handled properly (error logged into stderr), maybe it's fine. |
Sorry, something went wrong.
|
I have opened three new issues for three possible cases of exceptions in |
Sorry, something went wrong.
Failure in adding to gc.garbage is no longer fatal.
https://bugs.python.org/issue33622