You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@stdcxx.apache.org by "Liviu Nicoara (JIRA)" <ji...@apache.org> on 2012/09/28 14:02:07 UTC
[jira] [Created] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Liviu Nicoara created STDCXX-1072:
-------------------------------------
Summary: [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
Key: STDCXX-1072
URL: https://issues.apache.org/jira/browse/STDCXX-1072
Project: C++ Standard Library
Issue Type: Bug
Components: Thread Safety
Affects Versions: 4.2.1, 4.2.0, 4.1.4, 4.1.3, 4.1.2
Environment: Oracle Solaris on SPARC V8 (or V9 emulation?) hardware.
Reporter: Liviu Nicoara
Fix For: 4.2.x, 4.3.x, 5.0.0
The issue has been reported in STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) 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: http://www.atlassian.com/software/jira
[jira] [Commented] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Posted by "Liviu Nicoara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13465554#comment-13465554 ]
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:
{noformat}
mutex_t lock;
struct S {
char misalign;
mutex_t lock;
};
{noformat}
whereas the following is not:
{noformat}
union {
void* align;
char buf [sizeof mutex_t];
} u;
new (&u) mutex_t;
{noformat}
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: https://issues.apache.org/jira/browse/STDCXX-1072
> 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: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) 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: http://www.atlassian.com/software/jira
[jira] [Resolved] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Posted by "Liviu Nicoara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liviu Nicoara resolved STDCXX-1072.
-----------------------------------
Resolution: Fixed
> [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
> --------------------------------------------------------------
>
> Key: STDCXX-1072
> URL: https://issues.apache.org/jira/browse/STDCXX-1072
> Project: C++ Standard Library
> Issue Type: Bug
> Components: Thread Safety
> Affects Versions: 4.2.1, 4.2.x, 4.3.x, 5.0.0
> Environment: Oracle Solaris on SPARC V8 (or V9 emulation?) hardware.
> Reporter: Liviu Nicoara
> Assignee: Liviu Nicoara
> Labels: SPARC, Solaris, V8, alignment, mutex
> Fix For: 4.2.x, 4.3.x, 5.0.0
>
> Attachments: after-runall.log, before-runall.log, patch.2.diff, patch.diff
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> The issue has been reported in STDCXX-1040, then STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
> Quoting here the Fujitsu patch notes (in case it goes away):
> {quote}
> {noformat}
> 2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
> *2) ... example of programming that causes the ... problem.
> <In the case where the problem occurs>
> ----------------------------------------------------------------
> int *ip;
> mutex_t *mp;
> ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
> mp = (mutex_t *) (ip + 1);
> /* The address is used with a modification */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -1>
> ----------------------------------------------------------------
> mutex_t mp; /* Obtained statically */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -2>
> ----------------------------------------------------------------
> mutex_t *mp;
> mp = (mutex_t *) malloc(sizeof (mutex_t));
> /* The address is used without any modifications */
> ----------------------------------------------------------------
> {noformat}
> {quote}
--
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: http://www.atlassian.com/software/jira
[jira] [Updated] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Posted by "Liviu Nicoara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liviu Nicoara updated STDCXX-1072:
----------------------------------
Attachment: patch.2.diff
> [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
> --------------------------------------------------------------
>
> Key: STDCXX-1072
> URL: https://issues.apache.org/jira/browse/STDCXX-1072
> Project: C++ Standard Library
> Issue Type: Bug
> Components: Thread Safety
> Affects Versions: 4.2.1, 4.2.x, 4.3.x, 5.0.0
> Environment: Oracle Solaris on SPARC V8 (or V9 emulation?) hardware.
> Reporter: Liviu Nicoara
> Assignee: Liviu Nicoara
> Labels: SPARC, Solaris, V8, alignment, mutex
> Fix For: 4.2.x, 4.3.x, 5.0.0
>
> Attachments: patch.2.diff, patch.diff
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> The issue has been reported in STDCXX-1040, then STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
> Quoting here the Fujitsu patch notes (in case it goes away):
> {quote}
> {noformat}
> 2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
> *2) ... example of programming that causes the ... problem.
> <In the case where the problem occurs>
> ----------------------------------------------------------------
> int *ip;
> mutex_t *mp;
> ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
> mp = (mutex_t *) (ip + 1);
> /* The address is used with a modification */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -1>
> ----------------------------------------------------------------
> mutex_t mp; /* Obtained statically */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -2>
> ----------------------------------------------------------------
> mutex_t *mp;
> mp = (mutex_t *) malloc(sizeof (mutex_t));
> /* The address is used without any modifications */
> ----------------------------------------------------------------
> {noformat}
> {quote}
--
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: http://www.atlassian.com/software/jira
[jira] [Updated] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Travis Vitek updated STDCXX-1072:
---------------------------------
Attachment: before-runall.log
after-runall.log
> [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
> --------------------------------------------------------------
>
> Key: STDCXX-1072
> URL: https://issues.apache.org/jira/browse/STDCXX-1072
> Project: C++ Standard Library
> Issue Type: Bug
> Components: Thread Safety
> Affects Versions: 4.2.1, 4.2.x, 4.3.x, 5.0.0
> Environment: Oracle Solaris on SPARC V8 (or V9 emulation?) hardware.
> Reporter: Liviu Nicoara
> Assignee: Liviu Nicoara
> Labels: SPARC, Solaris, V8, alignment, mutex
> Fix For: 4.2.x, 4.3.x, 5.0.0
>
> Attachments: after-runall.log, before-runall.log, patch.2.diff, patch.diff
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> The issue has been reported in STDCXX-1040, then STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
> Quoting here the Fujitsu patch notes (in case it goes away):
> {quote}
> {noformat}
> 2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
> *2) ... example of programming that causes the ... problem.
> <In the case where the problem occurs>
> ----------------------------------------------------------------
> int *ip;
> mutex_t *mp;
> ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
> mp = (mutex_t *) (ip + 1);
> /* The address is used with a modification */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -1>
> ----------------------------------------------------------------
> mutex_t mp; /* Obtained statically */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -2>
> ----------------------------------------------------------------
> mutex_t *mp;
> mp = (mutex_t *) malloc(sizeof (mutex_t));
> /* The address is used without any modifications */
> ----------------------------------------------------------------
> {noformat}
> {quote}
--
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: http://www.atlassian.com/software/jira
[jira] [Updated] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Posted by "Liviu Nicoara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liviu Nicoara updated STDCXX-1072:
----------------------------------
Description:
The issue has been reported in STDCXX-1040, then STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
Quoting here the Fujitsu patch notes (in case it goes away):
{quote}
{noformat}
2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
*2) ... example of programming that causes the ... problem.
<In the case where the problem occurs>
----------------------------------------------------------------
int *ip;
mutex_t *mp;
ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
mp = (mutex_t *) (ip + 1);
/* The address is used with a modification */
----------------------------------------------------------------
<In the case where the problem does not occur -1>
----------------------------------------------------------------
mutex_t mp; /* Obtained statically */
----------------------------------------------------------------
<In the case where the problem does not occur -2>
----------------------------------------------------------------
mutex_t *mp;
mp = (mutex_t *) malloc(sizeof (mutex_t));
/* The address is used without any modifications */
----------------------------------------------------------------
{noformat}
{quote}
was:
The issue has been reported in STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
Quoting here the Fujitsu patch notes (in case it goes away):
{quote}
{noformat}
2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
*2) ... example of programming that causes the ... problem.
<In the case where the problem occurs>
----------------------------------------------------------------
int *ip;
mutex_t *mp;
ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
mp = (mutex_t *) (ip + 1);
/* The address is used with a modification */
----------------------------------------------------------------
<In the case where the problem does not occur -1>
----------------------------------------------------------------
mutex_t mp; /* Obtained statically */
----------------------------------------------------------------
<In the case where the problem does not occur -2>
----------------------------------------------------------------
mutex_t *mp;
mp = (mutex_t *) malloc(sizeof (mutex_t));
/* The address is used without any modifications */
----------------------------------------------------------------
{noformat}
{quote}
> [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
> --------------------------------------------------------------
>
> Key: STDCXX-1072
> URL: https://issues.apache.org/jira/browse/STDCXX-1072
> Project: C++ Standard Library
> Issue Type: Bug
> Components: Thread Safety
> Affects Versions: 4.2.1, 4.2.x, 4.3.x, 5.0.0
> 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
>
> Attachments: patch.diff
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> The issue has been reported in STDCXX-1040, then STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
> Quoting here the Fujitsu patch notes (in case it goes away):
> {quote}
> {noformat}
> 2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
> *2) ... example of programming that causes the ... problem.
> <In the case where the problem occurs>
> ----------------------------------------------------------------
> int *ip;
> mutex_t *mp;
> ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
> mp = (mutex_t *) (ip + 1);
> /* The address is used with a modification */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -1>
> ----------------------------------------------------------------
> mutex_t mp; /* Obtained statically */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -2>
> ----------------------------------------------------------------
> mutex_t *mp;
> mp = (mutex_t *) malloc(sizeof (mutex_t));
> /* The address is used without any modifications */
> ----------------------------------------------------------------
> {noformat}
> {quote}
--
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: http://www.atlassian.com/software/jira
[jira] [Commented] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Posted by "Liviu Nicoara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13473163#comment-13473163 ]
Liviu Nicoara commented on STDCXX-1072:
---------------------------------------
The attached patch.2.diff uses the aligned buffer class for a cleaner and slightly more verbose fix.
> [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
> --------------------------------------------------------------
>
> Key: STDCXX-1072
> URL: https://issues.apache.org/jira/browse/STDCXX-1072
> Project: C++ Standard Library
> Issue Type: Bug
> Components: Thread Safety
> Affects Versions: 4.2.1, 4.2.x, 4.3.x, 5.0.0
> Environment: Oracle Solaris on SPARC V8 (or V9 emulation?) hardware.
> Reporter: Liviu Nicoara
> Assignee: Liviu Nicoara
> Labels: SPARC, Solaris, V8, alignment, mutex
> Fix For: 4.2.x, 4.3.x, 5.0.0
>
> Attachments: patch.2.diff, patch.diff
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> The issue has been reported in STDCXX-1040, then STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
> Quoting here the Fujitsu patch notes (in case it goes away):
> {quote}
> {noformat}
> 2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
> *2) ... example of programming that causes the ... problem.
> <In the case where the problem occurs>
> ----------------------------------------------------------------
> int *ip;
> mutex_t *mp;
> ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
> mp = (mutex_t *) (ip + 1);
> /* The address is used with a modification */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -1>
> ----------------------------------------------------------------
> mutex_t mp; /* Obtained statically */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -2>
> ----------------------------------------------------------------
> mutex_t *mp;
> mp = (mutex_t *) malloc(sizeof (mutex_t));
> /* The address is used without any modifications */
> ----------------------------------------------------------------
> {noformat}
> {quote}
--
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: http://www.atlassian.com/software/jira
[jira] [Closed] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Posted by "Liviu Nicoara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liviu Nicoara closed STDCXX-1072.
---------------------------------
> [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
> --------------------------------------------------------------
>
> Key: STDCXX-1072
> URL: https://issues.apache.org/jira/browse/STDCXX-1072
> Project: C++ Standard Library
> Issue Type: Bug
> Components: Thread Safety
> Affects Versions: 4.2.1, 4.2.x, 4.3.x, 5.0.0
> Environment: Oracle Solaris on SPARC V8 (or V9 emulation?) hardware.
> Reporter: Liviu Nicoara
> Assignee: Liviu Nicoara
> Labels: SPARC, Solaris, V8, alignment, mutex
> Fix For: 4.2.x, 4.3.x, 5.0.0
>
> Attachments: after-runall.log, before-runall.log, patch.2.diff, patch.diff
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> The issue has been reported in STDCXX-1040, then STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
> Quoting here the Fujitsu patch notes (in case it goes away):
> {quote}
> {noformat}
> 2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
> *2) ... example of programming that causes the ... problem.
> <In the case where the problem occurs>
> ----------------------------------------------------------------
> int *ip;
> mutex_t *mp;
> ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
> mp = (mutex_t *) (ip + 1);
> /* The address is used with a modification */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -1>
> ----------------------------------------------------------------
> mutex_t mp; /* Obtained statically */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -2>
> ----------------------------------------------------------------
> mutex_t *mp;
> mp = (mutex_t *) malloc(sizeof (mutex_t));
> /* The address is used without any modifications */
> ----------------------------------------------------------------
> {noformat}
> {quote}
--
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: http://www.atlassian.com/software/jira
[jira] [Updated] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Posted by "Liviu Nicoara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liviu Nicoara updated STDCXX-1072:
----------------------------------
Attachment: patch.diff
> [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
> --------------------------------------------------------------
>
> Key: STDCXX-1072
> URL: https://issues.apache.org/jira/browse/STDCXX-1072
> 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
>
> Attachments: patch.diff
>
> 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: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
> Quoting here the Fujitsu patch notes (in case it goes away):
> {quote}
> {noformat}
> 2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
> *2) ... example of programming that causes the ... problem.
> <In the case where the problem occurs>
> ----------------------------------------------------------------
> int *ip;
> mutex_t *mp;
> ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
> mp = (mutex_t *) (ip + 1);
> /* The address is used with a modification */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -1>
> ----------------------------------------------------------------
> mutex_t mp; /* Obtained statically */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -2>
> ----------------------------------------------------------------
> mutex_t *mp;
> mp = (mutex_t *) malloc(sizeof (mutex_t));
> /* The address is used without any modifications */
> ----------------------------------------------------------------
> {noformat}
> {quote}
--
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: http://www.atlassian.com/software/jira
[jira] [Updated] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Posted by "Liviu Nicoara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liviu Nicoara updated STDCXX-1072:
----------------------------------
Description:
The issue has been reported in STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
Quoting here the Fujitsu patch notes (in case it goes away):
{quote}
{noformat}
2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
*2) ... example of programming that causes the ... problem.
<In the case where the problem occurs>
----------------------------------------------------------------
int *ip;
mutex_t *mp;
ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
mp = (mutex_t *) (ip + 1);
/* The address is used with a modification */
----------------------------------------------------------------
<In the case where the problem does not occur -1>
----------------------------------------------------------------
mutex_t mp; /* Obtained statically */
----------------------------------------------------------------
<In the case where the problem does not occur -2>
----------------------------------------------------------------
mutex_t *mp;
mp = (mutex_t *) malloc(sizeof (mutex_t));
/* The address is used without any modifications */
----------------------------------------------------------------
{noformat}
{quote}
was:The issue has been reported in STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
> [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
> --------------------------------------------------------------
>
> Key: STDCXX-1072
> URL: https://issues.apache.org/jira/browse/STDCXX-1072
> 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: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
> Quoting here the Fujitsu patch notes (in case it goes away):
> {quote}
> {noformat}
> 2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
> *2) ... example of programming that causes the ... problem.
> <In the case where the problem occurs>
> ----------------------------------------------------------------
> int *ip;
> mutex_t *mp;
> ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
> mp = (mutex_t *) (ip + 1);
> /* The address is used with a modification */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -1>
> ----------------------------------------------------------------
> mutex_t mp; /* Obtained statically */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -2>
> ----------------------------------------------------------------
> mutex_t *mp;
> mp = (mutex_t *) malloc(sizeof (mutex_t));
> /* The address is used without any modifications */
> ----------------------------------------------------------------
> {noformat}
> {quote}
--
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: http://www.atlassian.com/software/jira
[jira] [Assigned] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Posted by "Liviu Nicoara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liviu Nicoara reassigned STDCXX-1072:
-------------------------------------
Assignee: Liviu Nicoara
> [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
> --------------------------------------------------------------
>
> Key: STDCXX-1072
> URL: https://issues.apache.org/jira/browse/STDCXX-1072
> Project: C++ Standard Library
> Issue Type: Bug
> Components: Thread Safety
> Affects Versions: 4.2.1, 4.2.x, 4.3.x, 5.0.0
> Environment: Oracle Solaris on SPARC V8 (or V9 emulation?) hardware.
> Reporter: Liviu Nicoara
> Assignee: Liviu Nicoara
> Labels: SPARC, Solaris, V8, alignment, mutex
> Fix For: 4.2.x, 4.3.x, 5.0.0
>
> Attachments: patch.2.diff, patch.diff
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> The issue has been reported in STDCXX-1040, then STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
> Quoting here the Fujitsu patch notes (in case it goes away):
> {quote}
> {noformat}
> 2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
> *2) ... example of programming that causes the ... problem.
> <In the case where the problem occurs>
> ----------------------------------------------------------------
> int *ip;
> mutex_t *mp;
> ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
> mp = (mutex_t *) (ip + 1);
> /* The address is used with a modification */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -1>
> ----------------------------------------------------------------
> mutex_t mp; /* Obtained statically */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -2>
> ----------------------------------------------------------------
> mutex_t *mp;
> mp = (mutex_t *) malloc(sizeof (mutex_t));
> /* The address is used without any modifications */
> ----------------------------------------------------------------
> {noformat}
> {quote}
--
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: http://www.atlassian.com/software/jira
[jira] [Updated] (STDCXX-1072) [Oracle Solaris/SPARCV8] stricter
mutex alignment requirements
Posted by "Liviu Nicoara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liviu Nicoara updated STDCXX-1072:
----------------------------------
Affects Version/s: (was: 4.2.0)
(was: 4.1.4)
(was: 4.1.3)
(was: 4.1.2)
5.0.0
4.3.x
4.2.x
> [Oracle Solaris/SPARCV8] stricter mutex alignment requirements
> --------------------------------------------------------------
>
> Key: STDCXX-1072
> URL: https://issues.apache.org/jira/browse/STDCXX-1072
> Project: C++ Standard Library
> Issue Type: Bug
> Components: Thread Safety
> Affects Versions: 4.2.1, 4.2.x, 4.3.x, 5.0.0
> 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
>
> Attachments: patch.diff
>
> 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: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.
> Quoting here the Fujitsu patch notes (in case it goes away):
> {quote}
> {noformat}
> 2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
> *2) ... example of programming that causes the ... problem.
> <In the case where the problem occurs>
> ----------------------------------------------------------------
> int *ip;
> mutex_t *mp;
> ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
> mp = (mutex_t *) (ip + 1);
> /* The address is used with a modification */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -1>
> ----------------------------------------------------------------
> mutex_t mp; /* Obtained statically */
> ----------------------------------------------------------------
> <In the case where the problem does not occur -2>
> ----------------------------------------------------------------
> mutex_t *mp;
> mp = (mutex_t *) malloc(sizeof (mutex_t));
> /* The address is used without any modifications */
> ----------------------------------------------------------------
> {noformat}
> {quote}
--
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: http://www.atlassian.com/software/jira