| Ticket UUID: | f894a85b9a4412d77d4f3234e5a244b7b4d476a2 | ||
| Title: | Free-form clock scan silently wraps numbers that do not fit into an int (regression in 9.0) | ||
| Type: | Bug | Created on: | 2026-11-14 08:05:35 |
| Submitter: | serhiy.storchaka | Assigned to: | nobody |
| Subsystem: | 06. Time Measurement | Severity: | Important |
| Priority: | 5 Medium | Last modified: | 2026-11-24 17:44:31 |
| Status: | Closed | Closed by: | serhiy.storchaka |
| Resolution: | Fixed | Closed on: | 2026-11-24 17:44:31 |
| Version: | 9.0.5, 9.1.1 | ||
| Description: | |||||||||||||||||||||||||||||||||||||||||||
|
Since the clock rewrite in Tcl 9.0 (TIP 688), the free-form parser of
With Jan's fix for [8afd93d3d3], which makes The year is the only field whose valid range ( Relative months and years are wrapped too (with
Relative days, weeks, fortnights and seconds are 64-bit and give the right result. 8.6.18 gives wrong results for all relative units with this number (the year 429502 for each of them) and a syntax error for | |||||||||||||||||||||||||||||||||||||||||||
| User Comments: | |||||||||||||||||||||||||||||||||||||||||||
serhiy.storchaka added on 2026-11-14 09:29:03:
Proposed fix in branch clock-freescan-int-range. Numbers that do not fit into an int are rejected instead of truncated, and relative counts are calculated in 64 bits. The branch also fixes the following bugs. Relative months and years before the common era go in the wrong direction (base 101-03-15 B.C.E.,
Signed integer overflows with
Overflows in
jan.nijtmans added on 2026-11-14 10:22:35:
+1, just go ahead! serhiy.storchaka added on 2026-11-14 13:45:15:
For 8.6: proposed fix in branch clock-range-8-6. 8.6 has the B.C.E. bug in relative months and years, and wraps dates in serhiy.storchaka added on 2026-11-24 17:44:31:
Merged into core-8-6-branch by Jan in [a0288fe887]. With [21bc2b48f7] (main) and [df2b525fbd] (core-9-0-branch), the fix is in all three branches. | |||||||||||||||||||||||||||||||||||||||||||
