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-664) [IBM XLC++ 9.0/AIX 5.3] SIGABRT in 22.locale.globals.mt
Date Thu, 13 Dec 2007 04:47:43 GMT

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

Martin Sebor commented on STDCXX-664:
-------------------------------------

Didn't someone just say how much fun XLC++ is? ;-)

Yes, I should have remembered the -qrrti flag when I saw the issue...

As for your options, I think the decision comes down to whether we just want to "fix" the
test and leave it up to users to decide if they want to compile with -qrtti, or make the library
behave correctly as we build it. If the former, we could just add some preprocessor logic
to the test and #ifdef out the problematic assertions. If the latter, enabling RTTI would
seem like the way to go. IIRC, we chose to stick with the default setting of the -qrtti option
for stdcxx on the basis that we should try to avoid requiring special options as much as possible;
in our measurements, the option also lead to a slight increase in the size of the generated
code. Maybe that's changed in 9.0? If not, I would tend to lean toward "fixing" the test and
documenting this in the README or someplace people are likely to look.

Regarding adding __rw_get_facet_by_id() overloads for the _byname facets, would those be robust
enough to handle the case of _byname derivates (e.g., class MyCtype: std::ctype_byname<char>)?
I.e., this test case:

#include <cassert>
#include <locale>

struct DerivedCtype: std::ctype_byname<char>
{
    DerivedCtype (): std::ctype_byname<char>("") { }
};

template <class Facet>
bool check_use_facet (const std::locale &locale)
{
    try {
        std::use_facet<Facet>(locale);
    }
    catch (...) {
        return false;
    }
    return true;
}


int main ()
{
    const std::locale classic = std::locale::classic ();
    const std::locale named ("en_US.ISO-8859-1");
    const std::locale user (classic, new DerivedCtype);

    assert (check_use_facet<std::ctype<char> >(classic));
    assert (!check_use_facet<std::ctype_byname<char> >(classic));
    assert (!check_use_facet<DerivedCtype>(classic));

    assert (check_use_facet<std::ctype<char> >(named));
    assert (check_use_facet<std::ctype_byname<char> >(named));
    assert (!check_use_facet<DerivedCtype>(named));

    assert (check_use_facet<std::ctype<char> >(user));
    assert (check_use_facet<std::ctype_byname<char> >(user));
    assert (check_use_facet<DerivedCtype>(user));
}


> [IBM XLC++ 9.0/AIX 5.3] SIGABRT in 22.locale.globals.mt
> -------------------------------------------------------
>
>                 Key: STDCXX-664
>                 URL: https://issues.apache.org/jira/browse/STDCXX-664
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 4.2.0
>            Reporter: Travis Vitek
>            Assignee: Travis Vitek
>             Fix For: 4.2.1
>
>
> Appears to affect single-threaded bulids only.
> [vitek@rimple tests]$ ./22.locale.globals.mt 
> # INFO (S1) (10 lines):
> # TEXT: 
> # COMPILER: IBM VisualAge C++, __IBMCPP__ = 900
> # ENVIRONMENT: powerpc running aix-5.3
> # FILE: 22.locale.globals.mt.cpp
> # COMPILED: Nov  8 2007, 21:35:16
> # COMMENT: thread safety
> ############################################################
> # CLAUSE: lib.locale.global.templates
> # NOTE (S2) (5 lines):
> # TEXT: executing "locale -a > /tmp/tmpfile-fK3jqa"
> # CLAUSE: lib.locale.global.templates
> # FILE: process.cpp
> # LINE: 270
> # INFO (S1) (3 lines):
> # TEXT: testing std::locale globals with 1 thread, 20000 iterations each, in 16 locales
{ "C" "POSIX" "AR_DZ.UTF-8" "AR_BH" "AR_AA.UTF-8" "AR_BH.UTF-8" "AR_AE.UTF-8" "AR_DZ" "AR_EG.UTF-8"
"AR_EG" "AR_AE" "AR_AA" "AR_JO" "AR_JO.UTF-8" "AR_KW" "AR_KW.UTF-8" }
> # CLAUSE: lib.locale.global.templates
> # INFO (S1) (3 lines):
> # TEXT: template <class T> bool std::has_facet (const locale&)
> # CLAUSE: lib.locale.global.templates
> # INFO (S1) (3 lines):
> # TEXT: template <class T> const T& std::use_facet (const locale&)
> # CLAUSE: lib.locale.global.templates
> # WARNING (S5) (3 lines):
> # TEXT: exceptions not thread safe, skipping that part of test
> # CLAUSE: lib.locale.global.templates
> /amd/devco/vitek/stdcxx-trunk/tests/localization/22.locale.globals.mt.cpp:311: use_facet_loop:
Assertion 'threw || opt_facets [opt_inx_collate] < 0' failed.
> IOT/Abort trap (core dumped)
> [vitek@rimple tests]$ 

-- 
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