Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.3k
gh-146250: Fix memory leak in re-initialization ofSyntaxError#146251
gh-146250: Fix memory leak in re-initialization ofSyntaxError#146251bkap123 wants to merge 6 commits intopython:mainfrom
SyntaxError#146251Conversation
Added `Py_XDECREF`/`Py_XSETREF` to avoid a memory leak when calling`SyntaxError.__init__`.
Misc/NEWS.d/next/Core_and_Builtins/2026-03-21-11-55-16.gh-issue-146250.ahl3O2.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: AN Long <aisk@users.noreply.github.com>Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz commentedMar 21, 2026
Sorry about the Py_CLEAR suggestion but I think creating new variables would be cleaner. |
bkap123 commentedMar 21, 2026
What's wrong with using |
picnixz commentedMar 21, 2026
I think it is just better to hold temp vars and use XSETREF like in |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
picnixz commentedMar 21, 2026
I will test the refleak bots so don't commit anything until they are done! |
bedevere-bot commentedMar 21, 2026
🤖 New build scheduled with the buildbot fleet by@picnixz for commit22cff11 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F146251%2Fmerge If you want to schedule another build, you need to add the🔨 test-with-refleak-buildbots label again. |
Uh oh!
There was an error while loading.Please reload this page.
Added
Py_XDECREF/Py_XSETREFto avoid a memory leak when callingSyntaxError.__init__.SyntaxError.__init__memory leak on re-initialization #146250