Tk Library Source Code

View Ticket
Login
Ticket UUID: 2890743
Title: comm crashes on large amount of data from server
Type: Bug Version: None
Submitter: Created on: 2009-11-02 15:22:49
Subsystem: comm Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-11-05 00:52:35
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2009-11-04 17:52:35
Description:
Since Tcl 8.0, using lindex and lreplace forces comm to have received a well-formed list from the comm server. If there is a large amount of data from the server, it is possible that the list does not become well-formed before running up against memory constraints resulting in a crash.
User Comments: andreas_kupries added on 2009-11-05 00:52:35:

allow_comments - 1

andreas_kupries added on 2009-11-05 00:52:34:
Committed to head, version of comm bumped to 4.6.1.

andreas_kupries added on 2009-11-04 22:48:53:
Thanks for the feedback, and glad to know that it seems to work in your environment as well.
I will commit the change ASAP, hopefully today.

added on 2009-11-04 22:03:59:
Downloaded and installed the patch and reran the scenario that caused the crash. The patch appears to fix the problem.

andreas_kupries added on 2009-11-03 05:09:07:
Added a patch for comm.tcl which replaces lindex/lreplace with Word0, a procedure emulating the 'lindex <list> 0' behaviour pre Tcl 8. I.e. takes the first word of a list, assuming that this word is well-formed, the remainder of the list does not have to be well-formed.

Passes comm's testsuite.

Please check in your environment as well.

andreas_kupries added on 2009-11-03 05:07:40:

File Deleted - 349266:

andreas_kupries added on 2009-11-03 05:07:29:

File Added - 349266: word_fix.patch

andreas_kupries added on 2009-11-03 05:07:25:

File Added - 349264: word_fix.patch

andreas_kupries added on 2009-11-03 05:05:07:

File Added - 349262: word.tcl

andreas_kupries added on 2009-11-03 05:04:24:

File Added - 349261: testword.tcl

Attachments: