Ticket UUID: | 1276628 | |||
Title: | TCL_CHANNEL_TYPE_4 inconsistent | |||
Type: | Bug | Version: | obsolete: 8.5a4 | |
Submitter: | dgp | Created on: | 2005-08-30 13:46:47 | |
Subsystem: | 27. Channel Types | Assigned To: | andreas_kupries | |
Priority: | 9 Immediate | Severity: | ||
Status: | Closed | Last Modified: | 2006-03-28 01:10:27 | |
Resolution: | Fixed | Closed By: | andreas_kupries | |
Closed on: | 2006-03-27 18:10:27 | |||
Description: |
Releases Tcl 8.4.10 and 8.4.11 included TCL_CHANNEL_TYPE_4 in the public header file, defining it to be a Tcl_ChannelType struct that includes and ends with a Tcl_DriverThreadActionProc field. (TIP 218) The HEAD (8.5a4) has added another field, Tcl_DriverTruncateProc (TIP 208), but has not created the TCL_CHANNEL_TYPE_5 to distinguish channels using that field from those that do not, and could be used in an 8.4.11 interp. | |||
User Comments: |
andreas_kupries added on 2006-03-28 01:10:27:
Logged In: YES user_id=75003 Committed. andreas_kupries added on 2006-03-28 01:07:32: File Added - 172422: 85.chan_v5.diff andreas_kupries added on 2006-03-28 01:07:31: Logged In: YES user_id=75003 Attached the patch I am about to commit. It compiles and passes the testsuite on Linux. andreas_kupries added on 2006-03-28 00:19:05: Logged In: YES user_id=75003 Looked over the relevant TIPs, i.e. #206/208, and #218. While both of them talk about going to version 4 for driver the context makes clear that the version number is incremented from whatever is maximum at the time the TIP goes final. #218 says in effect: Right now we known version 0 to 3, and we extend to 4. And from this I conclude that if version 4 is the actual maximum at time the TIP implementation is committed it should go to version 5. I will now change the HEAD to provide version 5, to make the internal drivers v5 (if they use thread states), etc. dgp added on 2006-03-10 11:54:27: Logged In: YES user_id=80530 The time to resolve this report is before 8.5a4 is released. If valid, the issue needs fixing, if invalid, it ought to be closed. andreas_kupries added on 2005-10-06 01:04:40: Logged In: YES user_id=75003 Hm. In the current situation a TYPE_4 channel defining a truncateProc is perfectly usable in both 8.5. and 8.4. As 8.4 has no Tcl_TruncateChannel API it will simply never acess this element. It is no matter that the structure is actually larger than 8.4 believes it is. If we go TYPE_5 for the truncateProc the channel would be unusable in 8.4, because 8.4 is not able to recognize TYPE_5. Actually it will think that the channel is TYPE_1 and dereference the version number to get the blockmode proc, crashing the core. andreas_kupries added on 2005-08-31 01:11:55: Logged In: YES user_id=75003 I dimly remember some discussion about this on tcl-core. It might have been about a related thing tough. I will have to dig this out. |
Attachments:
- 85.chan_v5.diff [download] added by andreas_kupries on 2006-03-28 01:07:31. [details]