Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5d5ffc81c0decf4b2fb8c501f7db9136c56f74031ff21fa4dd2defaecd53402f
Ticket: 8afd93d3d360b933a8402157dccf4bb8a9c10026
Clock format fails on NetBSD 11.1 on Sparc64
User & Date: anonymous on 2026-11-13 22:13:29
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed 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 changed to: "9.1.0"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Severe"
  11. status changed to: "Open"
  12. submitter changed to: "anonymous"
  13. subsystem changed to: "16. Commands A-H"
  14. title changed to: "Clock format fails on NetBSD 11.1 on Sparc64"
  15. type changed to: "Bug"