Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment: I reproduce the problem on Linux (./configure --enable-shared), after I modified the source code a bit to directly use Python.h and to link with libpython3.2.so (no call to dlopen). In gdb the stack trace has exactly the same symbols as the attached crash log, so the issue is not specific to Mac frameworks.
The crash is inside _PyImport_LoadDynamicModule("_pickle"), when _PyImport_FixupExtension() calls Py_DECREF(def->m_base.m_copy), this certainly frees objects allocated in a previous incarnation of the interpreter, and segfaults in type_dealloc(): _PyObject_GC_UNTRACK(type). In import.c::_PyImport_FixupExtension(), the Py_DECREF is preceded by a comment: """ /* Somebody already imported the module, likely under a different name. XXX this should really not happen. */ Py_DECREF(def->m_base.m_copy); """ I removed this statement, and the program now runs correctly. I don't know about memory leaks though... ---------- nosy: +amaury.forgeotdarc, loewis _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9197> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com