dotgnu-pnet
[Top][All Lists]
Advanced

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

[Pnet-developers] [bugs #7404] StringBuilder related segfault.


From: Richard Baumann
Subject: [Pnet-developers] [bugs #7404] StringBuilder related segfault.
Date: Sat, 24 Jan 2004 00:36:16 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686) Gecko/20030521 Galeon/1.3.4 Debian/1.3.4.20030526-1

This mail is an automated notification from the bugs tracker
 of the project: DotGNU Portable.NET.




/**************************************************************************/
[bugs #7404] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=7404>
Project: DotGNU Portable.NET
Submitted by: Richard Baumann
On: Sat 01/24/04 at 05:36

Category:  None
Severity:  5 - Average
Item Group:  None
Resolution:  None
Assigned to:  None
Status:  Open


Summary:  StringBuilder related segfault.

Original Submission:  I can't seem to get a simple test case to exhibit this 
behavior, so I've attached a patch which reverts my xml code to an earlier 
version which exhibits this behavior, and a simple xml test case which should 
segfault because of it. Although I'm not exactly sure where in the engine the 
problem is occurring, I do know what's going wrong.

The "garbage" StringBuilder, with a capacity and maxCapacity of 1, in the 
XmlParserInputBase class, is somehow winding up with a buildString of length 2. 
The AppendSpace code in StringBuilder assumes the length would never be greater 
than the maxCapacity, so it ends up returning -1 to Append. I traced the 
managed code sets of the String's length variable (by renaming length to 
length__ and adding a length property with traces) and by the time it's first 
set, the length is already at 2. Because of this, I think it's probably 
somewhere in pnet/engine/lib_string.c but the NewBuilder icall looks ok. That's 
as far as I was able to get before giving up.





File Attachments
-------------------

-------------------------------------------------------
Date: Sat 01/24/04 at 05:36  Name: ilrun-segfault.tar.gz  Size: 4KB   By: 
Rich333
xml patch and test case, which, when combined, should reproduce the problem
http://savannah.gnu.org/bugs/download.php?item_id=7404&amp;item_file_id=996






For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=7404>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]