Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2bbf571dde23af64a1eb040674440b10d0525bc1ec8cb4f94c81ec8b7805c298
Ticket: 540bed4bde5128aa035465946ff9c520cd79e1c1
binary format can result in "integer value too large to represent"
User & Date: jan.nijtmans on 2018-09-04 14:28:03
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    Example:
    <pre>
    % string length [binary format w [expr {(wide(3) << 31) + (wide(3) << 64)}]]
    integer value too large to represent
    </pre>
    
    According to the documentation "binary format w" takes the least significant 64 bits from the given integer. Since Tcl has bignums, it should be able to do that, but this was never implemented for "binary format".
    
    Expected:
    <pre>
    % string length [binary format w [expr {(wide(3) << 31) + (wide(3) << 64)}]]
    8
    </pre>
    (since 64 bits always result in 8 bytes)
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "jan.nijtmans"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "jan.nijtmans"
  13. subsystem changed to: "16. Commands A-H"
  14. title changed to:
    binary format can result in "integer value too large to represent"
    
  15. type changed to: "Bug"