Re: [xslt] libxslt-1.0.1 is released



Le 25/07/01 18:58:10, Daniel Veillard a écrit :
> > I was thinking about a conformant implementation replacing this "fake"
> > node with an xmlDoc but there is a bug in xmlCopyNode (see
> > http://bugzilla.gnome.org/show_bug.cgi?id=58056 )
> 
>   Will fix, use xmlCopyDoc in the meantime,

The problem is with xmlXPathObjectCopy (which calls xmlCopyNode)

Attached is a simple test case. Here's the backtrace:
...
Program received signal SIGSEGV, Segmentation fault.
xmlStrdup (cur=0xffffffff <Address 0xffffffff out of bounds>) at
parser.c:1081
1081        while (*p != 0) p++; /* non input consuming */
(gdb) bt     
#0  xmlStrdup (cur=0xffffffff <Address 0xffffffff out of bounds>)
    at parser.c:1081
#1  0x0804b87a in xmlStaticCopyNode (node=0x80a3638, doc=0x0, parent=0x0, 
    recursive=1) at tree.c:2774
#2  0x0804ba51 in xmlCopyNode (node=0x80a3638, recursive=1) at tree.c:2882
#3  0x0805c91d in xmlXPathObjectCopy (val=0x80a36a0) at xpath.c:2821
#4  0x080495ab in main ()
#5  0x4006b3bb in __libc_start_main () from /lib/libc.so.6

Tom.
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <libxml/tree.h>

int
main (void) {
    xmlXPathObjectPtr ret, copy;
    xmlDocPtr doc;

    doc = xmlNewDoc ((const xmlChar *) "1.0");

    ret = xmlXPathNewValueTree ((xmlNodePtr) doc);
    copy = xmlXPathObjectCopy (ret);

    return 0;
}


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