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)
commit924739ac234ed6476ed713a633cb83e969e1ef83 (patch)
treedf9a254fbb07ed902fde26d3317ea65357983dae /tests/ioCmd.test
parent5d9aef7a4e951d7fb7242f892932a6b960bb95b7 (diff)
parentfdcd434e12994cbbead379c3aac28640ec417cca (diff)
downloadtcl-924739ac234ed6476ed713a633cb83e969e1ef83.zip
tcl-924739ac234ed6476ed713a633cb83e969e1ef83.tar.gz
tcl-924739ac234ed6476ed713a633cb83e969e1ef83.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.