Manifest of check-in
[018bd8d323]
- Fix [f894a85b9a]: free-form clock scan silently wraps numbers that do not fit into an int.
Numbers that do not fit into an int are no longer truncated to a value
that may be valid. The year is kept as a Tcl_WideInt by the parser and
checked, and relative months, years, days, seconds, "next N Month" and
"N Monday" are calculated in 64 bits.
Also fix relative months and years before the common era, which went in
the wrong direction, signed integer overflows with -valid 0 and in the
julian day helpers, and overflows in clock add with large offsets.
clock add now raises "integer value too large to represent" for a result
outside the range of clock seconds.
by
serhiy.storchaka on
2026-11-14 09:28:51.
B 942d86d1568bd212953c13f42fa2271cfd90db582b0c8cf5642044c3655a5324
C Fix\s[f894a85b9a]:\sfree-form\sclock\sscan\ssilently\swraps\snumbers\sthat\sdo\snot\sfit\sinto\san\sint.\n\nNumbers\sthat\sdo\snot\sfit\sinto\san\sint\sare\sno\slonger\struncated\sto\sa\svalue\nthat\smay\sbe\svalid.\sThe\syear\sis\skept\sas\sa\sTcl_WideInt\sby\sthe\sparser\sand\nchecked,\sand\srelative\smonths,\syears,\sdays,\sseconds,\s"next\sN\sMonth"\sand\n"N\sMonday"\sare\scalculated\sin\s64\sbits.\n\nAlso\sfix\srelative\smonths\sand\syears\sbefore\sthe\scommon\sera,\swhich\swent\sin\nthe\swrong\sdirection,\ssigned\sinteger\soverflows\swith\s-valid\s0\sand\sin\sthe\njulian\sday\shelpers,\sand\soverflows\sin\sclock\sadd\swith\slarge\soffsets.\nclock\sadd\snow\sraises\s"integer\svalue\stoo\slarge\sto\srepresent"\sfor\sa\sresult\noutside\sthe\srange\sof\sclock\sseconds.\n
D 2026-11-14T09:28:51.226
F generic/tclClock.c 01b027c703a2dc70498b41cf1c7e6e4229f2aa14c34ae0a970dfdfc89e4e37e9
F generic/tclDate.c 8356a69950f0eef3376867911d8f0d642830d4104a874413364e16b146751728
F generic/tclDate.h 42187e202296641e6b67e7ba3ac548e97392663ee08e7ec85a6f999858b411fb
F generic/tclGetDate.y 102075456c976495e2aa729670fe9ed61ede79023c02330ef9be25de323b7f7c
F tests/clock.test 9c87bda6996962408905fd324febfb50f8f31853451f13bc1631b87dd6ed6e40
P 942d86d1568bd212953c13f42fa2271cfd90db582b0c8cf5642044c3655a5324
R 44568c2d0b087ccc209cbc01f4b67100
T *branch * clock-freescan-int-range
T *sym-clock-freescan-int-range *
T -sym-main *
T -sym-trunk *
U serhiy.storchaka
Z 3d23fee21b66dafce6e635b7ecf2d5ac