bugDotGNU Portable.NET - Bugs: bug #1392, StringBuilder.Insert() bug

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #1392: StringBuilder.Insert() bug

Submitted by:  Gopal.V <t3rmin4t0r>
Submitted on:  Thu 10 Oct 2002 02:30:53 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Thu 10 Oct 2002 02:30:53 PM UTC, original submission:

I seem to have tracked down a bug in String.InsertSpace() ...
This is the source of the bug discovered by Jonathan Springer in
StringBuilder.Insert()... hmm... Trouble shooting also needs a good=20
tracker and a nice gun :-)

StringBuilder sb=3Dnew StringBuilder("bar123456789");
sb.Insert(0,"foo");
Console.WriteLine(sb.ToString());

give "foobar123789" and not "foobar123456789"

Errant function is `void _IL_String_InsertSpace'
In File pnet/engine/lib_string.c : 733=20

ILMemMove(StringToBuffer(dest) + destPos,
StringToBuffer(dest) + srcPos, dest->length - srcPos);

Unfortunately the ILMemMove seems to overwrite the existing data if
the two regions overlap ?

lib_string.c:737 <bar123456789>
lib_string.c:740 <barbar123789>
foobar123789=00=00=00

This is what I get when I try to printf an ILStringToAnsi the dest
before and after the ILMemMove...

Gopal.V <t3rmin4t0r>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 11 Nov 2002 03:04:28 AM UTCspringjpStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1