#3798 clock overflow/wraparound

obsolete: 8.5b1
closed-fixed
5
2008-02-27
2007-09-27
Don Porter
No

Since Tcl 8.5 has unlimited range
integers, I'm mildly surprised by:

% clock format 0x10000000000000000
expected integer but got "0x10000000000000000"
% clock format 0xffffffffffffffff
Wed Dec 31 18:59:59 EST 1969

clock.n is long, and I can't claim
to have read every word, but a quick
scan didn't appear to document a
limited range on valid time values.

Discussion

  • Don Porter

    Don Porter - 2007-11-27

    Logged In: YES
    user_id=80530
    Originator: YES

    status?

     
  • Kevin B KENNY

    Kevin B KENNY - 2008-02-27

    Logged In: YES
    user_id=99768
    Originator: NO

    [clock] is limited by design to 64-bit integers (there's a good bit of C code in there, predating the inclusion of libtommath). Checks have now been added to make sure that the arguments fit. (2**64 seconds should be enough for anybody; I doubt that the calendar will last that long, anyway.)

     
  • Kevin B KENNY

    Kevin B KENNY - 2008-02-27
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks