Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 39d636733e8e90ed7402398ab4b09fb7d3b79796d3977031b47d6a71cb9c0365
Ticket: c4eb46a196227040bfb18770ac261d6836e58f0e
endless loop in gets on encoding error in non blocking mode
User & Date: oehhar on 2023-11-13 16:20:20
Changes

  1. icomment:
    It is also effective for the 2nd error sequence.
    The 2nd error sequence is an incomplete UTF-8 sequence.
    Then, the end of file will trigger the error, which is reached by a second "gets" command.
    
    The test is adopted to this double "gets".
    
    An additional test to check the recovery capabilities is added.
    There, the encoding is changed to binary and the gets succeeds.
    
    The branch is merged to core-8-branch by commit [94257f6465].
    
    Now, two new tests fail, which looks unrelated:
    
    <verbatim>
    ==== zlib-8.21 zlib transformation, bug f9eafc3886 FAILED
    ==== Contents of test case:
    
        set f [zlib push gzip [open $file w] -header [list comment \u100]]
    
    ---- Test completed normally; Return code was: 0
    ---- Return code should have been one of: 1
    ==== zlib-8.21 FAILED
    
    ---- zlib-8.22 start
    
    
    ==== zlib-8.22 zlib transformation, bug f9eafc3886 FAILED
    ==== Contents of test case:
    
        set f [zlib push gzip [open $file w] -header [list filename \u100]]
    
    ---- Test completed normally; Return code was: 0
    ---- Return code should have been one of: 1
    ==== zlib-8.22 FAILED
    </verbatim>
    
    I may do another debugger session to find out why.
    
    But the endless loop is cured, which is more important than a failing test.
    
  2. login: "oehhar"
  3. mimetype: "text/x-fossil-wiki"
  4. resolution changed to: "Fixed"
  5. username: "oehhar"