summaryrefslogtreecommitdiffstats
path: root/Python/codecs.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-10-04 22:27:38 (GMT)
committerGitHub <noreply@github.com>2020-10-04 22:27:38 (GMT)
commit7aa22ba923509af1dbf115c090964f503c84ca8d (patch)
tree27a570eb3dcdf44352df06ff0dbfb0f6eb694fd8 /Python/codecs.c
parentf3a6b7fc0b46afbe5d4d450b94a9d077e50b15d5 (diff)
downloadcpython-7aa22ba923509af1dbf115c090964f503c84ca8d.zip
cpython-7aa22ba923509af1dbf115c090964f503c84ca8d.tar.gz
cpython-7aa22ba923509af1dbf115c090964f503c84ca8d.tar.bz2
[3.9] bpo-41909: Enable previously disabled recursion checks. (GH-22536) (GH-22550)
Enable recursion checks which were disabled when get __bases__ of non-type objects in issubclass() and isinstance() and when intern strings. It fixes a stack overflow when getting __bases__ leads to infinite recursion. Originally recursion checks was disabled for PyDict_GetItem() which silences all errors including the one raised in case of detected recursion and can return incorrect result. But now the code uses PyDict_GetItemWithError() and PyDict_SetDefault() instead. (cherry picked from commit 9ece9cd65cdeb0a1f6e60475bbd0219161c348ac)
Diffstat (limited to 'Python/codecs.c')
0 files changed, 0 insertions, 0 deletions