This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients gvanrossum, kj, serhiy.storchaka
Date 2021-07-13.17:16:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626196579.29.0.631704054136.issue44606@roundup.psfhosted.org>
In-reply-to
Content
3. There is also a crash in isinstance():

>>> class BadMeta(type):
...     def __instancecheck__(cls, inst):
...         1/0
... 
>>> x = int | BadMeta('A', (), {})
>>> isinstance([], x)
Fatal Python error: _Py_CheckFunctionResult: a function returned a result with an exception set
Python runtime state: initialized
Traceback (most recent call last):
  File "<stdin>", line 3, in __instancecheck__
ZeroDivisionError: division by zero

The above exception was the direct cause of the following exception:

SystemError: <built-in method __instancecheck__ of types.Union object at 0x7f024bbb8960> returned a result with an exception set

Current thread 0x00007f024beb1280 (most recent call first):
  File "<stdin>", line 1 in <module>
Aborted (core dumped)
History
Date User Action Args
2021-07-13 17:16:19serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, kj
2021-07-13 17:16:19serhiy.storchakasetmessageid: <1626196579.29.0.631704054136.issue44606@roundup.psfhosted.org>
2021-07-13 17:16:19serhiy.storchakalinkissue44606 messages
2021-07-13 17:16:19serhiy.storchakacreate