Message26323
The Problem:
- you embed Python in some app
- the app dynamically loads libexpat of version X
- the embedded Python imports pyexpat (which was built
against
libexpat version X+n)
--> pyexpat gets the expat symbols from the already
loaded and *older*
libexpat: crash (Specifically the crash we observed
was in
getting an old XML_ErrorString (from xmlparse.c)
and then calling
it with newer values in the XML_Error enum:
// pyexpat.c, line 1970
...
// Added in Expat 1.95.7.
MYCONST(XML_ERROR_UNBOUND_PREFIX);
...
The Solution:
Prefix all a exported symbols with "PyExpat_". This is
similar to
what Mozilla does for some common libs:
http://lxr.mozilla.org/seamonkey/source/modules/libimg/png/mozpngconf.h#115
I'll attach the gdb backtrace that we were getting and
a patch. |
|
Date |
User |
Action |
Args |
2007-08-23 14:34:41 | admin | link | issue1295808 messages |
2007-08-23 14:34:41 | admin | create | |
|