Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7edaca24a252d8b3e0d9a1026266826738178ed6
Ticket: 1965787fffffffffffffffffffffffffffffffff
8.5.2 "tell" returns neg 32-bit value for positions > 2GB
User & Date: nobody on 2008-05-17 03:57:10
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Tcl "tell" command returned 64-bit unsigned values starting in 8.4 for use in managing files >2GB.
    
    Tcl "tell" command in 8.5.2 seems to be returning a signed value which appears "negative" and unsuitable for use in Tcl "seek" command for file positions > 2GB.
    
    Platform: XP-SP2, builds built locally with VC++ 2008 Express, also the distributed Equi4 "tclkit" for 8.5.2 produce this output:
    
    (2008) 3 % set tcl_patchLevel
    8.5.2
    (2008) 4 % set fn "whopper.bin"
    whopper.bin
    (2008) 5 % file stat $fn s
    (2008) 6 % set s(size)
    3974747277
    (2008) 7 % set f [open $fn "rb"]
    fileb54c58
    (2008) 8 % seek $f 2147016079
    (2008) 9 % tell $f
    2147016079
    (2008) 10 % read $f 1000000 ; set x
    can't read "x": no such variable
    (2008) 11 % tell $f
    -2146951217
    (2008) 12 % seek $f 3974747000
    (2008) 13 % tell $f
    -320220296
    
    By comparison (same platform):
    (2008) 11 % set tcl_patchLevel
    8.4.4
    (2008) 12 % set fn "whopper.bin"
    whopper.bin
    (2008) 13 % file stat $fn s
    (2008) 14 % set s(size)
    3974747277
    (2008) 15 % set f [open $fn "r"] ; fconfigure $f -translation binary
    (2008) 16 % set f
    file9bd888
    (2008) 17 % seek $f 2147016079
    (2008) 18 % tell $f
    2147016079
    (2008) 19 % read $f 1000000 ; set x
    can't read "x": no such variable
    (2008) 20 % tell $f
    2148016079
    (2008) 21 % seek $f 3974747000
    (2008) 22 % tell $f
    3974747000
    (2008) 23 % 
    
    David Burns : consollidator<AT>yahoo.com
    
  4. foundin changed to: "obsolete: 8.5.2"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "nobody"
  10. subsystem changed to: "18. Commands M-Z"
  11. title changed to:
    8.5.2 "tell" returns neg 32-bit value for positions > 2GB
    
  12. type changed to: "Bug"