summaryrefslogtreecommitdiffstats
path: root/tests/ioCmd.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-04-17 19:58:41 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-04-17 19:58:41 (GMT)
commit87f75437c09a8e8fbe5fe0eaa68200c773799e28 (patch)
tree2c33600b5cac3d45b680edff14b11e6a7685accb /tests/ioCmd.test
parent9814e7b3519b71ebace82cd8ca37748fc92b8185 (diff)
downloadtcl-87f75437c09a8e8fbe5fe0eaa68200c773799e28.zip
tcl-87f75437c09a8e8fbe5fe0eaa68200c773799e28.tar.gz
tcl-87f75437c09a8e8fbe5fe0eaa68200c773799e28.tar.bz2
Another test exposing another segfault.
Diffstat (limited to 'tests/ioCmd.test')
-rw-r--r--tests/ioCmd.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index f021ade..184f773 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -774,6 +774,22 @@ test iocmd-21.20 {Bug 88aef05cda} -setup {
close $ch
rename foo {}
} -match glob -result {1 {*nested eval*}}
+test iocmd-21.21 {[close] in [read] segfaults} -setup {
+ proc foo {method chan args} {
+ switch -- $method initialize {
+ return {initialize finalize watch read}
+ } finalize {} watch {} read {
+ close $chan
+ return a
+ }
+ }
+ set ch [chan create read foo]
+} -body {
+ read $ch 1
+} -cleanup {
+ close $ch
+ rename foo {}
+} -result a
# --- --- --- --------- --------- ---------
# Helper commands to record the arguments to handler methods.