Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#307 setlocale() not thread safe on Windows XP

closed-invalid
nobody
None
5
2012-07-06
2012-07-06
SephiRok
No

This affects e.g. operator>>(istream, double).

Occurs on 1.0 automated builds and latest sezero build, that is mingw-w64 release-v1.0.4.

Issue from the MinGW tracker (includes example): http://sourceforge.net/tracker/?func=detail&aid=2843440&group_id=2435&atid=102435

Trace example:
(0) [0x77c3330c] ___unguarded_readlc_active_add_func + 465
(1) [0x77c3356a] ___unguarded_readlc_active_add_func + 1071
(2) [0x77c33bf5] ___unguarded_readlc_active_add_func + 2746
(3) [0x77c33c94] setlocale + 99
(4) [0x6fcb8ea3] void std::__convert_to_v<double>(char const*, double&, std::_Ios_Iostate&, int* const&) + 147
(5) [0x6fc67e4d] std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, double&) const + 189
(6) [0x6fc80bb3] std::istream& std::istream::_M_extract<double>(double&) + 195

Discussion

  • Ozkan Sezer
    Ozkan Sezer
    2012-07-06

    • status: open --> closed-invalid
     
  • Ozkan Sezer
    Ozkan Sezer
    2012-07-06

    This is not a problem with mingw-w64 but a problem with setlocale() which we import from MS dlls. Closing as invalid.