Issue #18408: Fix call_function() of ceval.c to handle PyTuple_New() failure
(in load_args()), ex: MemoryError.
This commit is contained in:
parent
9812af8e72
commit
0ff0f54dd4
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue