stdcxx-issues 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-827) SIGBUS in 22.locale.stdcxx-554
Date Mon, 07 Apr 2008 16:13:24 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586452#action_12586452
] 

Martin Sebor commented on STDCXX-827:
-------------------------------------

That would be one way of ensuring proper alignment.

The other approach is to use a union:

{noformat}
template <class charT>
void test_moneypunct (charT)
{
    typedef std::moneypunct <charT> PunctT;

    const char fill = '\xdc';

    union {
        void *align;
        char buf [sizeof (PunctT) + 1];
    } buf;
    std::memset (&buf, fill, sizeof (buf));

    PunctT* p = new (buf.buf) PunctT ();
    assert (fill == buf.buf [sizeof (PunctT)]);
{noformat}

> SIGBUS in 22.locale.stdcxx-554
> ------------------------------
>
>                 Key: STDCXX-827
>                 URL: https://issues.apache.org/jira/browse/STDCXX-827
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: trunk
>         Environment: HP aCC 3.73/HP-UX/PA-RISC, Sun C++/Solaris
>            Reporter: Martin Sebor
>            Assignee: Eric Lemings
>             Fix For: 4.2.1
>
>   Original Estimate: 3h
>          Time Spent: 2h
>  Remaining Estimate: 1h
>
> The regression test [22.locale.stdcxx-554.cpp|http://svn.apache.org/repos/asf/stdcxx/trunk/tests/regress/22.locale.stdcxx-554.cpp]
abends with SIGBUS on some platforms:
> * HP aCC 3.73 on HP-UX/PA-RISC
> * gcc 4.1.1 or Sun C++ 5.9 on Solaris 10/SPARC

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