You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SCARINESS: 10 (null-deref)
#0 0x53c9a5 in _PyObject_GC_UNTRACK(_object*) (.__uniq.71160431842585912442991593982683040670) python/3.10/Include/internal/pycore_object.h:123
#1 0x53c9a5 in BaseException_dealloc(PyBaseExceptionObject*) (.__uniq.71160431842585912442991593982683040670) python/3.10/Objects/exceptions.c:92
#2 0x7fb1f0bcfea7 in __pyx_tp_dealloc_6thrift_3py3_10exceptions_GeneratedError(_object*) exceptions.cpp:20592 *cython*
#3 0x7fb1f4369b4f in __pyx_tp_dealloc_7testing_5types_UnusedError(_object*) types.cpp:165249 *cython*
#4 0x3d3658 in _Py_Dealloc python/3.10/Objects/object.c:2301
I believe this is related to this commit 663c924 from #5432
The generated .cpp code between the old version of cython and 3.0.8 is missing these lines
#if CYTHON_USE_TYPE_SLOTS
if (PyType_IS_GC(Py_TYPE(o)->tp_base))
#endif
PyObject_GC_Track(o);
The missing GC_Track would explain why GC is exploding
Code to reproduce the behaviour:
# We have no custom __dealloc__ or __del__# Exception is the builtin python Exception# inside the exceptions.pxd we have this def for Exception
cdef extern from"Python.h":
ctypedef extern class builtins.Exception[object PyBaseExceptionObject]:
pass# inside the exceptions.pyx
cdef class Error(Exception):
# Has no slots
...
cdef class GeneratedError(Error):
# has some attribute slots
...
Expected behaviour
no crash
OS
Linux
Python version
3.10.9
Cython version
3.0.8
Additional context
No response
The text was updated successfully, but these errors were encountered:
fried
changed the title
[BUG] null-deref inside _PyObject_GC_UNTRACK from extention class dealloc method. cython 3.0.8 cpython 3.10
[BUG] null-deref inside _PyObject_GC_UNTRACK from extention class dealloc method.
Feb 2, 2024
Describe the bug
I believe this is related to this commit 663c924 from #5432
The generated .cpp code between the old version of cython and 3.0.8 is missing these lines
The missing GC_Track would explain why GC is exploding
Code to reproduce the behaviour:
Expected behaviour
no crash
OS
Linux
Python version
3.10.9
Cython version
3.0.8
Additional context
No response
The text was updated successfully, but these errors were encountered: