`PyObject_IsInstance` crashes with `PyFunction_Type`
I get a crash when using PyObject_IsInstance(<something>, &PyFunction_Type)
.
The following gets printed to the terminal:
RPython traceback:
File "pypy_module_cpyext.c", line 19599, in wrapper_second_level__star_2_8
File "pypy_module_cpyext_1.c", line 39564, in from_ref
Fatal RPython error: AssertionError
Fatal Python error: Aborted
Looking in a debugger it appears that &PyFunction_Type
has a valid address but its members are all null; I wonder if it hasn't been initialised?
PyPy version:
$ python --version
Python 3.9.12 (05fbe3aa5b0845e6c37239768aa455451aa5faba, Mar 29 2022, 09:54:47)
[PyPy 7.3.9 with GCC Apple LLVM 13.0.0 (clang-1300.0.29.30)]