Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: daa3ec0e9b3167a943f8317b7b0e31cb03c1ec063cbf7e00c978357a922588fe
Ticket: 079d72381d84445b3e75b4508a5e1ba1b493c768
Tcl 8.7a5 hangs loading package crc16 or crc32 from tcllib 1.20
User & Date: anonymous on 2021-09-23 14:14:41
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Platform: Tcl8.7a5 built on Linux x86_64 with tcllib 1.20 installed
    
    To reproduce: Start tclsh8.7 and enter 'package require crc16', tclsh
    never returns to the prompt.
    
    The hang appears to be due to a change in the behaviour of int() between
    Tcl 8.6 and 8.7. The code in crc16.tcl that causes the hang is included
    below, the same code can also be found in crc32.tcl.
    
    # calculate the sign bit for the current platform.
    variable signbit
    if {![info exists signbit]} {
        variable v
        for {set v 1} {int($v) != 0} {set signbit $v; set v [expr {$v<<1}]} {}
        unset v
    }
    
    Under Tcl 8.6, int($v) returns zero when the native word-length is exceeded,
    under 8.7 it doesn't.
    
    Tcl 8.6.11:
    % expr int(18446744073709551616)
    0
    % 
    Tcl 8.7a5:
    %  expr int(18446744073709551616)
    18446744073709551616
    %
    
  5. foundin changed to: "8.7a5"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "8e5a305d42b9381cdca00d58075ee28d965f6ab0"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "17. Commands I-L"
  15. title changed to:
    Tcl 8.7a5 hangs loading package crc16 or crc32 from tcllib 1.20
    
  16. type changed to: "Bug"