This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: xsltproc segfaults with docbook-xsl 1.51.0 - 1.52.2


On Sat, Jul 27, 2002 at 04:16:53PM +0200, Oliver Eikemeier wrote:
> In message <3CFDDE3E.2040504@mandrakesoft.com> (http://sources.redhat.com/ml/docbook-apps/2002-q2/msg00716.html) you wrote that xsltproc gives you:
> 
> Error Undefined namespace prefix
> xmlXPathCompiledEval: evaluation failed
> 
> when compiling a document with an image in a mediaobject. The same happens to me (it crashes on Cygwin, the same error but no crash on FreeBSD). It seems that the problems came with the introduction of svg in the xsl templates.
> 
> I use the enclosed patch as a workaround, maybe Norman can tell us what really happens?

  Okay, I have the answer and a patch for this, finally :-)
In a nutshell it was a bug in libxslt <choose> implementation, the
<when> test expression was evaluated with the in-scope namespace list
of the <choose> node and not the one of the <when> node ... grin ...
Tiny patch enclosed, fix will be in next version, for good measure I also
ran valgind memory checker on the new code and no error are found, the 
next version of xsltproc should hopefully fix the troubles people had
with recent versions of the stylesheets,

Daniel

paphio:~/XSLT/tests/docbook -> valgrind --leak-check=yes --gdb-attach=yes xsltproc --nonet -o sample.html docbook-xsl-1.53.0/html/docbook.xsl tst.xml 
==22770== valgrind-20020317, a memory error detector for x86 GNU/Linux.
==22770== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==22770== For more details, rerun with: -v
==22770== 
==22770== 
==22770== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==22770== malloc/free: in use at exit: 600 bytes in 13 blocks.
==22770== malloc/free: 1369470 allocs, 1369457 frees, 96122703 bytes allocated.
==22770== For counts of detected errors, rerun with: -v
==22770== searching for pointers to 13 not-freed blocks.
==22770== checked 4931912 bytes.
==22770== 
==22770== definitely lost: 0 bytes in 0 blocks.
==22770== possibly lost:   0 bytes in 0 blocks.
==22770== still reachable: 600 bytes in 13 blocks.
==22770== 
==22770== LEAK SUMMARY:
==22770==    possibly lost:   0 bytes in 0 blocks.
==22770==    definitely lost: 0 bytes in 0 blocks.
==22770==    still reachable: 600 bytes in 13 blocks.
==22770== Reachable blocks (those to which a pointer was found) are not shown.
==22770== To see them, rerun with: --show-reachable=yes
==22770== 
paphio:~/XSLT/tests/docbook -> 


-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Attachment: choose.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]