std::numpunct not thread safe ----------------------------- Key: STDCXX-452 URL: https://issues.apache.org/jira/browse/STDCXX-452 Project: C++ Standard Library Issue Type: Bug Components: 22. Localization Affects Versions: 4.1.2 Environment: all Reporter: Martin Sebor Priority: Blocker Attachments: 22.locale.numpunct.mt.html
The 22.locale.numpunct.mt thread safety tests aborts at runtime indicating that there is a thread safety issue in the locale implementation. Running the test through the Intel Thread Checker reveals possible causes of the problem. $ tcheck_cl -v && make 22.locale.numpunct.mt && tcheck_cl -f html -o 22.locale.numpunct.mt ./22.locale.numpunct.mt --nthreads=2 --nloops=1000 Intel(R) Thread Checker 3.1 command line instrumentation driver (24400) Copyright (c) 2007 Intel Corporation. All rights reserved. make: `22.locale.numpunct.mt' is up to date. Intel(R) Thread Checker 3.1 command line instrumentation driver (24400) Copyright (c) 2007 Intel Corporation. All rights reserved. Building project Running: /build/sebor/stdcxx-icc-9.1_049-15S/tests/22.locale.numpunct.mt --nthreads=2 --nloops=1000 # INFO (S1) (10 lines): # TEXT: # COMPILER: Intel C++, __INTEL_COMPILER = 910, __INTEL_COMPILER_BUILD_DATE = 20070320, __EDG_VERSION__ = 306 # ENVIRONMENT: x86_64/LP64 running linux-elf 2.4.20 with glibc 2.3 # FILE: 22.locale.numpunct.mt.cpp # COMPILED: Jun 13 2007, 14:05:31 # COMMENT: thread safety ############################################################ # CLAUSE: lib.locale.numpunct # NOTE (S2) (5 lines): # TEXT: executing "locale -a > /tmp/tmpfile-FZLyTh" # CLAUSE: lib.locale.numpunct # FILE: process.cpp # LINE: 274 # INFO (S1) (3 lines): # TEXT: testing std::numpunct<charT> with 2 threads, 1000 iterations each, in locales { "aa_DJ" "aa_DJ.iso88591" "aa_DJ.utf8" "aa_ER" "[EMAIL PROTECTED]" "aa_ER.utf8" "[EMAIL PROTECTED]" "aa_ET" "aa_ET.utf8" "af_ZA" "af_ZA.iso88591" "af_ZA.utf8" "am_ET" "am_ET.utf8" "an_ES" "an_ES.iso885915" "an_ES.utf8" "ar_AE" "ar_AE.iso88596" "ar_AE.utf8" "ar_BH" "ar_BH.iso88596" "ar_BH.utf8" "ar_DZ" "ar_DZ.iso88596" "ar_DZ.utf8" "ar_EG" "ar_EG.iso88596" "ar_EG.utf8" "ar_IN" "ar_IN.utf8" "ar_IQ" } # CLAUSE: lib.locale.numpunct # INFO (S1) (3 lines): # TEXT: exercising std::numpunct<char> # CLAUSE: lib.locale.numpunct /amd/devco/sebor/stdcxx/tests/localization/22.locale.numpunct.mt.cpp:128: void *thread_func(void *): Assertion '0 == rw_strncmp (fn.c_str (), data->falsename_)' failed. /build/sebor/stdcxx-icc-9.1_049-15S/tests/./22.locale.numpunct.mt[0x8ad9fc] Application finished -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.