gh-116099: Fix refcounting bug in _queueobj_shared()#116164
gh-116099: Fix refcounting bug in _queueobj_shared()#116164ericsnowcurrently merged 1 commit intopython:mainfrom
_queueobj_shared()#116164Conversation
This code decrefs `qidobj` twice in some paths. Since `qidobj` isn't used after the first `Py_DECREF()`, remove the others, and replace the `Py_DECREF()` with `Py_CLEAR()` to make it clear that the variable is dead. With this fix, `python -mtest test_interpreters -R 3:3 -mtest_queues` no longer fails with `_Py_NegativeRefcount: Assertion failed: object has negative ref count`.
|
The macOS builds have been queued for over 1.5 hours. Considering how unlikely they are to find something on this change that the Linux/Windows builds didn't, would it be worth merging before they're done (to fix the refleak buildbot)? |
|
This PR is next in queue so it should start soon: https://github.com/python/cpython/actions?query=is%3Aqueued I don't think there's a way to land PRs without the required tests passing (or changing the GitHub project configuration). |
|
Thanks again for doing this, @swtaarrs! |
|
|
FYI, I'm pretty sure that buildbot failure is unrelated. |
…h-116164) This code decrefs `qidobj` twice in some paths. Since `qidobj` isn't used after the first `Py_DECREF()`, remove the others, and replace the `Py_DECREF()` with `Py_CLEAR()` to make it clear that the variable is dead. With this fix, `python -mtest test_interpreters -R 3:3 -mtest_queues` no longer fails with `_Py_NegativeRefcount: Assertion failed: object has negative ref count`.
…h-116164) This code decrefs `qidobj` twice in some paths. Since `qidobj` isn't used after the first `Py_DECREF()`, remove the others, and replace the `Py_DECREF()` with `Py_CLEAR()` to make it clear that the variable is dead. With this fix, `python -mtest test_interpreters -R 3:3 -mtest_queues` no longer fails with `_Py_NegativeRefcount: Assertion failed: object has negative ref count`.
…h-116164) This code decrefs `qidobj` twice in some paths. Since `qidobj` isn't used after the first `Py_DECREF()`, remove the others, and replace the `Py_DECREF()` with `Py_CLEAR()` to make it clear that the variable is dead. With this fix, `python -mtest test_interpreters -R 3:3 -mtest_queues` no longer fails with `_Py_NegativeRefcount: Assertion failed: object has negative ref count`.
This code decrefs
qidobjtwice in some paths. Sinceqidobjisn't used after the firstPy_DECREF(), remove the others, and replace thePy_DECREF()withPy_CLEAR()to make it clear that the variable is dead.With this fix,
python -mtest test_interpreters -R 3:3 -mtest_queuesno longer fails with_Py_NegativeRefcount: Assertion failed: object has negative ref count.test_interpretersfails when running with-R 3:3argument #116099