Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address Sam's review, fix root cause
  • Loading branch information
Fidget-Spinner committed Apr 9, 2026
commit d108567665591904577a5913e4f3706d3b1dcd4e
10 changes: 1 addition & 9 deletions Modules/_testcapi/vectorcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,7 @@ _testcapi_pyobject_vectorcall_impl(PyObject *module, PyObject *func,
PyErr_SetString(PyExc_TypeError, "kwnames must be None or a tuple");
return NULL;
}
PyObject *res;
// The CPython interpreter does not guarantee that vectorcalls are
// checked for recursion limit. It's thus up to the C extension themselves to check.
if (Py_EnterRecursiveCall("in _testcapi.pyobject_vectorcall")) {
return NULL;
}
res = PyObject_Vectorcall(func, stack, nargs, kwnames);
Py_LeaveRecursiveCall();
return res;
return PyObject_Vectorcall(func, stack, nargs, kwnames);
}

static PyObject *
Expand Down
8 changes: 7 additions & 1 deletion Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,11 @@ typedef struct {
_PyStackRef stack[1];
} _PyEntryFrame;

PyObject* _Py_HOT_FUNCTION DONT_SLP_VECTORIZE
/* gh-148284: *Do not* mark this function as _Py_HOT_FUNCTION.
* On certain compilers (Clang-22 and above), this overrides PGO information
* leading possibly to miss-optimization and over-inlining.
*/
PyObject* DONT_SLP_VECTORIZE
_PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int throwflag)
{
_Py_EnsureTstateNotNULL(tstate);
Expand Down Expand Up @@ -1173,7 +1177,9 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
non-tail-call interpreters, as it results in excessive
stack usage in some compilers.
*/
#if !Py_TAIL_CALL_INTERP
PyObject *STACKREF_SCRATCH[MAX_STACKREF_SCRATCH+1];
Comment thread
Fidget-Spinner marked this conversation as resolved.
Outdated
#endif

/* Local "register" variables.
* These are cached values from the frame and code object. */
Expand Down