Closed
Description
Crash report
What happened?
It's possible to abort the interpreter in 3.12 by calling __sizeof__
of a GenericAlias
instance:
from types import GenericAlias
g = GenericAlias(BaseException, Exception)
g.__sizeof__(1)
Abort message:
python: ./Include/object.h:231: Py_SIZE: Assertion `ob->ob_type != &PyLong_Type' failed.
Aborted
Found using fusil by @vstinner.
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.12.8+ (heads/3.12:8e3c2d2, Dec 4 2024, 10:58:33) [GCC 11.4.0]