public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bugdal at aerifal dot cx" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-16549-131-p46DgngmfU@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-16549-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=16549

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugdal at aerifal dot cx

--- Comment #6 from Rich Felker <bugdal at aerifal dot cx> ---
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.


  parent reply	other threads:[~2014-02-11 17:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10 13:28 [Bug nptl/16549] New: " vinxxe at gmail dot com
2014-02-10 13:29 ` [Bug nptl/16549] " vinxxe at gmail dot com
2014-02-10 13:33 ` schwab@linux-m68k.org
2014-02-10 13:38 ` vinxxe at gmail dot com
2014-02-10 13:43 ` neleai at seznam dot cz
2014-02-10 13:45 ` jakub at redhat dot com
2014-02-10 13:46 ` vinxxe at gmail dot com
2014-02-11 17:50 ` bugdal at aerifal dot cx [this message]
2014-02-11 17:53 ` bugdal at aerifal dot cx
2014-02-11 18:54 ` vinxxe at gmail dot com
2014-02-12  9:24 ` vinxxe at gmail dot com
2014-02-12  9:35 ` schwab@linux-m68k.org
2014-02-12  9:43 ` vinxxe at gmail dot com
2014-02-12  9:48 ` jakub at redhat dot com
2014-02-12  9:51 ` vinxxe at gmail dot com
2014-02-12 10:01 ` schwab@linux-m68k.org
2014-02-12 10:09 ` vinxxe at gmail dot com
2014-02-12 10:44 ` schwab@linux-m68k.org
2014-02-12 11:34 ` vinxxe at gmail dot com
2014-02-12 17:10 ` bugdal at aerifal dot cx
2014-02-12 17:18 ` bugdal at aerifal dot cx
2014-02-12 17:25 ` vinxxe at gmail dot com
2014-02-12 17:42 ` vinxxe at gmail dot com
2014-06-13  8:41 ` fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-16549-131-p46DgngmfU@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).