Uh oh!
There was an error while loading. Please reload this page.
gh-123657: Fix crash and refleak in decimal.getcontext() - #123703
Conversation
neonene
commented
Sep 4, 2024
@ZeroIntensity Could you verify this fix? |
ZeroIntensity
commented
Sep 4, 2024
I can take a look in an hour or so. |
ZeroIntensity
left a comment
There was a problem hiding this comment.
Confirmed that this fixes the assertion failure, as well as the memory leak:
./python -Xshowrefcount -c "import decimal; decimal.getcontext()"
[0 refs, 0 blocks]
ZeroIntensity
commented
Sep 4, 2024
@encukou, this needs the 3.13 backport label. |
encukou
commented
Sep 5, 2024
This makes Since |
…honGH-123703) (cherry picked from commit 853588e) Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
GH-123774 is a backport of this pull request to the 3.13 branch. |
encukou
commented
Sep 6, 2024
Thanks! |
vstinner
commented
Sep 6, 2024
Thanks for this nice fix. It does fix this leak. Before: After (with this fix): cc @picnixz |
decimal.getcontextcrashes with--with-decimal-contextvar=noand-X showrefcount#123657