Tcl Source Code

View Ticket
Login
Ticket UUID: e0a7b3e5f8291c5de9fb54fc753543e4da699d0a
Title: DoRead() omits needed call to UpdateInterest()
Type: Bug Version: core-8-5-branch and trunk
Submitter: dgp Created on: 2015-08-10 17:35:35
Subsystem: 25. Channel System Assigned To: dgp
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2015-09-23 17:16:28
Resolution: Fixed Closed By: dgp
    Closed on: 2015-09-23 17:16:28
Description:
Brian Griffin has uncovered this, and it's been dissected in several
messages on the TCLCORE mailing list.

Any time the DoRead() routine acts so that the state of the input
buffers on the channel toggles between EMPTY or NOT-EMPTY,
there must be a call to UpdateInterest() to get the notifier and
file event machinery to function properly.  This has been broken
for about a year, where there is no call to UpdateInterest() in
the case where a read of exactly the number of bytes requested
also has the effect of precisely emptying the buffer.

The fix is easy, will commit it to a branch shortly.  I hold back
putting it on the main branches only briefly because I'm
attempting to devise a test of the matter to go in the test suite.
User Comments: dgp added on 2015-09-23 17:16:28:
Fix committed.