[Expat-discuss] Reg: Segmentation Fault in Expat 2.0.0

madeshg at soc-soft.com madeshg at soc-soft.com
Tue Jan 30 06:51:24 CET 2007


Hi,

The memory allocation function maintains information about allocated
memory. A common scheme is to place this data as a prefix and/or suffix
to the allocated block. Depending on the implementation, there may be
some slack added to the amount of memory you actually request, leaving a
little buffer around these fence posts. Anyway, if you write more data
than you have allocated storage for, these data areas get corrupted.
Then, when you do the free, memory allocate function acts on erroneous
information, and seg faults. Since there isn't a immediate problem on
overwriting the fence post, this can cause seemingly random errors.

Regards,
Madesh G.

-----Original Message-----
From: ramamurthy.suresh at wipro.com [mailto:ramamurthy.suresh at wipro.com] 
Sent: Tuesday, January 30, 2007 9:25 AM
To: expat-discuss at libexpat.org
Subject: [Expat-discuss] Reg: Segmentation Fault in Expat 2.0.0


Hi,
 
Im using Expat - 2.0.0. Initially i tried to test the example code
provided in the package (expat-2.0.0/examples). I call the main function
provided by with in a loop. I wrote my own main, from that i call it.
First threetimes it parses the xml file correctly, in the fourth time
while allocating memory for the dataBuf (XML_Char) it receives SIGSEGV.
The program then terminates with a Segmentation fault. 
 
Is this a bug in Expat? If it so can be fixed?
 
Thanks in advance 
Suresh R.



The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
 
www.wipro.com
_______________________________________________
Expat-discuss mailing list
Expat-discuss at libexpat.org
http://mail.libexpat.org/mailman/listinfo/expat-discuss


More information about the Expat-discuss mailing list