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]
Other format: [Raw text]

RE: [PATCH] Handle variable width encodings in basic_filebuf::seekpos


Paolo Carlini wrote:
> >While testing the patch, I got a spurious failure in
> >testsuite/22_locale/locale/cons/12438.cc. It seems the memory limit
> >was set too low to run the loop even once. I doubled both the
> >memory limit and the loop count to make the test pass.
> >
> Really weird.
> On my system the test doesn't consume more than ~1 Mb and I *never* saw
> it spuriously failing. Anyway, increasing *both* the numbers is ok with
> me and indeed makes the test more robust (but it takes a little longer
> to run it ;)

The trouble is in the line:
locale loc2 = __gnu_test::try_named_locale("");
This constructs a new locale based on the LC_ALL or LANG environment
variable. If LANG is C, then the new locale is just a new reference
to _S_classic, otherwise the relevant locale data is read in.

When I run the test with LANG=C, it uses less than 1MB of memory and
runs OK, but when run with LANG=is_IS.UTF-8, it uses 2.9MB and
fails. Setting the limit to 5MB allows it to run with both settings
of LANG.

Petur


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