Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d26edead127d55243d6a3cadef05c36456c46c3b1cfff832a18310d7d407ea92
Ticket: 9ee9f4d7be4615e04f62fe22885dadce13ca4d01
zlib push/pop corrupts underlying channel
User & Date: pooryorick on 2020-06-16 15:10:37
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    In the following script, the $tmpchan gains two new characters at the end each
    time a channel is pushed and then popped:
    
    
    <code><pre>
    #! /usr/bin/env tclsh
    
    set data hello
    set tmpchan [file tempfile]
    puts -nonewline $tmpchan $data
    flush $tmpchan
    
    chan configure $tmpchan -translation binary
    set tmpchan2 [file tempfile]
    chan configure $tmpchan2 -translation binary
    for {set i 0} {$i < 10} {incr i} {
        seek $tmpchan 0 end
        set size [chan tell $tmpchan]
        seek $tmpchan 0 start
        set data [read $tmpchan]
        set size2 [string length $data]
        seek $tmpchan 0 start
        zlib push deflate $tmpchan -level 6
        chan truncate $tmpchan2 0
        chan copy $tmpchan $tmpchan2
        chan pop $tmpchan
        puts [list $size $size2]
    }
    close $tmpchan
    
    </pre></code>
    
  5. foundin changed to: "various"
  6. is_private changed to: "0"
  7. login: "pooryorick"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Important"
  11. status changed to: "Open"
  12. submitter changed to: "pooryorick"
  13. subsystem changed to: "25. Channel System"
  14. title changed to: "zlib push/pop corrupts underlying channel"
  15. type changed to: "Bug"