bpo-40077: Fix potential refleaks of _json#19344
Conversation
|
@corona10 |
|
@pablogsal: Oh, that's an intersting bug. I consider that it should be backported to 3.7 and 3.8. |
vstinner
left a comment
There was a problem hiding this comment.
LGTM.
@pablogsal: Do you think that a NEWS entry is required for such fix?
Yes, as this may fix much more things that just a memory leak. If (unlikely) the memo gets into a ref cycle, some arbitrary set of objects may not be identified as a cycle and the leak will be considerable. This is a user-visible change: a potential leak that they may be experimenting should be no more, being the leak potentially unbounded. And yes, it should be backported. |
corona10
left a comment
There was a problem hiding this comment.
self.memo of PyScannerObject should be traversed too, right?
Nice catch it should be LGTM
|
Thanks @shihai1991 for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
|
Sorry, @shihai1991 and @vstinner, I could not cleanly backport this to |
|
Sorry @shihai1991 and @vstinner, I had trouble checking out the |
|
Thanks @shihai1991 for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
|
Sorry, @shihai1991 and @vstinner, I could not cleanly backport this to |
|
@shihai1991: @miss-islington failed to backport automatically the change, there is merge conflict. You can please backport the fix 3.7 and 3.8? You can use cherry_picker or |
https://bugs.python.org/issue40077