List Info

Thread: seg fault




seg fault
user name
2006-07-19 10:33:36

Hi All

I have written a small app to parse the xsd file ,

When I run the following xsd file , I am getting seg fault in libxml , and if I give backtrace, it loops indefinitely and prints the following message

 

#3221 0x4008a100 in xmlFARecurseDeterminism (ctxt=0x804eca0, state=0x804ea28, to=9, atom=0x0) at xmlregexp.c:2429

 

My xsd file contains the following .

 

<?xml version=&quot;1.0&quot; encoding="UTF-8" ?>

<xsd:schema xmlnssd="http://www.w3.org/2001/XMLSchema&quot;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; targetNamespace=&quot;http://www.pub.org"

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; xmlns=&quot;http://www.pub.org&quot;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; elementFormDefault="qualified">

 &nbsp; &nbsp; &nbsp;  <xsd:element name="BookCatalogue&quot;>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; <xsd:complexType&gt;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;  <xsd:sequence minOccurs=";1" maxOccurs="13&quot;>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;  <xsd:element name=";Book1";  minOccurs="0&quot; />

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; <xsd:sequence minOccurs=";1" maxOccurs="23&quot;>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; <xsd:element name="Book11" minOccurs="0&quot; />

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; <xsd:element name="Book12" minOccurs="0&quot; />

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; <xsd:sequence minOccurs=";1" maxOccurs="34&quot;>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  &lt;xsd:element name=";Book21&quot; minOccurs="0&quot; />

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp;  &lt;xsd:element name=";Book22&quot; minOccurs="0&quot; />

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; </xsd:sequence>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; </xsd:sequence>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;  &nbsp; &nbsp; &nbsp; &lt;xsd:element name=&quot;Book3&quot;  minOccurs="0&quot;/>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ;  <;/xsd:sequence>

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; </xsd:complexType&gt;

 &nbsp; &nbsp; &nbsp;  </xsd:element>

</xsd:schema>

 

My App is below

 

 

static int print_parseDS(xmlDocPtr doc){

 &nbsp;  xmlSchemaPtr schemaPtr = NULL;

 

 &nbsp;  xmlSchemaParserCtxtPtr ctxt = NULL ;

 &nbsp;  xmlSchemaValidCtxtPtr vxt = NULL;

 &nbsp;  ctxt  = xmlSchemaNewDocParserCtxt(doc);

 &nbsp;  schemaPtr = xmlSchemaParse(ctxt);

}

int main(int argc , char **argv) {

 

 &nbsp;  xmlDocPtr doc = NULL;

 

 &nbsp;  doc = xmlReadFile(argv[1] ,NULL,0);

 &nbsp;  print_parseDS(doc);

 &nbsp;  xmlFreeDoc(doc);

 &nbsp;  xmlCleanupParser();

 &nbsp;  return 0;

 

}

seg fault
user name
2006-07-19 13:37:45
On Wed, Jul 19, 2006 at 04:03:36PM +0530, Vidhya wrote:
> Hi All
> 
> I have written a small app to parse the xsd file , 
> 
> When I run the following xsd file , I am getting seg
fault in libxml , and
> if I give backtrace, it loops indefinitely and prints
the following message

  Provide the XSD as an attachment, and see first if you can
reproduce it
with xmllint in the last 2.6.26 version.

  thanks,

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillardredhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
seg fault
user name
2006-07-21 10:24:44
I have attached the file which gives seg fault.


-----Original Message-----
From: Daniel Veillard [mailto:veillardredhat.com] 
Sent: Wednesday, July 19, 2006 7:08 PM
To: Vidhya
Cc: xmlgnome.org
Subject: Re: [xml] seg fault

On Wed, Jul 19, 2006 at 04:03:36PM +0530, Vidhya wrote:
> Hi All
> 
> I have written a small app to parse the xsd file , 
> 
> When I run the following xsd file , I am getting seg
fault in libxml , and
> if I give backtrace, it loops indefinitely and prints
the following
message

  Provide the XSD as an attachment, and see first if you can
reproduce it
with xmllint in the last 2.6.26 version.

  thanks,

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillardredhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )