Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bpo-40077: Fix potential refleaks of _json #19344

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

Merged
merged 3 commits into from
Apr 4, 2020

Conversation

shihai1991
Copy link
Member

@shihai1991 shihai1991 commented Apr 3, 2020

@shihai1991
Copy link
Member Author

@corona10 self.memo of PyScannerObject should be traversed too, right?

@vstinner
Copy link
Member

vstinner commented Apr 3, 2020

@pablogsal: Oh, that's an intersting bug. I consider that it should be backported to 3.7 and 3.8.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@pablogsal: Do you think that a NEWS entry is required for such fix?

@pablogsal
Copy link
Member

pablogsal commented Apr 3, 2020

@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.

Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.memo of PyScannerObject should be traversed too, right?

Nice catch it should be LGTM

@vstinner vstinner merged commit b709302 into python:master Apr 4, 2020
@miss-islington
Copy link
Contributor

Thanks @shihai1991 for the PR, and @vstinner for merging it ๐ŸŒฎ๐ŸŽ‰.. I'm working now to backport this PR to: 3.7, 3.8.
๐Ÿ๐Ÿ’โ›๐Ÿค–

@miss-islington
Copy link
Contributor

Sorry, @shihai1991 and @vstinner, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker b709302f3125622986bd458dfb2954fda5e8366d 3.8

@miss-islington
Copy link
Contributor

Sorry @shihai1991 and @vstinner, I had trouble checking out the 3.7 backport branch.
Please backport using cherry_picker on command line.
cherry_picker b709302f3125622986bd458dfb2954fda5e8366d 3.7

@miss-islington
Copy link
Contributor

Thanks @shihai1991 for the PR, and @vstinner for merging it ๐ŸŒฎ๐ŸŽ‰.. I'm working now to backport this PR to: 3.8.
๐Ÿ๐Ÿ’โ›๐Ÿค–

@miss-islington
Copy link
Contributor

Sorry, @shihai1991 and @vstinner, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker b709302f3125622986bd458dfb2954fda5e8366d 3.8

@vstinner
Copy link
Member

vstinner commented Apr 4, 2020

@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 git cherry-pick -x b709302f3125622986bd458dfb2954fda5e8366d. Tell me if you need help for the backport.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants