incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: RHAS 4u4 gcc 3.4.6 ctype.narrow failed assertion
Date Wed, 23 May 2007 23:20:04 GMT
Scott Zhong wrote:
> There is a problem with the wchar narrow / widen conversion,
> specifically wctype.cpp line 812 do_narrow.  I can't pinpoint the exact
> problem currently due to my limited knowledge on current locale and
> facet structures in stdcxx.  

You mean wctype.cpp, the library source? During which part
of the test does it happen (that might matter for which
branch of code gets executed). There are two major "modes"
that our locale might be operating in: libc mode (where we
use the libc locale data) and native mode (where we use our
own locale databases).

Martin

> 
> Yu (Scott) Zhong
> 
> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Wednesday, May 23, 2007 11:26 AM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: RHAS 4u4 gcc 3.4.6 ctype.narrow failed assertion
> 
> Scott Zhong wrote:
>> RHAS 4u4 gcc 3.4.6 ctype.narrow failed assertion
> 
> I'm not sure I follow what you're trying to tell us here. What
> problem are you pointing out? A bug in the test itself or one
> in the library? If you feel there is a problem in the ctype
> facet a better way to explain it would be to put together
> a small isolated test case.
> 
> Martin
> 
>> There are specific char values that fails widen narrow conversion in
> the
>> 22.locale.cytpe.narrow test.
>>
>> http://scottzroguewave.bravehost.com/22.locale.ctype.narrow.cpp 
>>
>> Below shows values that narrow_chars and narrow_out differ after line
>> 615 on 22.locale.ctype.narrow.cpp with this function:
>>
>> for(int k = 0; k < sizeof narrow_chars; k++)
>>             {
>>                int a = (reinterpret_cast<unsigned
>> char*>(narrow_chars))[k];
>>                int b = (reinterpret_cast<unsigned
>> char*>(narrow_out))[k];
>>                if (a != b)
>>                rw_info(0,0,__LINE__,"narrow_chars: %i, narrow_out:
> %i",
>> a, b);
>>             }
>>
>> Output:
>>
>> # TEXT: narrow_chars: 96, narrow_out: 166
>> # TEXT: narrow_chars: 97, narrow_out: 168
>> # TEXT: narrow_chars: 164, narrow_out: 172
>> # TEXT: narrow_chars: 125, narrow_out: 180
>> # TEXT: narrow_chars: 126, narrow_out: 184
>> # TEXT: narrow_chars: 82, narrow_out: 188
>> # TEXT: narrow_chars: 83, narrow_out: 189
>> # TEXT: narrow_chars: 120, narrow_out: 190
>>
>> Yu (Scott) Zhong
> 


Mime
View raw message