Skip to content
Tcl Source Code History Of Ticket 8afd93d3d3
Login

History Of Ticket 8afd93d3d3

Artifacts Associated With Ticket 8afd93d3d3

  1. Ticket change [5d5ffc81c0] (rid 261619) by anonymous on 2026-11-13 22:13:29:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Platform: NetBSD 11.1 running on a Sun Ultra 5 (Sparc64, big-endian).
      Tcl is version 9.1.0.
      GCC is version 12.5.0.
      
      The issue:
      clock format commands return zero for hours/minutes/seconds.
      
      To reproduce:
      $ clock format [clock seconds] -format "%a %b %d %H:%M:%S"
      Expected result: Fri Nov 13 21:49:32
      Actual result: Fri Nov 13 00:00:00
      
      Many more clock functions appear to be affected as well, running 'make test' shows a very large number of errors in clock.test.
      
      Testing on an amd64 platform shows no errors in clock.test, which suggests a big/little endian issue.
      
      Looking at the source, secondOfDay is declared to be Tcl_WideInt in tclDate.h but is accessed using IntFieldAt() within tclClockFmt.c.
      That will read incorrect data on a big-endian host.
      
    5. foundin initialized to: "9.1.0"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Severe"
    11. status initialized to: "Open"
    12. submitter initialized to: "anonymous"
    13. subsystem initialized to: "16. Commands A-H"
    14. title initialized to: "Clock format fails on NetBSD 11.1 on Sparc64"
    15. type initialized to: "Bug"
  2. Ticket change [ac4ab67ff5] (rid 261622) by jan.nijtmans on 2026-11-13 23:03:40:

    1. assignee changed to: "sebres"
    2. icomment: "Does [2247d9b83c|this] help?"
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
  3. Ticket change [7218a85be6] (rid 261623) by serhiy.storchaka on 2026-11-13 23:14:15:

    1. icomment:
      The two fields were int until [bbb77cc456] (the fix of an overflow in clock add, before TIP 688 was merged) widened them, but the format and scan tables still access them as int. They only hold a time of day, so the fix in [2247d9b83c] is right, and clock.test passes with it.
      
      One side effect: the free-form parser stores its 64-bit numbers into these int fields before the range check, so clock scan "12:00:4294967301" now gives 12:00:05 instead of "invalid time". Hours and minutes already behave this way: "12:4294967301:00" gives 12:05:00. A range check in tclGetDate.y before the assignment would fix all three.
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [84043d1988] (rid 261625) by serhiy.storchaka on 2026-11-14 08:37:21:

    1. icomment:
      I opened [f894a85b9a] for the range check and am working on it.
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
  5. Ticket change [fb5108dab3] (rid 263430) by jan.nijtmans on 2026-11-27 21:58:19:

    1. assignee changed to: "jan.nijtmans"
    2. icomment: "Merged to [537be3478b|trunk]"
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
    5. resolution changed to: "Fixed"
    6. status changed to: "Pending"