stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liviu Nicoara (JIRA)" <>
Subject [jira] [Commented] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
Date Fri, 28 Sep 2012 12:12:08 GMT


Liviu Nicoara commented on STDCXX-1072:

The kernel patch changed the alignment of the userland mutex objects from a machine word to
a double-word boundary. No changes are required of the users who use such objects in their
programs unless users create mutex objects in buffers which may not be aligned on a proper
boundary. E.g., the following are safe:

mutex_t lock;

struct S {
    char misalign;
    mutex_t lock;

whereas the following is not:

union {
    void* align;
    char buf [sizeof mutex_t];
} u;

new (&u) mutex_t;

because the alignment requirements for void pointer are less strict than for mutex_t. A few
places in the library use the latter for all sorts of static objects (mostly local statics).
> [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
> --------------------------------------------------------------
>                 Key: STDCXX-1072
>                 URL:
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Thread Safety
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1
>         Environment: Oracle Solaris on SPARC V8 (or V9 emulation?) hardware.
>            Reporter: Liviu Nicoara
>              Labels: SPARC, Solaris, V8, alignment, mutex
>             Fix For: 4.2.x, 4.3.x, 5.0.0
>   Original Estimate: 4h
>  Remaining Estimate: 4h
> The issue has been reported in STDCXX-1066. The originator was apparently an improvement
(as a response to CR 6296770: shipped with KU 137111-01 (
which requires stricter alignment than the machine word for userland mutexes. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message