Re: [xslt] Strange problem



On 17/02/2014 14:52, Tobias Hoffmann wrote:
Hi,

with debian testing, esp. libxslt1.1_1.1.28-2_i386, using
   xsltproc bug.xsl in.xml
results in
<root>a<s/><!-- c -->db<s/><!-- f -->e</root>
instead of the expected original ordering.

Confirmed with Ubuntu 13.10, i386.

Issuing
   valgrind xsltproc bug.xsl in.xml
makes the bug disappear:
<root>a<s/>b<!-- c -->d<s/>e<!-- f --></root>
Valgrind does not report any error, though.

Also confirmed.

Analyzing the differences in these two build processes, I found that
   ./configure LDFLAGS="-pie"
is enough to trigger the problem. It's also sufficient to compile/link
xsltproc with it.

Same here.

I don't really know how to proceed from here. Maybe someone with more
knowledge of libxslt has some idea, what the root cause could be? I suspect
that -pie is just another trigger, just as valgrind suppresses the buggy
behavior...

When I linked against the latest version of libxml2 from Git, the error disappeared (also with -pie). Seems that the commit "Fix XPath node comparison bug" fixed the issue:

https://git.gnome.org/browse/libxml2/commit/?id=fcd458318916809edc4fc4cd1ce2d5ba9aed4665

Nick




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]