summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-10-04 21:55:57 (GMT)
committerGitHub <noreply@github.com>2020-10-04 21:55:57 (GMT)
commit9ece9cd65cdeb0a1f6e60475bbd0219161c348ac (patch)
tree0ed869df28102785bfbb38ae7178aac48c1672bb /Misc/NEWS.d
parent619f98045d73859688e5cfdb946d183e6d493a64 (diff)
downloadcpython-9ece9cd65cdeb0a1f6e60475bbd0219161c348ac.zip
cpython-9ece9cd65cdeb0a1f6e60475bbd0219161c348ac.tar.gz
cpython-9ece9cd65cdeb0a1f6e60475bbd0219161c348ac.tar.bz2
bpo-41909: Enable previously disabled recursion checks. (GH-22536)
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.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2020-10-04-10-55-12.bpo-41909.BqHPcm.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-10-04-10-55-12.bpo-41909.BqHPcm.rst b/Misc/NEWS.d/next/Core and Builtins/2020-10-04-10-55-12.bpo-41909.BqHPcm.rst
new file mode 100644
index 0000000..388cfea
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2020-10-04-10-55-12.bpo-41909.BqHPcm.rst
@@ -0,0 +1,2 @@
+Fixed stack overflow in :func:`issubclass` and :func:`isinstance` when
+getting the ``__bases__`` attribute leads to infinite recursion.