Skip to content

gh-146102: Fix type slot_bf_getbuffer() error handling - #151346

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:getbuffer
Jun 15, 2026
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:getbuffer

Conversation

@vstinner

@vstinner vstinner commented Jun 11, 2026 •

Copy link
Copy Markdown
Member

Call PyBuffer_Release() if PyObject_GC_New() fails.

Fix also bytes_join(): only call Py_DECREF(item) after formatting the error message which uses item.

Call PyBuffer_Release() if PyObject_GC_New() fails.

Fix also bytes_join(): only call Py_DECREF(item) after formatting the
error message which uses item.
@vstinner

Copy link
Copy Markdown
Member Author

Tests / Windows / Build and test (x64, tail-call) (pull_request): Failing after 10m

It's a test_logging test which fails randomly: I reported the bug to issue gh-84649.

FAIL: test_rollover_at_midnight (test.test_logging.TimedRotatingFileHandlerTest.test_rollover_at_midnight)

@vstinner
vstinner merged commit 0ec7c9d into python:main Jun 15, 2026
98 of 100 checks passed
@vstinner
vstinner deleted the getbuffer branch June 15, 2026 09:48
philthompson10 pushed a commit to philthompson10/cpython that referenced this pull request Jun 17, 2026
…151346)

Call PyBuffer_Release() if PyObject_GC_New() fails.

Fix also bytes_join(): only call Py_DECREF(item) after formatting the
error message which uses item.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants