-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
[3.11] gh-111942: Remove an extra incref in textiowrapper_change_encoding #126542
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
Conversation
…e_encoding There's an issue with the 3.11 backport commit e2421a3 The chane for the main branch was: ```diff + Py_INCREF(errors); ... Py_SETREF(self->encoding, encoding); - Py_SETREF(self->errors, Py_NewRef(errors)); + Py_SETREF(self->errors, errors); ``` but in 3.11 this became: ```diff + Py_INCREF(errors); ... Py_INCREF(errors); Py_SETREF(self->encoding, encoding); Py_SETREF(self->errors, errors); ``` i.e. there's an extra incref, but it looks -- at least to Git -- like the change that removes `Py_NewRef` was already applied. This was not caught because `test_io` refleaks tests were ineffective on 3.11 (see python#126478 (comment)). Remove the extraneous incref.
(stepping out for a bit, then I'll start the buildbots on this after GHA runs.) |
!buildbot AMD64 Windows11 Refleaks |
The failing builds are unstable (Alpine, Usan, Valgrind, FIPS, AIX), not meant for 3.10 (Android, iOS, WASI, NoGIL, bigmem/extralargefile), flaky (s390x RHEL8 Refleaks, PPC64LE Fedora), or show an unrelated problem ( |
Thanks @encukou! I think it makes sense to land it so I went ahead |
Thank you! The buildbots have recovered :) |
A recent test fix uncovered a refleak that went in 3.11 on November due to a Git mis-merge.
So, @pablogsal, here's a RM decision for you. (Not time-sensitive, of course.)
This is not a security issue, but it should fix failing buildbots. (The other way to fix them would be to revert the change that uncovered the issue, which would mean we probably won't notice future refleaks in
test_io
.)There's an issue with the 3.11 backport commit e2421a3 The change for the main branch was:
but in 3.11 this became:
+ Py_INCREF(errors); ... Py_INCREF(errors); Py_SETREF(self->encoding, encoding); Py_SETREF(self->errors, errors);
i.e. there's an extra incref, but it looks -- at least to Git -- like the change that removes
Py_NewRef
was already applied.This was not caught because
test_io
refleaks tests were ineffective on 3.11 (see #126478 (comment)).Remove the extraneous incref.