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

Re: [PATCH] archive-zip: omit UT extra field if mtime is out of range

From
René Scharfe <l.s.r@web.de>
Date
Oct 19, 2026, 17:11 UTC
Message-ID
<c873cb77-10ed-40fa-b1a1-b3e01d341bc3@web.de>
In-Reply-To
<0334c031-56e3-4c8d-8adc-52051d2e26aa@web.de>
On 10/12/26 4:45 PM, René Scharfe wrote:
Show 11 quoted lines
> On 10/12/26 2:56 PM, m@sph3r3.com wrote:
>> For the i386 failure Junio reported, the beyond-2038 archive test and
>> its dependent omission check should use TIME_T_IS_64BIT. TIME_IS_64BIT
>> checks Git's timestamp_t, which can be 64-bit while time_t is 32-bit.
>>
>> With that two-line adjustment, all 18 t5004 tests pass on x86-64
>> Linux. Forcing TIME_T_IS_64BIT off skips only those two tests; the
>> other 16 pass, including both INT32_MAX checks. I haven't run a native
>> 32-bit build.
> > That would be an easy way out, nice!  I suspect git archive should not
> even use time_t in this context, though.

Getting rid of time_t in archive-zip.c is possible, but would require supplying a 64-bit version of localtime_r(3) on 32-bit platforms, which seems excessive. The task would be simpler if we picked a time zone, say UTC, instead of capturing the time zone of the archiver, which is questionable in the first place. That would change the output, breaking caching schemes. In any case, getting rid of time_t would be too much work or trouble just to enable two tests. So right, let's add that requirement for now.

René
Previous: René ScharfeNext: Junio C Hamano
Message 12 of 15 in “[BUG] ZIP timestamp conversion and strict fast-import date validation”
  1. Matthew E. LuallenOct 5, 2026
  2. René ScharfeOct 5, 2026
  3. Matthew E. LuallenOct 5, 2026
  4. René ScharfeOct 7, 2026
  5. m@sph3r3.comOct 6, 2026
  6. Aniket GuptaNov 20, 2026
  7. archive-zip: omit UT extra field if mtime is out of rangeRené Scharfe, Oct 11, 2026
  8. Junio C HamanoOct 12, 2026
  9. René ScharfeOct 12, 2026
  10. m@sph3r3.comOct 12, 2026
  11. René ScharfeOct 12, 2026
  12. René ScharfeOct 19, 2026
  13. Junio C HamanoOct 12, 2026
  14. archive-zip: omit UT extra field if mtime is out of rangeRené Scharfe, Oct 19, 2026
  15. m@sph3r3.comOct 20, 2026

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.