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

(in load_args()), ex: MemoryError.
This commit is contained in:
Victor Stinner 2013-07-08 22:27:42 +02:00
parent 9812af8e72
commit 0ff0f54dd4
1 changed files with 9 additions and 4 deletions

View File

@ -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 */