From: Victor Stinner Date: Wed, 1 Feb 2017 16:04:52 +0000 (+0100) Subject: Document that _PyFunction_FastCallDict() must copy kwargs X-Git-Tag: v3.7.0a1~1445 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=122fb562d4f61a4862e05987f48d637b885bfeb6;p=thirdparty%2FPython%2Fcpython.git Document that _PyFunction_FastCallDict() must copy kwargs Issue #29318: Caller and callee functions must not share the dictionary: kwargs must be copied. --- diff --git a/Python/ceval.c b/Python/ceval.c index 87384709c91d..298ad55b810a 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -5039,6 +5039,8 @@ _PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, if (nk != 0) { Py_ssize_t pos, i; + /* Issue #29318: Caller and callee functions must not share the + dictionary: kwargs must be copied. */ kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { return NULL;