RE: [PATCH v3] date: detect underflow/overflow when parsing dates with timezone offset
- From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
- Date
- Jun 11, 2024, 23:49 UTC
- Message-ID
- <114401dabc5a$08a72060$19f56120$@nexbridge.com>
- In-Reply-To
- <xmqqtthzrraw.fsf@gitster.g>
On Tuesday, June 11, 2024 7:30 PM, Junio C Hamano wrote:
Show 13 quoted lines
>Junio C Hamano <gitster@pobox.com> writes: > >> I wonder if this should be of timestamp_t type instead, as the check >> is done against *timestamp in parse_date_basic() where *timestamp is >> of type timestamp_t to match? > >Also, as you can see at one of the GitHub CI jobs, e.g., > > >https://github.com/git/git/actions/runs/9455916669/job/26046731619#step:6: >1915 > >you'd need to either exclude some "these are too large timestamps for the
system"
>tests from 32-bit systems or expect output on them to be different from
64-bit
>systems. > >As you are actively detecting the condition and giving an error message
"too large
>for _this_ system", I think it is a good idea to actually do the latter,
i.e. on 64-bit
>system make sure parsing is done correctly, and on 32-bit system make sure
you get
>that "too large for this system" error.
Does this imply that timestamp tests will fail on 32-bit systems? I am unsure how to interpret this. Can you please clarify?
Thanks, Randall