From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10358 invoked by alias); 11 Aug 2014 09:11:40 -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 10289 invoked by uid 48); 11 Aug 2014 09:11:35 -0000 From: "schwab@linux-m68k.org" To: glibc-bugs@sourceware.org Subject: [Bug nptl/15790] pthread_mutexattr_gettype doesn't store the value of the 'type' attribute into *type Date: Mon, 11 Aug 2014 09:11:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: nptl X-Bugzilla-Version: 2.18 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: schwab@linux-m68k.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: 2014-08/txt/msg00026.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=15790 --- Comment #3 from Andreas Schwab --- This also means that the value returned by pthread_mutexattr_gettype is not a valid input to pthread_mutexattr_settype. #include #include #include int main (void) { pthread_mutexattr_t attr; int kind; int error; error = pthread_mutexattr_init (&attr); if (error) fprintf (stderr, "pthread_mutexattr_init: %s\n", strerror (error)); error = pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_DEFAULT); if (error) fprintf (stderr, "pthread_mutexattr_settype (1): %s\n", strerror (error)); error = pthread_mutexattr_gettype (&attr, &kind); if (error) fprintf (stderr, "pthread_mutexattr_gettype: %s\n", strerror (error)); error = pthread_mutexattr_settype (&attr, kind); if (error) fprintf (stderr, "pthread_mutexattr_settype (2): %s\n", strerror (error)); } pthread_mutexattr_settype (2): Invalid argument -- You are receiving this mail because: You are on the CC list for the bug.