[issue46891] Crash in ModuleType subclass with __slots__

Ronald Oussoren report at bugs.python.org
Tue Mar 1 17:16:50 EST 2022


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

The debug build seems to indicate that slot memory is not initiated properly, a stack trace (note the argument to visit_validate at frame #7):


  * frame #0: 0x000000019b60d9b8 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x000000019b640eb0 libsystem_pthread.dylib`pthread_kill + 288
    frame #2: 0x000000019b57e314 libsystem_c.dylib`abort + 164
    frame #3: 0x000000010030c4f4 python.exe`fatal_error_exit(status=-1) at pylifecycle.c:2624:9
    frame #4: 0x000000010030c3cc python.exe`fatal_error(fd=2, header=1, prefix="_PyObject_AssertFailed", msg="_PyObject_AssertFailed", status=-1) at pylifecycle.c:2805:5
    frame #5: 0x000000010030be20 python.exe`_Py_FatalErrorFunc(func="_PyObject_AssertFailed", msg="_PyObject_AssertFailed") at pylifecycle.c:2821:5
    frame #6: 0x0000000100169fe0 python.exe`_PyObject_AssertFailed(obj=0x0000000100d63690, expr=0x0000000000000000, msg="PyObject_GC_Track() object is not valid", file="../Modules/gcmodule.c", line=2187, function="visit_validate") at object.c:2293:5
    frame #7: 0x0000000100351184 python.exe`visit_validate(op=0xcdcdcdcdcdcdcdcd, parent_raw=0x0000000100d63690) at gcmodule.c:2186:9
    frame #8: 0x000000010019845c python.exe`traverse_slots(type=0x0000000101813230, self=0x0000000100d63690, visit=(python.exe`visit_validate at gcmodule.c:2183), arg=0x0000000100d63690) at typeobject.c:1207:27
    frame #9: 0x0000000100197fe8 python.exe`subtype_traverse(self=0x0000000100d63690, visit=(python.exe`visit_validate at gcmodule.c:2183), arg=0x0000000100d63690) at typeobject.c:1228:23
    frame #10: 0x0000000100350fdc python.exe`PyObject_GC_Track(op_raw=0x0000000100d63690) at gcmodule.c:2212:11

----------

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


More information about the Python-bugs-list mailing list