|
2026-10-19
| ||
| 18:00 | • Ticket [1802895fff] AfterDelay overflow status still Open with 4 other chang... artifact: 5c9ed9a033 user: serhiy.storchaka | |
| 17:55 | Fix [96c3f3b47d] and [1802895fff]: [after] with a delay over about 12 years overflowed the seconds w... leaf check-in: d7e3050ca6 user: serhiy.storchaka tags: after-overflow-8-6 | |
| 17:55 | Fix [1802895fff]: [after] with a delay close to 2**63 ms could overflow the time arithmetic, so a bl... leaf check-in: 42f3de85fb user: serhiy.storchaka tags: after-overflow-9-0 | |
|
2022-08-18
| ||
| 16:22 | • Ticket [1802895fff] AfterDelay overflow status still Open with 4 other chang... artifact: fb435b3693 user: oehhar | |
| 16:13 | • Ticket [1802895fff]: 3 changes artifact: b511655eaa user: sebres | |
| 14:18 | • Ticket [1802895fff]: 4 changes artifact: 810623ccdd user: oehhar | |
| 13:27 | • Ticket [1802895fff]: 3 changes artifact: 3ba9e47b17 user: sebres | |
| 12:32 | • Ticket [1802895fff]: 9 changes artifact: f7de59c695 user: oehhar | |
| 12:13 | • Ticket [a11678b759] documentation improvement: "after 0 cmd" statu... artifact: 1e6e90fe1e user: oehhar | |
|
2008-04-01
| ||
| 05:20 | • Ticket [1802895fff] AfterDelay overflow status still Open with 4 other chang... artifact: 08380f4819 user: ferrieux | |
|
2007-11-28
| ||
| 01:03 | • Ticket [1802895fff]: 4 changes artifact: d47bb1fefa user: dgp | |
|
2007-10-23
| ||
| 00:29 | • Ticket [1802895fff]: 4 changes artifact: 56703159b3 user: dgp | |
|
2007-09-28
| ||
| 02:41 | • Ticket [1802895fff]: 5 changes artifact: b66fa1c1ce user: dgp | |
|
2007-09-26
| ||
| 16:02 | • New ticket [1802895fff]. artifact: f5681750a5 user: dgp | |
| Ticket UUID: | 1802895 | ||
| Title: | AfterDelay overflow | ||
| Type: | Bug | Created on: | 2007-09-26 16:02:18 |
| Submitter: | dgp | Assigned to: | aku |
| Subsystem: | 03. Timer Events | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2026-10-19 18:00:22 |
| Status: | Open | Closed by: | nobody |
| Resolution: | None | Closed on: | |
| Version: | 8.6.18, 9.0.5 | ||
| Description: | ||||
On 32-bit Linux (Centos 5): % after [expr 0b1101111010111101100000000000000000000000] % Returns immediately. Seems to be something amiss in AfterDelay() perhaps some long vs. Tcl_WideInt calculations? | ||||
| User Comments: | ||||
dgp added on 2007-09-28 02:41:54:
Logged In: YES user_id=80530 Originator: YES the trouble is that the Tcl_Time .sec field is a long, limited to the long range, and when sizeof(Tcl_WideInt) > sizeof(long) the endTime can overflow that limit. after [expr 1000<30] dgp added on 2007-10-23 00:29:19:
Logged In: YES user_id=80530 Originator: YES any chance to address this for 8.5b2 ? dgp added on 2007-11-28 01:03:09:
Logged In: YES user_id=80530 Originator: YES status? ferrieux added on 2008-04-01 05:20:44:
Logged In: YES user_id=496139 Originator: NO To allow for delays larger than the internal syscall's limit, what about a self-reposting large timer ? This would allow for alternative syscalls (like in TIP 302) even though they may reduce the span of one-shot timers. oehhar added on 2022-08-18 12:32:32:
Still present in TCL 8.6.12 and TCL 8.7b5. So, updating the version field from 8.5a7 to 8.6. This is not severe, as we don't crash or block. To say, it could be worse ;-). Take care, Harald sebres added on 2022-08-18 13:27:58:
Fixed in RFE [fdfbd5e10]. oehhar added on 2022-08-18 14:18:51:
Thanks, Sergey ! That is your magic wizard stuff nobody can take, as nobody understands it, but you. We all would love to have it in, at least 9.0. I would really say, that "after" with more than 1 year does not make any sense and should run into an error. Thanks and take care, Harald sebres added on 2022-08-18 16:13:04:
No. Not if your tcl's internal clock (which can be virtualized) runs a year in a second. oehhar added on 2022-08-18 16:22:35:
Ok, thank you ;-). That is really weared stuff. Harald serhiy.storchaka added on 2026-10-19 18:00:22:
Fixed on main by TIP 723 (too large delays give "time too far away"). Still present in 9.0 and 8.6: a blocking after 0x7fffffffffffffff returns at once on 64-bit systems (the millisecond arithmetic overflows), and where long is 32 bits any delay over about 11 years does. Proposed fix in branches after-overflow-9-0 and after-overflow-8-6: both forms of [after] add the delay with a saturating TimeAddMs(). Tests timer-11.3 (fails without the fix on 9.0; its script returns at once on 8.6.18 too) and 11.4. | ||||
