Stefan Krah <ste...@bytereef.org> added the comment:
Okay that makes sense. :) I looked a bit at the gc code. A consumer object always has one reference to a memoryview with an export, which isn't visited. So it looks to me that the gc_refs of that memoryview cannot fall to 0. So memory_clear() isn't called in that case, but mbuf_clear() is, which is known and expected to handle mbuf->exports >= 0. Indeed let's perhaps just add "if (self->exports > 0) return 0" to memory_clear() if those assumptions are too complex. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33713> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com