This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients David.Edelsohn, Michael.Felt, skrah, vstinner
Date 2020-04-10.12:00:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586520060.04.0.792331001042.issue40244@roundup.psfhosted.org>
In-reply-to
Content
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'
History
Date User Action Args
2020-04-10 12:01:00vstinnersetrecipients: + vstinner, skrah, David.Edelsohn, Michael.Felt
2020-04-10 12:01:00vstinnersetmessageid: <1586520060.04.0.792331001042.issue40244@roundup.psfhosted.org>
2020-04-10 12:01:00vstinnerlinkissue40244 messages
2020-04-10 12:00:59vstinnercreate