Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2021-02-25
22:24 • Closed ticket [3879edb390]: arithmetic exception in "time" command... artifact: 401706df59 user: dgp
19:26 • New ticket [3879edb390]. artifact: 0c726fe7df user: anonymous

arithmetic exception in "time" command

Closed / Out of Date3879edb3901b5a8e9d053b94458013cbbb42ffeeCreated 6 years agoUpdated 6 years ago
Descriptionplain2021-02-25 19:26:02
I am a software developer for the Synopsys NanoTime tool, which runs tcl files.

We are observing a crash with the "time" command, in generic/tclCmdMZ.c, function Tcl_TimeObjCmd, line 4168:

    objs[0] = Tcl_NewIntObj((count <= 0) ? 0 : (int) totalMicroSec);

with count = 1 and totalMicroSec = 6646624593.

I believe the arithmetic exception is due to casting a too-large number to int.
dgpplain2021-02-25 22:24:54
The fix for [4ee9b4f3e9] should have corrected this as well.  That happened about 2 years ago. Update to Tcl 8.6.10 or later to get the fix.
Log in (anonymous is fine) to add a comment.