ctor_copy_dtor.cc still consuming outrageous amounts of memory

Jeffrey Oldham oldham@codesourcery.com
Wed Jul 4 10:32:00 GMT 2001


Jeffrey D. Oldham writes:
> I would like to resurrect the thread
> ( http://gcc.gnu.org/ml/libstdc++/2001-q1/msg00434.html ) that
> libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc consumes basically
> all available swap space.
> 
> Yesterday, running these tests caused my machine to hang and I
> conjecture that it killed another CodeSourcery machine last week.  I
> am using gcc 3.1 for i686-pc-linux-gnu.
> 
> Y'all (You all, You guys) who participated in the January discussion
> have more experience with the problem and so are much more likely to
> fix it.  Would you be willing to take a whack at solving it?

I should have given more information.  The offending line in
21_strings/ctor_copy_dtor.cc is 

140:		std::string str03(csz01 - 1, 'z');

Here csz01 == str01.max_size() so a string with 1073741820-1
characters is being created.

Thanks,
Jeffrey D. Oldham
oldham@codesourcery.com



More information about the Libstdc++ mailing list