Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 55869 invoked from network); 2 Mar 2007 00:05:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Mar 2007 00:05:11 -0000 Received: (qmail 41117 invoked by uid 500); 2 Mar 2007 00:05:20 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 41101 invoked by uid 500); 2 Mar 2007 00:05:20 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 41089 invoked by uid 99); 2 Mar 2007 00:05:20 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2007 16:05:20 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2007 16:05:10 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AC6A27142B6 for ; Thu, 1 Mar 2007 16:04:50 -0800 (PST) Message-ID: <6583342.1172793890684.JavaMail.jira@brutus> Date: Thu, 1 Mar 2007 16:04:50 -0800 (PST) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Commented: (STDCXX-211) SIGABRT in locale combining ctor after use_facet In-Reply-To: <27733254.1151516971293.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477141 ] Martin Sebor commented on STDCXX-211: ------------------------------------- Interesting. It still aborts on HP-UX with the two locales mentioned in the report but works with some others: ./t es_ES.utf8 en_US.iso88591 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8, es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 en_US.iso88591 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8, es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 en_US.iso88591 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8, es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 en_US.iso88591 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8, es_ES.utf8 es_ES.utf8 es_ES.utf8 es_ES.utf8 en_US.iso88591 es_ES.utf8 Modifying the test case to catch exceptions shows that the da_DK.iso8859 locale isn't valid even though it's installed (i.e., it shows up in the output of locale -a): $ cat t.cpp && gmake t && ./t da_DK.iso8859 en_US.roman8 #include #include #include template void foo (const char *name1, const char *name2) { try { const std::locale l0 (name1); const std::locale l1 (l0, name2, std::locale::time); std::printf ("%s, %s\n", l0.name ().c_str (), l1.name ().c_str ()); std::use_facet >(l1); std::printf ("%s, %s\n", l0.name ().c_str (), l1.name ().c_str ()); } catch (const std::exception &e) { std::printf ("caught exception (\"%s\")\n", e.what ()); } } int main (int argc, char *argv[]) { foo(argc > 1 ? argv [1] : "", argc > 2 ? argv [2] : ""); foo(argc > 1 ? argv [1] : "", argc > 2 ? argv [2] : ""); } aCC -c -I/nfs/devco/sebor/dev/stdlib/include/ansi -I/usr/include -D_RWSTDDEBUG -mt -D_RWSTD_USE_CONFIG -I/nfs/devco/sebor/dev/stdlib/include -I/build/sebor/aCC-3.70-15S/include -I/nfs/devco/sebor/dev/stdlib/examples/include -Aa +nostl -g +d +DD64 +w +W392 +W655 +W684 +W818 +W819 +W849 t.cpp aCC t.o -o t -Aa +nostl -Wl,+s -Wl,+vnocompatwarnings -mt +DD64 -L/build/sebor/aCC-3.70-15S/lib -lstd15S -lm caught exception ("/amd/devco/sebor/dev/stdlib/src/locale_combine.cpp:639: std::locale::locale(const char *): bad locale name: "da_DK.iso8859"") caught exception ("/amd/devco/sebor/dev/stdlib/src/locale_combine.cpp:639: std::locale::locale(const char *): bad locale name: "da_DK.iso8859"") > SIGABRT in locale combining ctor after use_facet > ------------------------------------------------ > > Key: STDCXX-211 > URL: https://issues.apache.org/jira/browse/STDCXX-211 > Project: C++ Standard Library > Issue Type: Bug > Components: 22. Localization > Affects Versions: 4.1.3, 4.1.2 > Environment: all > Reporter: Martin Sebor > > Moved from the Rogue Wave bug tracking database: > ****Created By: sebor @ Jun 19, 2004 03:00:35 PM**** > The program below aborts on most (if not all) platforms. Output shown is on HP-UX 11.00 with aCC 3.52. > $ cat t.cpp > #include > #include > template > void foo (const char *name1, const char *name2) > { > { > const std::locale l0 (name1); > const std::locale l1 (l0, name2, std::locale::time); > std::printf ("%s, %s\n", l0.name ().c_str (), l1.name ().c_str ()); > std::use_facet >(l1); > std::printf ("%s, %s\n", l0.name ().c_str (), l1.name ().c_str ()); > } > return; > } > int main (int argc, char *argv[]) > { > foo(argc > 1 ? argv [1] : "", argc > 2 ? argv [2] : ""); > foo(argc > 1 ? argv [1] : "", argc > 2 ? argv [2] : ""); > } > $ aCC -c -I/build/sebor/dev/stdlib/include/ansi -I/usr/include -D_RWSTDDEBUG -D_RWSTD_NO_EXTERN_TEMPLATE -D_RWSTD_USE_CONFIG -I/build/sebor/aCC-3.52-11s/include -I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/../rwtest -I/build/sebor/dev/stdlib/../rwtest/include -I/build/sebor/dev/stdlib/tests/include -Aa +nostl -g +d +w +W392 +W655 +W684 +W818 +W819 +W849 t.cpp && aCC t.o -o t -L/build/sebor/aCC-3.52-11s/rwtest -lrwtest11s -L/build/sebor/aCC-3.52-11s/lib -lstd11s -lm -Aa +nostl -Wl,+s -Wl,+vnocompatwarnings -L/build/sebor/aCC-3.52-11s/lib && ./t > C C C C C C, C C C C C C > *, * > /build/sebor/dev/stdlib/src/locale_combine.cpp:571: static __rw::__rw_locale *__rw::__rw_locale::_C_make_body(__rw::__rw_locale *,__rw::__rw_locale *,const char *,int,const __rw::__rw_facet *): Assertion '!plocale || plocale->_C_is_managed (_STD::locale::none)' failed. > ( 0) 0x00010440 __rw_assert_fail__4__rwFPCcT1iT1 + 0x7c [././t] > ( 1) 0x0001ae58 _C_make_body__Q2_4__rw11__rw_localeSFPQ2_4__rw11__rw_localeT1PCciPCQ2_4__rw10__r + 0x464 [././t] > ( 2) 0x0001b3cc __ct__Q2_3std6localeFPCc_2 + 0x5c [././t] > ( 3) 0x0000bf94 foo__XTw_FPCcT1 + 0x20 [././t] > ( 4) 0x0000be2c main + 0x94 [././t] > ( 5) 0xc013e8fc _start + 0xc8 [/usr/lib/libc.2] > ( 6) 0x0000acb0 $START$ + 0x178 [././t] > ABORT instruction (core dumped) > $ ./t da_DK.iso8859 en_US.roman8 > ABORT instruction (core dumped) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.