git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: ERANGE strikes again on my Windows build; RFH
Date: Mon, 30 Dec 2019 10:49:48 -0800	[thread overview]
Message-ID: <20191230184948.GC57251@google.com> (raw)
In-Reply-To: <54522fee-0796-df46-a3cf-4331537ecf59@kdbg.org>

Johannes Sixt wrote:
> Am 30.12.19 um 19:06 schrieb Jonathan Nieder:

>>                                                                    when
>> errno is meaningful for a function for a given return value, the usual
>> convention is
>>
>>  (1) it *always* sets errno for errors, not conditionally
>
> You seem to understand that errno isn't set somewhere where it should be
> set.

On the contrary: this caller is using errno as an error *indicator*
instead of a way of *distinguishing* between errors (or to put it
another way, this caller is treating `errno == 0` as a meaningful
condition).  This means the calling code is buggy.

[...]
>> Do you have more details about the case where read_object is expected
>> to produce errno == 0?  I'm wondering whether we forgot to set 'errno
>> = ENOENT' explicitly somewhere.
>
> I don't think that forgetting to set ENOENT is the problem.
>
> It happens reproducibly in test 5 of t0410-partial-clone:

Thanks, will try it out.

  reply	other threads:[~2019-12-30 18:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-28 15:41 ERANGE strikes again on my Windows build; RFH Johannes Sixt
2019-12-29 14:29 ` Torsten Bögershausen
2019-12-29 14:43   ` Andreas Schwab
2019-12-29 17:25   ` Alban Gruin
2019-12-29 18:08     ` Johannes Sixt
2019-12-30 17:42 ` Junio C Hamano
2019-12-30 18:06 ` Jonathan Nieder
2019-12-30 18:46   ` Johannes Sixt
2019-12-30 18:49     ` Jonathan Nieder [this message]
2020-01-05 15:27       ` Michal Suchánek

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=20191230184948.GC57251@google.com \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.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 NNTP newsgroup(s).