Michael Felt <aixto...@felt.demon.nl> added the comment: On 10/04/2020 14:01, STINNER Victor wrote: > STINNER Victor <vstin...@python.org> 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?
To be clear - gcc does not not have an issue. As I stated elsewhere - it is specific to xlc-v16, so likely it is a compiler error. See also the result of `git bisect` study. > > 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' With: $ ./python -m test.pythoninfo|grep -E 'CFLAGS|CC|OPT|LDFLAGS' Objects/genobject.c:127: _PyObject_GC_TRACK: Assertion "!(((PyGC_Head *)(op)-1)->_gc_next != 0)" failed: object already tracked by the garbage collector Enable tracemalloc to get the memory block allocation traceback object address : 30084150 object refcount : 0 object type : 200144a8 object type name: generator object repr : <refcnt 0 at 30084150> Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed Python runtime state: core initialized Current thread 0x00000001 (most recent call first): File "<frozen importlib._bootstrap_external>", line 1593 in _setup File "<frozen importlib._bootstrap_external>", line 1634 in _install File "<frozen importlib._bootstrap>", line 1189 in _install_external_importers ksh: 27328848 IOT/Abort trap(coredump) Without error: $ ./python -m test.pythoninfo|grep -E 'CFLAGS|CC|OPT|LDFLAGS' os.environ[CC]: xlc_r sysconfig[CC]: xlc_r sysconfig[CFLAGS]: -O sysconfig[CONFIG_ARGS]: '--with-openssl=/opt/aixtools' '--without-computed-gotos' '--with-pydebug' 'CC=xlc_r' sysconfig[OPT]: -O sysconfig[PY_CFLAGS]: -O sysconfig[PY_CFLAGS_NODIST]: -I./Include/internal sysconfig[PY_STDMODULE_CFLAGS]: -O -I./Include/internal -I. -I./Include > ---------- > nosy: +vstinner > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <https://bugs.python.org/issue40244> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40244> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com