You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Travis Vitek (JIRA)" <ji...@apache.org> on 2008/01/15 18:01:37 UTC

[jira] Updated: (STDCXX-665) [IBM XLC++ 9.0/AIX 5.3] 22.locale.messages fails with assertions

     [ https://issues.apache.org/jira/browse/STDCXX-665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Travis Vitek updated STDCXX-665:
--------------------------------

    Attachment: stdcxx-665.patch

A slightly modified version of the above testcase exposed the answer, but the behavior is still inconsistent with the AIX documentation for catopen(). The documentation says "The NLSPATH environment variable defines the directory search path. When this variable is used, the setlocale subroutine must be called before the catopen subroutine." I found that adding a call to setlocale(LC_ALL, "C") in there isn't enough, and it won't work. You have to set the locale to some non-classic locale. It doesn't really matter which one you use, but it is required that he locale be set to something other than "C".

So now the question is what do I do about this? The options I see are...

1. add a note to the documentation mentioning the limitation.
2. work around the issue and call setlocale() in the test with some known locale on AIX.
3. add an expected failure for this test.
4. modify the messages<T>::open() function to temporarily set the locale so that the call will have a chance of succeeding?

I think option 4 is totally out. It would not be thread safe, and selecting an appropriate locale could be problematic. I don't really like option 3 all that much either, because there is no way to indicate that we expect two assertion failures, and we have no way to tag those specific failures. This could potentially hide regressions.

So that leaves me with options 1 and 2, or some combination of them. I'm attaching a patch for review. It doesn't include any documentation changes. If it is determined that a documentation change is necessary, I'll update the patch for that.

> [IBM XLC++ 9.0/AIX 5.3] 22.locale.messages fails with assertions
> ----------------------------------------------------------------
>
>                 Key: STDCXX-665
>                 URL: https://issues.apache.org/jira/browse/STDCXX-665
>             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
>
>         Attachments: stdcxx-665.patch
>
>
> Currently only single threaded builds show this problem
> NAME                           STATUS WARN ASSERTS FAILED PERCNT    USER     SYS    REAL
> 22.locale.messages                  0    0     268    106    60%   0.090   0.640   3.960

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