[MacPorts] #14063: PHP 5.2.5_1 crashes on XSLTProcessor::importStylesheet
MacPorts
trac at macosforge.org
Sat Mar 1 09:17:51 PST 2008
#14063: PHP 5.2.5_1 crashes on XSLTProcessor::importStylesheet
------------------------------------+---------------------------------------
Reporter: peter at no-nonsense.org | Owner: ryandesign at macports.org
Type: defect | Status: new
Priority: Normal | Milestone: Port Bugs
Component: ports | Version: 1.6.0
Resolution: | Keywords:
------------------------------------+---------------------------------------
Comment (by ryandesign at macports.org):
Replying to [comment:5 dp macports at oxidized.org]:
> I suspect that I'm having a related problem. In my case, libxml2 from
MacPorts defines the xmlURI struct with one more element than the libxml2
from Mac OS X. For some reason, it uses the xmlCreateURI function from
/usr/lib/libxml2.dylib instead of the xmlCreateURI function from
/opt/local/lib/libxml2.dylib. This results in the last element of the
xmlURI struct not getting initialized to NULL, so that when the struct is
destroyed, the code attempts to free the wild pointer. Bang, dead.
>
> Seems like /opt/local/lib/libxml2.dylib (9.0.0) should have a higher
compatibility version than /usr/lib/libxml2.dylib (9.0.0).
Cc'ing maintainer of libxml2 since apparently a bug needs to be reported
to the developers of libxml: `/opt/local/lib/libxml2.dylib` (version
9.31.0) and `/usr/lib/libxml2.dylib` (version 9.16.0 (on Mac OS X
10.4.11)) claim to have the same compatibility version (9.0.0) though they
are incompatible because they define the `xmlURI` struct differently.
Here's the relevant diff from the source:
{{{
$ diff -bu libxml2-2.6.{16,31}/include/libxml/uri.h
--- libxml2-2.6.16/include/libxml/uri.h 2004-06-07 16:33:11.000000000
-0500
+++ libxml2-2.6.31/include/libxml/uri.h 2007-04-26 03:31:34.000000000
-0500
@@ -23,6 +23,10 @@
*
* A parsed URI reference. This is a struct containing the various fields
* as described in RFC 2396 but separated for further processing.
+ *
+ * Note: query is a deprecated field which is incorrectly unescaped.
+ * query_raw takes precedence over query if the former is set.
+ * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
*/
typedef struct _xmlURI xmlURI;
typedef xmlURI *xmlURIPtr;
@@ -34,9 +38,10 @@
char *user; /* the user part */
int port; /* the port number */
char *path; /* the path string */
- char *query; /* the query string */
+ char *query; /* the query string (deprecated - use with
caution) */
char *fragment; /* the fragment identifier */
int cleanup; /* parsing potentially unclean URI */
+ char *query_raw; /* the query string (as it appears in the URI) */
};
/*
[snip]
}}}
Replying to [comment:6 peter at no-nonsense.org]:
> How can I downgrade libxml2 to check if this fixes my problem? Does the
port command support specifying a version you want to install?
No it does not. I see you already found how to do this, and I'm sorry to
hear it did not help in your case, but for others who may want to try it:
To get an older version, [browser:trunk/dports browse the repository] to
find the port you want, then use the Revision Log link in the upper right
to find the older version of the portfile that you want to install. For
example, here's the portfile for
[browser:trunk/dports/textproc/libxml2/Portfile at 26074 libxml2 @2.6.28_1].
Download this to disk using the Original Format link at the bottom of the
page. Then use the Terminal to `cd` to the directory where you downloaded
the portfile and type "`port install`". If the port had any patchfiles you
would also need to grab all of them from the same revision, but libxml2
doesn't have any.
--
Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14063#comment:8>
MacPorts </projects/macports>
Ports system for Mac OS
More information about the macports-tickets
mailing list