Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fa1bd84ed0596526a1f4861eb7f3f7fb4c58f396
Ticket: 686782ffffffffffffffffffffffffffffffffff
Changes to Tcl_SetObjLength() break "expect -re"
User & Date: rmax on 2003-02-14 21:09:40
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The following expect script shows unexpected (sic)
    behaviour when run on Tcl as of 2003/01/17 or later:
    
     spawn /bin/echo "test\nfoo\nbar\nbla"
     while 1 {
        expect {
            -re "\n" { lappend lines $expect_out(buffer) }
            eof break
        }
     }
     foreach line $lines { puts "»$line«" }
    
    It should print:
    ---------------
    »test
    «
    »foo
    «
    »bar
    «
    »bla
    «
    ---------------
    but it does print something like:
    ---------------
    »test
    «
    »foo
    b«
    »ar
    bl«
    ---------------
    
    On some machines it fails almost every time, on others
    only once in a while. If expect is being run on a i386
    under valgrind, the misbehaviour occurs every time. If
    Tcl_SetObjLength() get's reverted to r1.26 the problem
    disappears.
    
    
  4. foundin changed to: "obsolete: 8.4.1.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "rmax"
  9. subsystem changed to: "44. UTF-8 Strings"
  10. title changed to: "Changes to Tcl_SetObjLength() break "expect -re""
  11. type changed to: "Bug"