Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c35111efcdad878683ac1b07b775f827be719f7b9b19a40e5571256583ddfca8
Ticket: 0306a5563c65ab14410c426f59f00d714bf276fc
Writing large strings to file create wrong results
User & Date: apnadkarni on 2023-04-23 02:35:40
Changes

  1. icomment:
    The issue could be in string generation from a list or in the puts / channel system. The following seems to indicate the latter.
    
    ```
    % set s [testbigdata string 0x80000004]; string length $s
    2147483652
    % set fd [open x.txt w]
    file2a4826a5a68
    % puts $fd $s
    % close $fd
    % string range $s end-20 end
    123456789012345678901
    ```
    
    Tailing the file,
    
    ```
    apnadkarni@IO:/mnt/d/src/tcltk/trunk/tcl/win$ tail -c 40 x.txt
    45678901234567890123456789012345601234
    ```
    
    Notice the 6 followed by 0 at the end. That's right around the INT_MAX offset into the string.
    
  2. login: "apnadkarni"
  3. mimetype: "text/x-markdown"