stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: Localedef assertion failure on Windows
Date Tue, 09 Jan 2007 17:28:49 GMT
Andrew Black wrote:
> Greetings all.
> 
> When building the UTF-8 locales on windows with the debug version of the 
>  localedef utility, the localedef utility terminates with a failed 
> assertion within the library (in __rw_debug_iter::operator*() in 
> _iterbase.h).  Within collate.cpp, the failure occurs on line 579.
> 
> A trace of the code

It might be helpful to see the stack trace.

> indicates that the last good iteration across this 
> line is iteration number 56677, for the token 'UFFFD'.

I assume this on line 23337 of UTF-8.

> The following 
> token (<U00010300>) fails because __rw_debug_iter::_C_is_end() returns 
> true.  However, my reading of collate.cpp is that this condition 
> shouldn't happen, as the termination condition of loop containing the 
> statement in question is suppose to terminate when this condition is 
> reached.
> 
> Does this indicate a flaw in std::map or something else?

More likely, in collate.cpp or somewhere in the rest of localedef.
I suspect it has to do with wchar_t being only 16 bits wide on
Windows and the character map containing characters (such as
<U00010300>) beyond that range. To fix this we'll either need to
replace wchar_t with a 32-bit type or ignore characters that do
not fit in 16 bits on Windows (and wherever else wchar_t isn't
32 bits, such as AIX).

Martin

Mime
View raw message