Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e791cc93cb7c5cfbf44a30db6ea7cd931c5fdca7
Ticket: 2895565fffffffffffffffffffffffffffffffff
Busyloop in vwait in innocent HTTP code
User & Date: ferrieux on 2009-11-11 06:34:00
Changes

  1. icomment:
    In TclIO.c +8710: I see that in the binary->non-binary case, we correctly call DoWriteChars, but we then use the returned number of bytes (which is 4165 here for an initial 4096 buffer). Then when we decrement the total count to read by this value, we get a negative result:
    
    if (outBinary || sameEncoding) {
        sizeb = DoWrite(outStatePtr->topChanPtr, buffer, sizeb);
    } else {
        sizeb = DoWriteChars(outStatePtr->topChanPtr, buffer, sizeb);
    }
    
    if (inBinary || sameEncoding) {
        /*
         * Both read and write counted bytes.
         */
    
        size = sizeb;
    
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"