diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-12 17:12:21 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-12 17:12:21 (GMT) |
commit | 42e1ea9a10aa6c3df40af3b7561d6251c8e2ac9c (patch) | |
tree | d54140f730a38805fa55a7a5cc90b0e894d91318 /Include/dictobject.h | |
parent | 12c4aba1a0fbd934a66d6b97c29c36d7de14e755 (diff) | |
parent | 67796521dd22b3008788a75108b45f33d06f85dd (diff) | |
download | cpython-42e1ea9a10aa6c3df40af3b7561d6251c8e2ac9c.zip cpython-42e1ea9a10aa6c3df40af3b7561d6251c8e2ac9c.tar.gz cpython-42e1ea9a10aa6c3df40af3b7561d6251c8e2ac9c.tar.bz2 |
Issue #28969: Fixed race condition in C implementation of functools.lru_cache.
KeyError could be raised when cached function with full cache was
simultaneously called from differen threads with the same uncached arguments.
Diffstat (limited to 'Include/dictobject.h')
-rw-r--r-- | Include/dictobject.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/dictobject.h b/Include/dictobject.h index 6ef5e03..c4f2e2f 100644 --- a/Include/dictobject.h +++ b/Include/dictobject.h @@ -115,6 +115,7 @@ PyAPI_FUNC(int) _PyDict_HasOnlyStringKeys(PyObject *mp); Py_ssize_t _PyDict_KeysSize(PyDictKeysObject *keys); Py_ssize_t _PyDict_SizeOf(PyDictObject *); PyAPI_FUNC(PyObject *) _PyDict_Pop(PyObject *, PyObject *, PyObject *); +PyObject *_PyDict_Pop_KnownHash(PyObject *, PyObject *, Py_hash_t, PyObject *); PyObject *_PyDict_FromKeys(PyObject *, PyObject *, PyObject *); #define _PyDict_HasSplitTable(d) ((d)->ma_values != NULL) |