This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 21_strings/insert.cc on the mainline


On Mon, Apr 16, 2001 at 04:47:18PM -0400, Phil Edwards wrote:
>   str03.insert(13, str02, 0, 12);
>   VERIFY( str03 == "rodeo beach, baker beach,marin" );

Well, one more piece of info.  str02 (a "const" string object, ha ha) is
corrupt by this point.  Around line 58, one of the first tests takes place:

    str03.insert(csz01 + 1, str02, 0, 5);

If I ask gdb to go to the 'n'ext line, rather than going to line 62 or 68,
it skips all the way down to line 112, and str02 now contains four garbage
characters.  Uh-huh.  If I tell gdb to kill and restart the test binary,
gdb segfaults.


Phil

-- 
pedwards at disaster dot jaj dot com  |  pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools.  Fools are protected by more capable fools.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]