Share

Open POSIX Test Suite

Tracker: Bugs

5 pthread_mutexattr_gettype() may _not_ fail with EINVAL on zeroed mutexattr - ID: 1554425
Last Update: Comment added ( nobody )

Hi,

conformance/interface/pthread_mutexattr_gettype/speculative/3-1.c tests
that pthread_mutexattr_gettype() on a zeroed pthread_mutexattr_t returns
EINVAL. But a zeroed pthread_mutexattr_t _may_ be valid: posix says that
pthread_mutexattr_gettype() _may_ return EINVAL if the pthread_mutexattr_t
is invalid, but not that it _shall_ return EINVAL in such case (since being
invalid is not defined).

Just like conformance/interface/pthread_mutex_destroy/speculative/4-2.c,
conformance/interface/pthread_mutexattr_gettype/speculative/3-1.c should
also PASS even when EINVAL is not returned.


Samuel Thibault ( youpi_486 ) - 2006-09-07 23:35

5

Open

None

elva fu

Threads

None

Public


Comment ( 1 )




Date: 2008-12-15 09:56
Sender: nobody

POSIX 2008 even clarified it: `The [EINVAL] error for an uninitialized
mutex attributes object is removed; this condition results in undefined
behavior.'



Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.