Skip to content
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

bpo-46430: fix memory leak in interned strings of deep-frozen modules #31549

Merged
merged 2 commits into from
Feb 24, 2022

Conversation

kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Feb 24, 2022

Valgrind log after fix:

==17044== 
==17044== HEAP SUMMARY:
==17044==     in use at exit: 0 bytes in 0 blocks
==17044==   total heap usage: 18,385 allocs, 18,385 frees, 2,558,621 bytes allocated
==17044== 
==17044== All heap blocks were freed -- no leaks are possible
==17044== 
==17044== Use --track-origins=yes to see where uninitialised values come from
==17044== For lists of detected and suppressed errors, rerun with: -s
==17044== ERROR SUMMARY: 39 errors from 11 contexts (suppressed: 0 from 0)

Python output:

@kumaraditya303 ➜ /workspaces/cpython (mem ✗) $ ./python -X showrefcount -c pass
[0 refs, 0 blocks]

https://bugs.python.org/issue46430

@kumaraditya303 kumaraditya303 changed the title bpo-46430: fix memory leak in interned deep-frozen modules bpo-46430: fix memory leak in interned strings of deep-frozen modules Feb 24, 2022
@kumaraditya303
Copy link
Contributor Author

cc @gvanrossum @vstinner

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM.

@vstinner
Copy link
Member

Merged, thanks.

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.

5 participants