This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Don't divide by zero when trying to destroy an uninitialised barrier.
- From: Torvald Riegel <triegel at redhat dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Date: Tue, 26 Apr 2016 20:03:54 +0200
- Subject: Re: [PATCH] Don't divide by zero when trying to destroy an uninitialised barrier.
- Authentication-results: sourceware.org; auth=none
- References: <5717B2F4 dot 9050105 at starleaf dot com> <5717B657 dot 6040007 at arm dot com> <5717D575 dot 40806 at starleaf dot com> <5717DCA6 dot 1090809 at linaro dot org> <571F7D5F dot 2080603 at redhat dot com> <571F7ED0 dot 9040001 at linaro dot org>
On Tue, 2016-04-26 at 11:44 -0300, Adhemerval Zanella wrote:
> 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.
EINVAL is not listed as an error code, so there is no user