public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/15790] New: pthread_mutexattr_gettype doesn't store the value of the 'type' attribute into *type
@ 2013-07-26 11:06 aponomarenko at rosalab dot ru
  2013-07-26 11:13 ` [Bug libc/15790] " aponomarenko at rosalab dot ru
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: aponomarenko at rosalab dot ru @ 2013-07-26 11:06 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=15790

            Bug ID: 15790
           Summary: pthread_mutexattr_gettype doesn't store the value of
                    the 'type' attribute into *type
           Product: glibc
           Version: 2.18
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: aponomarenko at rosalab dot ru
                CC: drepper.fsp at gmail dot com

Hi,

The pthread_mutexattr_gettype function doesn't store the value of the 'type'
attribute into *type argument:

#include <stdio.h>
#include <pthread.h>

int main()
{
    pthread_mutexattr_t* attr;
    int res1 = pthread_mutexattr_settype(attr, PTHREAD_MUTEX_NORMAL);

    int type = 0;
    int res2 = pthread_mutexattr_gettype(attr, &type);

    printf("%d, %d, %d\n", res1, res2, type);

    return 0;
}

Output: 0, 0, 512

Expected: 0, 0, 0

Environment: Fedora 18 on i686, linux 3.6.10-4

Spec:
http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_mutexattr_gettype.html

"Upon successful completion, the pthread_mutexattr_gettype() function shall
return zero and store the value of the type attribute of attr into the object
referenced by the type parameter. Otherwise, an error shall be returned to
indicate the error."

See also: http://sourceware.org/ml/libc-alpha/2013-06/msg00891.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-08-05  6:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-26 11:06 [Bug libc/15790] New: pthread_mutexattr_gettype doesn't store the value of the 'type' attribute into *type aponomarenko at rosalab dot ru
2013-07-26 11:13 ` [Bug libc/15790] " aponomarenko at rosalab dot ru
2013-07-26 12:56 ` tolga.dalman at googlemail dot com
2013-07-26 15:38 ` aj at suse dot de
2014-02-07  3:17 ` [Bug nptl/15790] " jsm28 at gcc dot gnu.org
2014-06-13 13:19 ` fweimer at redhat dot com
2014-08-11  9:11 ` schwab@linux-m68k.org
2015-02-12  8:49 ` cvs-commit at gcc dot gnu.org
2015-02-12  8:55 ` schwab@linux-m68k.org
2015-08-05  6:48 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).