[ python-Bugs-1295808 ] expat symbols should be namespaced in pyexpat
SourceForge.net
noreply at sourceforge.net
Fri Sep 30 08:01:19 CEST 2005
Bugs item #1295808, was opened at 2005-09-19 14:44
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1295808&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Trent Mick (tmick)
>Assigned to: Martin v. Löwis (loewis)
Summary: expat symbols should be namespaced in pyexpat
Initial Comment:
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.
----------------------------------------------------------------------
>Comment By: Neal Norwitz (nnorwitz)
Date: 2005-09-29 23:01
Message:
Logged In: YES
user_id=33168
This seems to be a duplicate of bug #1075984. I like this
patch better, but perhaps both patches (the one here and the
other bug report) should be implemented?
I think Martin helps maintain pyexpat. Maybe he has some
ideas about either or both of these bugs/patches. Martin,
do you think these are safe to apply? I can apply the
patch(es) if you think it's safe.
Trent, is this patch sufficient to meet your embedding needs
so that nothing else needs to be done?
I do not think this patch can be applied to 2.4.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1295808&group_id=5470
More information about the Python-bugs-list
mailing list