[New-bugs-announce] [issue32999] issubclass(obj, abc.ABC) causes a segfault

Alexey Izbyshev report at bugs.python.org
Mon Mar 5 11:19:41 EST 2018


New submission from Alexey Izbyshev <izbyshev at ispras.ru>:

Demo:

>>> from abc import ABC
>>> issubclass(1, ABC)
Segmentation fault (core dumped)

The stack trace is attached.

Before reimplementation of abc in C, the result was confusing too:

Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)]
 on win32
>>> from abc import ABC
>>> issubclass(1, ABC)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "abc.py", line 230, in __subclasscheck__
  File "_weakrefset.py", line 84, in add
TypeError: cannot create weak reference to 'int' object

----------
components: Extension Modules
files: stack-trace.txt
messages: 313259
nosy: izbyshev, levkivskyi
priority: normal
severity: normal
status: open
title: issubclass(obj, abc.ABC) causes a segfault
type: crash
versions: Python 3.8
Added file: https://bugs.python.org/file47470/stack-trace.txt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32999>
_______________________________________


More information about the New-bugs-announce mailing list