This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: 21_strings/insert.cc on the mainline
- To: libstdc++ at gcc dot gnu dot org
- Subject: Re: 21_strings/insert.cc on the mainline
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Mon, 16 Apr 2001 17:07:35 -0400
- References: <20010416164718.A32340@disaster.jaj.com>
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.