TIP #601 bug: handling of '-buffersize'
However, there were two testcases (for 9.0) which puzzled me:
I marked those with "knownBug". My first investigation hints that this is - indeed - a bug in the current TIP #601 implementation.
Those 2 testcases don't throw an exception, but they truncate the channel one more byte than expected. The cause of this is an invalid byte at the end of the stream, as a result of the truncation. But .... the stream is truncated as a result of the channel's "-buffersize" option, we don't know yet whether this byte is really invalid or not: It could still be followed by more bytes, forming a valid utf-8 byte sequence. Conclusion: when a channel's '-buffersize' is used, we have to accept 'invalid' bytes at the end of the stream as before.
522899ab24Fix for [https://core.tcl-lang.org/tk/tktview?name=370b1ff03e|370b1ff03e]. Not complete/correct yet, since this backouts the fix for [4dbfa46caa] check-in2023-01-08 22:47:45dd396e24b7Fix [4dbfa46caa]: TIP #601 bug: handling of '-buffersize' check-in2022-03-21 09:57:03126625695dSee [4dbfa46caa]: Remove "constraint deprecated" from failing testcases which should pass check-in2022-03-18 15:39:44
Fixed [here]