public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Don't divide by zero when trying to destroy an uninitialised barrier.
Date: Tue, 26 Apr 2016 14:44:00 -0000	[thread overview]
Message-ID: <571F7ED0.9040001@linaro.org> (raw)
In-Reply-To: <571F7D5F.2080603@redhat.com>



On 26/04/2016 11:38, Florian Weimer wrote:
> On 04/20/2016 09:46 PM, Adhemerval Zanella wrote:
>> I do not see a compelling reason to not return EINVAL if the UB
>> could be detected and if POSIX stated this behaviour is recommended.
> 
> It would result in silent loss of synchronization if the return value is not checked.  Such bugs are difficult to track down.
> 
> Florian

But the check is user responsibility and getting such error means the
program is doing something fuzzy.

But thinking twice seems that abort in such cases seems a better
alternative, it gives the user a more straightforward indication
he should check his code. 

  reply	other threads:[~2016-04-26 14:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 16:49 Mark Thompson
2016-04-20 17:03 ` Szabolcs Nagy
2016-04-20 19:16   ` Mark Thompson
2016-04-20 19:47     ` Adhemerval Zanella
2016-04-26 14:38       ` Florian Weimer
2016-04-26 14:44         ` Adhemerval Zanella [this message]
2016-04-26 17:24           ` Mike Frysinger
2016-04-26 18:04           ` Torvald Riegel
2016-04-26 19:47             ` Adhemerval Zanella
2016-04-21 16:24     ` Torvald Riegel
2016-04-27 14:27       ` Carlos O'Donell

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=571F7ED0.9040001@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@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).