Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ffb54d09eca2d94f450498b7701afad30a9c53fb9fa07d3e46bbf46270bb0a1d
Ticket: 0306a5563c65ab14410c426f59f00d714bf276fc
Writing large strings to file create wrong results
User & Date: pointsman on 2023-04-22 17:53:43
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    Run this script:
    
    package require Tcl 9
    set fd [open out.txt w+]
    puts $fd [lrepeat [expr {int(pow(2,31)) + 1}] ""]
    close $fd
    
    The tail of the created file (here the output of tail -c 20) look like:
    
     {} {} {} {} {{} {}
    
    Note here:   ^
    
    If I run the variant from above
    
    package require Tcl 9
    set fd [open out.txt w+]
    puts $fd [lrepeat [expr {int(pow(2,31)) + 1}] ""]
    close $fd
    
    the tail of the created file looks like:
    
     a a a a a a a aa a
    
    which also seems wrong.
    
  5. foundin changed to: "Tcl 9"
  6. is_private changed to: "0"
  7. login: "pointsman"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "4ca203a8e925aecdd9419645f936bccf18cd6ea7"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "pointsman"
  14. subsystem changed to: "18. Commands M-Z"
  15. title changed to: "Writing large lists to file create wrong results"
  16. type changed to: "Bug"