diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-02-01 17:04:52 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-02-01 17:04:52 +0100 |
commit | 122fb562d4f61a4862e05987f48d637b885bfeb6 (patch) | |
tree | 7c56098d6822195607929ba8360511021bfee950 /Python/ceval.c | |
parent | f94b68a025e9b35d5b612d815818b4e9e1c55fcc (diff) | |
download | cpython-git-122fb562d4f61a4862e05987f48d637b885bfeb6.tar.gz |
Document that _PyFunction_FastCallDict() must copy kwargs
Issue #29318: Caller and callee functions must not share the dictionary:
kwargs must be copied.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 2 |
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; |