[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#373937: Acknowledgement (libstdc++6: codecvt locale facet is broken)



Roger Leigh wrote:
> I have attached two additional testcases to the upstream bug report.
> The testcases are now:
> 
> Testcase to show codecvt crash
> http://gcc.gnu.org/bugzilla/attachment.cgi?id=11679 (wide.cc)
> 
> Use mbsnrtowcs directly.
> http://gcc.gnu.org/bugzilla/attachment.cgi?id=11682 (wide2.cc)
> 
> C example using mbsnrtowcs
> http://gcc.gnu.org/bugzilla/attachment.cgi?id=11683 (wide3.c)
> 
> 
> There isn't a clear pattern here.  It's possible that the testcases
> are buggy, but's it's odd how they work on one arch and not the other,
> or vice versa.

I tried wide3.c on mips and got a similiar failure pattern. However,
passing NULL as state to mbsnrtowcs, or initialising the state with
memset to zero made it work.

The example in "info glibc" shows the memset line but doesn't explain
it is required.


Thiemo



Reply to: