stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Far...@kyiv.vdiweb.com>
Subject RE: Infinity loop in locale utility
Date Tue, 22 Aug 2006 11:56:16 GMT
> -----Original Message-----
> From: Andrew Black [mailto:ablack@roguewave.com] 
> Sent: Tuesday, August 22, 2006 2:06 AM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: Infinity loop in locale utility
> 
> If you want a test case on Solaris, I suspect any of the 
> @euro or UTF-8 locales will show this, among others.  These 
> locales are terminating with a return code of 143 in 
> automated testing, likely due to being killed by the exec utility.

  I confirm partially. I have got the failed assertion with all UTF-8
locales on Windows. The debugger shows place of the assertion
(_iterbase.h, line 436):
-----------
    reference operator* () const {
        _RWSTD_ASSERT (_C_is_dereferenceable ());
        return *_C_iter;
    }
-----------

The call stack is: create_locale(); Def::process_input();
process_collate();
Def::add_missing_values().

  Here (collate.cpp, line 538, Def::add_missing_values()) the result of
.find()
method is dereferenced without check to != charmap_.get_w_cmap().end():
-----------
    for (strval_map_it = charmap_.get_strval_map().begin();
         strval_map_it != charmap_.get_strval_map().end();
         strval_map_it++) {
        wchar_t wchar_val = (*charmap_.get_w_cmap().find 
                             ((*strval_map_it).second)).second;
-----------

Farid.

Mime
View raw message