-
- Downloads
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.
Showing
- Lib/test/test_isinstance.py 10 additions, 0 deletionsLib/test/test_isinstance.py
- Misc/NEWS.d/next/Core and Builtins/2020-10-04-10-55-12.bpo-41909.BqHPcm.rst 2 additions, 0 deletions...ore and Builtins/2020-10-04-10-55-12.bpo-41909.BqHPcm.rst
- Objects/abstract.c 0 additions, 2 deletionsObjects/abstract.c
- Objects/unicodeobject.c 0 additions, 2 deletionsObjects/unicodeobject.c
Loading
Please register or sign in to comment