STINNER Victor <[email protected]> added the comment:
The assertion failure occurs in _PyObject_GC_TRACK() at:
static void
gen_dealloc(PyGenObject *gen)
{
PyObject *self = (PyObject *) gen;
_PyObject_GC_UNTRACK(gen);
if (gen->gi_weakreflist != NULL)
PyObject_ClearWeakRefs(self);
_PyObject_GC_TRACK(self); // <==== HERE
...
}
It's surprising that the generator is still tracked by the GC after
_PyObject_GC_UNTRACK().
> Calling this a compile error - as it seems to be compiler dependent.
Do you reproduce the bug if you build Python with GCC?
Which ./configure command did you use? What are the compiler and linker flags?
You can try:
./python -m test.pythoninfo|grep -E 'CFLAGS|CC|OPT|LDFLAGS'
----------
nosy: +vstinner
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40244>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com