summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-02-01 17:04:52 +0100
committerVictor Stinner <victor.stinner@gmail.com>2017-02-01 17:04:52 +0100
commitd9d677581682d1b326293ea2b62beaefdb34084f (patch)
tree1dfba97ec0325466bd3e042f983e6340ddcf359d
parent06d9525203b8a495978fb0ec2f7af4c2b2cfb1aa (diff)
downloadcpython-d9d677581682d1b326293ea2b62beaefdb34084f.tar.gz
Document that _PyFunction_FastCallDict() must copy kwargs
Issue #29318: Caller and callee functions must not share the dictionary: kwargs must be copied.
-rw-r--r--Python/ceval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 87384709c9..298ad55b81 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;