|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 2602 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 2602.
Report 2602 Actions
Problem Report Number 2602 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0691 Raised 2015-04-15 21:12 Updated 2015-05-08 09:55 Published 2015-05-08 09:55 Product Standard Internationalised System Calls and Libraries Extended V4 (UNIX V7) Certification Program The Open Brand certification program Test Suite VSTH version 5.5.9NW Test Identification /tset/PTHR.os/rbcond/pthread_cond_wait/T.pthread_cond_wait{9}
and many othersSpecification Base Specifications Issue 7 Location in Spec pthread_mutex_init(53240) Problem Summary pthread_mutex_init() failure on uninitialized pthread_mutex_t Problem Text text
/vsx/src/vsx/tset/PTHR.os/cond/pthread_cond_wait/pthread_cond_wait.c:
1695 void
1696 t9_f1( int *errors, int *fails, int *unsup )
1697 {
1698 int rval;
1699 pthread_mutexattr_t ma;
1700 pthread_mutex_t mx;
The structure pthread_mutex_t is allocated on stack and will contain
garbage. The
structure contains flag to signalize that the mutex was already
initialized. Solaris
pthread_mutex_init() behaves unpredictable in case garbage forms
initialized flag.
I think this is a testsuite bug that does not explicitely initialize the
structure.Test Output pthread_mutex_init, expected 0, got 22 Review Information
Review Type TSMA Review Start Date 2015-04-15 21:12 Last Updated 2015-04-17 10:50 Completed 2015-04-17 10:50 Status Complete Review Recommendation Rejected (REJ) Review Response The standard states that pthread_mutex_init() initializes a mutex. It
says nothing about a possible need to "preinitialize" a pthread_mutex_t
object before it can be initialized with pthread_mutex_init(), and
indeed the standard itself contains example code where a pointer to an
uninitialized pthread_mutex_t is passed to pthread_mutex_init(). See
page 3590 in the 2013 edition of SUSv4 at line 122121:
tt = (timed_thread_t) malloc(sizeof(struct timed_thread));
pthread_mutex_init(&tt->m,NULL);
W. Richard Stevens' book Advanced Programming in the UNIX Environment
also contains example code which uses malloc() to allocate a (structure
containing a) pthread_mutex_t and then initializes it with
pthread_mutex_init(). This book is used by many programmers learning
UNIX programming. The example code from the book can be downloaded at
http://www.apuebook.com/code3e.html
In addition, the submitter is advised to double-check whether the
error returned by pthread_mutex_init() is actually indicating an
already-initialized condition. The error number 22 is typically
EINVAL, which would seem to indicate that what pthread_mutex_init()
is complaining about is something in the attributes. In particular
it could be that setting the robust mutex attribute without the
process-shared attribute is not supported, in which case the
failures are probably the result of an incorrect test suite
configuration (VSTH_NONPSH_RBMUTEX_SUPPORTED should be N).
It is recommended that this TSD request is rejected.
Review Type SA Review Start Date 2015-04-17 18:50 Last Updated 2015-04-21 12:57 Completed 2015-04-21 12:57 Status Complete Review Resolution Rejected (REJ) Review Conclusion This request is rejected as per the test suite maintenance authority review.
Problem Reporting System Options:
- View Report 2602
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority