From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6724 invoked by alias); 11 Feb 2014 17:50:18 -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 6667 invoked by uid 48); 11 Feb 2014 17:50:14 -0000 From: "bugdal at aerifal dot cx" To: glibc-bugs@sourceware.org Subject: [Bug nptl/16549] pthread_cond_wait and pthread_cond_timedwait do not suspend the calling thread Date: Tue, 11 Feb 2014 17:50: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.12 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bugdal at aerifal dot cx X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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-02/txt/msg00389.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16549 Rich Felker changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugdal at aerifal dot cx --- Comment #6 from Rich Felker --- I think this bug should be closed as invalid. Using a pointer to a member of a packed structure always results in undefined behavior. This is the case even for things like scanf("%d", &packedstruct.foo). It happens to "work" on x86, but on other systems it will either fault or silently corrupt adjacent members (by ignoring the low bits of the address). It's not glibc's job to fix the application's UB from invalid use of packed attribute/pragma. I've seen and generally agree with the argument that it's nicer for UB to quickly crash than to misbehave in more subtle ways, but to make that behavior consistent, there are hundreds if not thousands of functions which would need to check their argument alignments. Cond vars are not special. Putting such checks all over the place would be impractical; if that level of checking is desired, it belongs in a compiler feature. -- You are receiving this mail because: You are on the CC list for the bug.