incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-477) SIGABRT calling std::locale::operator==() from multiple threads in debug configurations
Date Sun, 08 Jul 2007 22:37:04 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511005
] 

Martin Sebor commented on STDCXX-477:
-------------------------------------

This looks like an ordinary logic error in std::locale::operator==(const std::locale&),
not something thread-specific. A reduced test case is below:

$ cat t.cpp && make t && ./t
#include <cassert>
#include <locale>

int main ()
{
    const std::locale en ("en_US");
    const std::locale es ("es_ES");

    assert (en != es);
}
icc -c -I/home/sebor/stdcxx/include/ansi -D_RWSTDDEBUG   -D_REENTRANT -I/home/sebor/stdcxx/include
-I/build/sebor/stdcxx-icc-10.0.025-15S/include -I/home/sebor/stdcxx/examples/include  -cxxlib-nostd
-g   -w1   t.cpp
icc t.o -o t -cxxlib-nostd  -lpthread  -L/build/sebor/stdcxx-icc-10.0.025-15S/lib  -lstd15S
-lcxaguard -lsupc++ -lm 
/home/sebor/stdcxx/src/locale_eq.cpp:73: bool std::locale::operator==(const std::locale &)
const: Assertion '_C_body->_C_std_facet_bits != _C_body->_C_all || rhs._C_body->_C_std_facet_bits
!= _C_body->_C_all || _C_body->_C_byname_facet_bits != _C_body->_C_all || rhs._C_body->_C_byname_facet_bits
!= _C_body->_C_all' failed.
./t[0x41f432]
./t[0x41f4fd]
./t[0x41ea57]
./t[0x40ad63]
./t[0x41b7b7]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x39f821da44]
./t[0x41b685]
Aborted


> SIGABRT calling std::locale::operator==() from multiple threads in debug configurations
> ---------------------------------------------------------------------------------------
>
>                 Key: STDCXX-477
>                 URL: https://issues.apache.org/jira/browse/STDCXX-477
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 22. Localization
>    Affects Versions: 4.1.3, 4.1.2
>            Reporter: Martin Sebor
>
> The 22.locale.cons.mt test causes a SIGABRT in std::locale::operator==() but only in
debug builds:
> $ ./22.locale.cons.mt --nloops=10000
> # INFO (S1) (10 lines):
> # TEXT: 
> # COMPILER: Intel C++, __INTEL_COMPILER = 1000, __INTEL_COMPILER_BUILD_DATE = 20070613,
__EDG_VERSION__ = 308
> # ENVIRONMENT: x86_64/LP64 running linux-elf (Fedora Core release 6 (Zod)) with glibc
2.5
> # FILE: 22.locale.cons.mt.cpp
> # COMPILED: Jul  8 2007, 15:54:33
> # COMMENT: thread safety
> ############################################################
> # CLAUSE: lib.locale.cons
> # NOTE (S2) (5 lines):
> # TEXT: executing "locale -a > /tmp/tmpfile-n8bvda"
> # CLAUSE: lib.locale.cons
> # FILE: process.cpp
> # LINE: 274
> # INFO (S1) (3 lines):
> # TEXT: testing std::locale ctors with 2 threads, 10000 iterations each, in 32 locales
{ "aa_DJ" "aa_DJ.iso88591" "aa_DJ.utf8" "aa_ER" "aa_ER@saaho" "aa_ER.utf8" "aa_ER.utf8@saaho"
"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.cons
> /home/sebor/stdcxx/src/locale_eq.cpp:73: bool std::locale::operator==(const std::locale
&) const: Assertion '_C_body->_C_std_facet_bits != _C_body->_C_all || rhs._C_body->_C_std_facet_bits
!= _C_body->_C_all || _C_body->_C_byname_facet_bits != _C_body->_C_all || rhs._C_body->_C_byname_facet_bits
!= _C_body->_C_all' failed.
> ./22.locale.cons.mt[0x45896e]
> /home/sebor/stdcxx/src/locale_eq.cpp:73: bool std::locale::operator==(const std::locale
&) const: Assertion '_C_body->_C_std_facet_bits != _C_body->_C_all || rhs._C_body->_C_std_facet_bits
!= _C_body->_C_all || _C_body->_C_byname_facet_bits != _C_body->_C_all || rhs._C_body->_C_byname_facet_bits
!= _C_body->_C_all' failed.
> ./22.locale.cons.mt[0x45896e]
> ./22.locale.cons.mt[0x458a39]
> ./22.locale.cons.mt[0x46030f]
> ./22.locale.cons.mt[0x4412ec]
> /lib64/libpthread.so.0[0x39fae06305]
> /lib64/libc.so.6(clone+0x6d)[0x39f82cd50d]
> Aborted

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message