This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
21_strings/insert.cc on the mainline
- To: libstdc++ at gcc dot gnu dot org
- Subject: 21_strings/insert.cc on the mainline
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Mon, 16 Apr 2001 16:47:18 -0400
It's been passing on the branch and failing on the trunk, at least since
the 10th. The test itself hasn't changed.
The failure is in this block of code:
str03 = str01;
csz01 = str03.size();
csz02 = str02.size();
str03.insert(13, str02, 0, 12);
VERIFY( str03 == "rodeo beach, baker beach,marin" );
At the start of the block, after the assignmnet, str03 is
rodeo beach, marin
After the insertion, str03 is (incorrectly)
rodeo beach, Xmarin
where X is a single random garbage-memory byte, never the same from run
to run. The insertion is supposed to take place starting at position X,
as can be seen from the expected results in the VERIFY statement.
I can see nothing obvious in the ChangeLogs; it doesn't look like anyone's
altered the std::string code lately. Any ideas while I start firing up gdb?
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.