summaryrefslogtreecommitdiffstats
path: root/tests/ioCmd.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-04-15 17:25:37 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-04-15 17:25:37 (GMT)
commita052603a84fecf8357b3b8601a98a8924355cd4b (patch)
treedf9a254fbb07ed902fde26d3317ea65357983dae /tests/ioCmd.test
parent363b6911107557283c7fec07e041e14c7af7eee3 (diff)
parentd25403a5a8b4f784566eb15f30b46ed568efc478 (diff)
downloadtcl-a052603a84fecf8357b3b8601a98a8924355cd4b.zip
tcl-a052603a84fecf8357b3b8601a98a8924355cd4b.tar.gz
tcl-a052603a84fecf8357b3b8601a98a8924355cd4b.tar.bz2
[88aef05cda] Stop reentrancy segfault in reflected channels by managing
callbacks as (copies of) lists, not shared Tcl_Obj arrays. Still could use cleanup and improvements.
Diffstat (limited to 'tests/ioCmd.test')
-rw-r--r--tests/ioCmd.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index a150d59..0a61252 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -793,6 +793,25 @@ test iocmd-21.19 {chan create, init failure -> no channel, no finalize} -match g
rename foo {}
set res
} -result {{} {initialize rc* {read write}} 1 {*all required methods*} {}}
+test iocmd-21.20 {Bug 88aef05cda} -setup {
+ proc foo {method chan args} {
+ switch -- $method blocking {
+ chan configure $chan -blocking [lindex $args 0]
+ return
+ } initialize {
+ return {initialize finalize watch blocking read write
+ configure cget cgetall}
+ } finalize {
+ return
+ }
+ }
+ set ch [chan create {read write} foo]
+} -body {
+ list [catch {chan configure $ch -blocking 0} m] $m
+} -cleanup {
+ close $ch
+ rename foo {}
+} -match glob -result {1 {*nested eval*}}
# --- --- --- --------- --------- ---------
# Helper commands to record the arguments to handler methods.