After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700689 - transformation hangs when aliasing some namespace to default
transformation hangs when aliasing some namespace to default
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.2
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2013-05-20 04:24 UTC by contact
Modified: 2015-05-07 21:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
zip archive containing test case (498 bytes, application/zip)
2013-05-20 04:25 UTC, contact
  Details
input document for test case (8 bytes, text/xml)
2013-05-20 04:26 UTC, contact
  Details
stylesheet for test case (297 bytes, application/xslt+xml)
2013-05-20 04:26 UTC, contact
  Details
Have to set cur to cur->next when you continue in a loop (880 bytes, patch)
2015-05-05 13:17 UTC, Shaun McCance
none Details | Review

Description contact 2013-05-20 04:24:29 UTC
To recreate this bug create a stylesheet that 1) has a namespace-alias element mapping prefix ("n") to no (default) prefix, AND 2) has an element with the same namespace prefix, ("n"), in one of the templates ("t"),  Then create an input document that has an element that matches the match criterion for the template ("t").  Apply the stylesheet to the input document either through the API, or though xsltproc.  The transformation operation hangs indefinitely (or for a very long time; I have not tried to run the operation for an extended period, but rather only long enough to see that the behaviour is incorrect.).

Examples of the described stylesheet and input document are attached in the form of a zip archive (bugzilla does not allow multiple attachments).

I am using libxslt 1.1.26 and libxml2 2.7.6.
Comment 1 contact 2013-05-20 04:25:47 UTC
Created attachment 244748 [details]
zip archive containing test case
Comment 2 contact 2013-05-20 04:26:07 UTC
Created attachment 244749 [details]
input document for test case
Comment 3 contact 2013-05-20 04:26:24 UTC
Created attachment 244750 [details]
stylesheet for test case
Comment 4 Shaun McCance 2015-05-05 02:59:49 UTC
Just ran across this issue. Fedora 21, libxslt 1.1.28, libxml2 2.9.1. It only happens when the namespace prefix is declared on result elements, not if the prefix is declared on the xsl:stylesheet, so that's an easy workaround for stylesheet authors. A cursory look with gdb indicates the problem is probably either in xsltCopyNamespaceList or xmlHashLookup3.
Comment 5 Shaun McCance 2015-05-05 13:17:35 UTC
Created attachment 302926 [details] [review]
Have to set cur to cur->next when you continue in a loop
Comment 6 Daniel Veillard 2015-05-07 02:30:40 UTC
Dohhh ! ACK, Shaun please commit, and change as RESOLVED :-)

Thanks for the report and the patch !

Daniel