[xml] libxml2 : xmlFreeTextReader crashes
- From: Suneel Mekala <sun 1601 gmail com>
- To: xml gnome org
- Subject: [xml] libxml2 : xmlFreeTextReader crashes
- Date: Tue, 22 Feb 2011 13:50:55 +0530
Dear all,
I am using libxml2 (libxml2-2.7.6-1.fc10.x86_64 )
I get crash when I call xmlFreeTextReader after the XMl file is processed.
Following is the sample code that I am using:xmlTextPointer = xmlReaderForMemory(buffer, strlen(buffer), "somthing.xml", NULL, 0);
while(errorCode == 1)
{
printf("Name : %s\n",xmlTextReaderConstName(xmlTextPointer));
errorCode = xmlTextReaderRead(xmlTextPointer);
}
xmlFreeTextReader(xmlTextPointer);
The buffer contains valid XML data, as it parses complete buffer and prints all the names (nodes)
and when xmlFreeTextReader is called it crashes
Following is the backtrace:
======= Backtrace: =========
/lib64/libc.so.6[0x3cfd477ec8]
/lib64/libc.so.6(cfree+0x76)[0x3cfd47a486]
/usr/lib64/libxml2.so.2(xmlDictFree+0xf8)[0x3d07906b48]
/usr/lib64/libxml2.so.2(xmlFreeParserCtxt+0x135)[0x3d07834335]
/usr/lib64/libxml2.so.2(xmlFreeTextReader+0x245)[0x3d078ee735]
/export/home/suneelm/Pro/xml/a.out[0x402de5]
/export/home/suneelm/Pro/xml/a.out[0x401ff8]
/export/home/suneelm/Pro/xml/a.out[0x40154d]
/lib64/libc.so.6(__libc_start_main+0xe6)[0x3cfd41e576]
/export/home/suneelm/Pro/xml/a.out[0x4010c9]
Thanks in advance.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]