Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2014-10-02
14:47 • Closed ticket [bc5b790099]: read hangs on utf-8 channel plus 6 other changes artifact: 98ffa3c356 user: dgp
14:46
[bc5b790099] Improper calculation of new dstLimit value. New test io-12.7. check-in: 32edfe9722 user: dgp tags: trunk
14:43
[bc5b790099] Improper calculation of new dstLimit value. New test io-12.7. check-in: df382f0bf1 user: dgp tags: core-8-5-branch
14:03 • Ticket [bc5b790099] read hangs on utf-8 channel status still Open with 3 oth... artifact: 8027e8cfb9 user: dgp
2014-10-01
19:31 • Ticket [bc5b790099]: 3 changes artifact: 741ca874c4 user: dgp
19:02 • Ticket [bc5b790099]: 4 changes artifact: 58b93565b0 user: dgp
18:55 • New ticket [bc5b790099]. artifact: c6d94fcba9 user: jcr

read hangs on utf-8 channel

Closed / Fixedbc5b790099f7f89ba5f213bbf7bc92a22414f063Created 12 years agoUpdated 12 years ago
Descriptionplain2014-10-01 18:55:27
The following script hangs at the final read.

# ----
set data {gi4uIMKn4oCCLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4u4oCCLi4gwqfigIIK}

set f [file tempfile]
chan configure $f -encoding binary
puts -nonewline $f [binary decode base64 $data]
flush $f
seek $f 0
chan configure $f -encoding utf-8
puts stderr "about to read"
set newdata [read $f 130]
puts stderr [string length $newdata]
# ----
Referenced by2
  • 32edfe9722[bc5b790099] Improper calculation of new dstLimit value. New test io-12.7. check-in2014-10-02 14:46:54
  • df382f0bf1[bc5b790099] Improper calculation of new dstLimit value. New test io-12.7. check-in2014-10-02 14:43:10
dgp Ticket [bc5b790099]: 4 changes [History diff]2014-10-01 19:02:56
dgpplain2014-10-01 19:31:14
Bug enters in checkin 2e1e7c8266 .

Almost certainly enters also in 04b06f7cea breaking 8.5.16 in the same way.
dgpplain2014-10-02 14:03:33
The padding for Tcl_ExternalToUtf() was calculated wrong.
Testing a fix...
dgpplain2014-10-02 14:47:18
Fix with test committed.
Log in (anonymous is fine) to add a comment.