From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18641 invoked by alias); 26 Jul 2013 11:06:19 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 18561 invoked by uid 48); 26 Jul 2013 11:06:16 -0000 From: "aponomarenko at rosalab dot ru" To: glibc-bugs@sourceware.org Subject: [Bug libc/15790] New: pthread_mutexattr_gettype doesn't store the value of the 'type' attribute into *type Date: Fri, 26 Jul 2013 11:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.18 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: aponomarenko at rosalab dot ru X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg00156.txt.bz2 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 #include 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.