git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t1092: use GIT_PROGRESS_DELAY for consistent results

From
Taylor Blau <me@ttaylorr.com>
Date
May 25, 2021, 21:49 UTC
Message-ID
<YK1w7TPnH9CB0haj@nand.local>
In-Reply-To
<xmqq1r9uee3r.fsf@gitster.g>
On Wed, May 26, 2021 at 05:46:16AM +0900, Junio C Hamano wrote:
Show 8 quoted lines
> Well, not so well X-<.  It seems that some builds are not happy with
> this change.  See https://github.com/git/git/actions/runs/876229761
> specifically these two:
>
>     https://github.com/git/git/runs/2669177395?check_suite_focus=true#step:7:3549
>     https://github.com/git/git/runs/2669080101?check_suite_focus=true#step:6:988
>
> I suspect that it has something to do with 32-bit platforms?

Thanks. Of course, redirecting stderr into a file and halting after we get a non-zero exit code makes this pretty hard to debug from that output alone, but this is pretty easily reproducible on a 32-bit Docker image:

    root@99cfe0d56673:/git-master# getconf LONG_BIT
    32
    root@99cfe0d56673:/git-master# GIT_PROGRESS_DELAY=-1 ./bin-wrappers/git status
    fatal: failed to parse GIT_PROGRESS_DELAY

Looking more closely in a debugger shows that we're failing because of this check in 'config.c:git_parse_unsigned()':

    if (unsigned_mult_overflows(factor, val) ||
        factor * val > max) {
          errno = ERANGE;
          return 0;
    }

unsigned_mult_overflows() doesn't trigger regardless of architecture, since even though val is large, factor is 1, so factor * val == val. But val is much larger than max, so we fail there. 'max' is just 'maximum_unsigned_value_of_type(long)', or 2^32-1, while val is 2^64-1.

Thanks, Taylor

Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 18 in “t1092: use GIT_PROGRESS_DELAY for consistent results”
  1. t1092: use GIT_PROGRESS_DELAY for consistent resultsDerrick Stolee via GitGitGadget, May 24, 2021
  2. Jonathan NiederMay 24, 2021
  3. Derrick StoleeMay 24, 2021
  4. Taylor BlauMay 24, 2021
  5. Ævar Arnfjörð BjarmasonMay 24, 2021
  6. Taylor BlauMay 25, 2021
  7. Derrick StoleeMay 25, 2021
  8. Junio C HamanoMay 25, 2021
  9. Derrick StoleeMay 25, 2021
  10. Junio C HamanoMay 25, 2021
  11. Junio C HamanoMay 25, 2021
  12. Taylor BlauMay 25, 2021
  13. Junio C HamanoMay 25, 2021
  14. Taylor BlauMay 25, 2021
  15. Ævar Arnfjörð BjarmasonMay 25, 2021
  16. Junio C HamanoMay 25, 2021
  17. Junio C HamanoMay 25, 2021
  18. Junio C HamanoMay 25, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.