Commit 0ff0f54d authored by Victor Stinner's avatar Victor Stinner

Issue #18408: Fix call_function() of ceval.c to handle PyTuple_New() failure

(in load_args()), ex: MemoryError.
parent 9812af8e
......@@ -4171,11 +4171,16 @@ call_function(PyObject ***pp_stack, int oparg
else {
PyObject *callargs;
callargs = load_args(pp_stack, na);
if (callargs != NULL) {
READ_TIMESTAMP(*pintr0);
C_TRACE(x, PyCFunction_Call(func,callargs,NULL));
READ_TIMESTAMP(*pintr1);
Py_XDECREF(callargs);
}
else {
x = NULL;
}
}
} else {
if (PyMethod_Check(func) && PyMethod_GET_SELF(func) != NULL) {
/* optimize access to bound methods */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment