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

Martin Sebor commented on STDCXX-211:
-------------------------------------

Invoking the test program with no arguments doesn't show any problems (on HP-UX 
or Solaris) so it looks like the bug has been fixed.

$ ./t
C C C C C C, C C C C C C
C C C C C C, C C C C C C
C C C C C C, C C C C C C
C C C C C C, C C C C C C


> 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 <cstdio>
> #include <locale>
> template <class charT>
> 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<std::time_get<charT> >(l1);
>         std::printf ("%s, %s\n", l0.name ().c_str (), l1.name ().c_str ());
>     }
>     return;
> }
> int main (int argc, char *argv[])
> {
>     foo<char>(argc > 1 ? argv [1] : "", argc > 2 ? argv [2] : "");
>     foo<wchar_t>(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.

Reply via email to