# Bug report ### Bug description: I think this is a relatively recent regression, probably in the last month or so. Can be reproduced by uncommenting the line: ``` // #define Py_STACKREF_DEBUG 1 ``` in pycore_structs.h ### CPython versions tested on: CPython main branch ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-139475 <!-- /gh-linked-prs -->
Activity
markshannon commentedon Jun 6, 2025
Bisected to 6dcb0fd
efimov-mikhail commentedon Oct 1, 2025
Yes, problem was introduced here,
_PyStackRef_FromPyObjectBorrowis incorrect on mortal objects inPyStackRefdebug mode.gh-135125: Fix Py_STACKREF_DEBUG build (GH-139475)
pythongh-135125: Fix Py_STACKREF_DEBUG build (pythonGH-139475)