python --with-pydebug build segfaults metakit

Jack Diederich <[email protected]>
Newsgroups gmane.comp.db.metakit
Message-ID <[email protected]>
I emailed JCW directly earlier (his address is in the README, I
didn't find this mailing list until later).

If you build metakit using a --with-python that ponits to a
debug build of python it will segfault.  I'm fairly certain this
is due to the HEAD struct being different than what is expected.
Specifically I think the _ob_next and _ob_prev members (which are
only in debug builds) are corrupted or not set.  ob_refcnt's
seem to be correct, the segfault comes when python is trying
to assert references during object teardown.

C++ classes that are also valid PyObject pointers are tricky,
the initialization has to be just right.  I don't personally
know enough to fix it.

# crashme.py
import metakit
db = metakit.storage('test.mk', 1)


metakit 2.4.93, python 2.3.3, gcc 2.95.4 (Debian prerelease)

TIA,

-jack

_____________________________________________
Metakit mailing list  -  [email protected]
http://www.equi4.com/mailman/listinfo/metakit
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.