Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-08-10
10:03 • Closed ticket [d5acb07b64]: TIP 752 broke clock seconds in 32bit linux plu... artifact: cee65c8a3a user: jan.nijtmans
09:59
Fix [d5acb07b6411]: TIP 752 broke [clock seconds] in 32bit linux. (see remark in ticket) check-in: d06307ab80 user: jan.nijtmans tags: trunk, main
2026-08-02
22:30
Proposed fix for bug [d5acb07b6411] closed check-in: 7877ec9e1f user: emiliano tags: bug-d5acb07b6411
19:52 • Ticket [d5acb07b64] TIP 752 broke clock seconds in 32bit linux status stil... artifact: 39283cb9d5 user: jan.nijtmans
16:45 • Ticket [d5acb07b64]: 4 changes artifact: 44e0b1d461 user: emiliano
16:44 • Add attachment clockseconds.diff to ticket [d5acb07b64119b04|d5acb07b64... artifact: c08532f2d1 user: emiliano
16:43 • New ticket [d5acb07b64] TIP 752 broke clock seconds in 32bit linux. artifact: 5e6dd5bdbd user: emiliano

TIP 752 broke [clock seconds] in 32bit linux

Closed / Fixedd5acb07b64119b040bfa8d8eadb445d4e6b73747Created 122 days agoUpdated 115 days ago
Descriptionmarkdown2026-08-02 16:43:24

After merge of TIP 752, running 32bit linux

$ uname -m
i686
$ tclsh9.1 
% clock seconds
203

The problem is an int overflow in Tcl_GetDayTime(). Attached patch fixes the issue and also shut ups a compiler warning

emiliano Ticket [d5acb07b64]: 4 changes [History diff]2026-08-02 16:45:08
jan.nijtmanswiki2026-08-02 19:52:24

+1

Just go ahead!

jan.nijtmanswiki2026-08-10 10:03:52

Fixed [here]

However .... Tcl 9.x is supposed to be compiled with -D_TIME_BITS=64 (and -D_FILE_OFFSET_BITS=64), which makes time_t a 64-bit type. Then this 'bug' doesn't occur. Apparently, you are using an older (pre-5.1) linux kernel, which doesn't 64-bit time. This means that your Tcl build on linux is not Y2038-safe. It would be better to upgrade your environment somewhere in the next 12 years!

Log in (anonymous is fine) to add a comment.

Attachments: