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,10 +4171,15 @@ call_function(PyObject ***pp_stack, int oparg
|
||||||
else {
|
else {
|
||||||
PyObject *callargs;
|
PyObject *callargs;
|
||||||
callargs = load_args(pp_stack, na);
|
callargs = load_args(pp_stack, na);
|
||||||
READ_TIMESTAMP(*pintr0);
|
if (callargs != NULL) {
|
||||||
C_TRACE(x, PyCFunction_Call(func,callargs,NULL));
|
READ_TIMESTAMP(*pintr0);
|
||||||
READ_TIMESTAMP(*pintr1);
|
C_TRACE(x, PyCFunction_Call(func,callargs,NULL));
|
||||||
Py_XDECREF(callargs);
|
READ_TIMESTAMP(*pintr1);
|
||||||
|
Py_XDECREF(callargs);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
x = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (PyMethod_Check(func) && PyMethod_GET_SELF(func) != NULL) {
|
if (PyMethod_Check(func) && PyMethod_GET_SELF(func) != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue