summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-04-21 20:01:49 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-04-21 20:01:49 (GMT)
commitcff1d5a3e7658bac7935cd60c96b85de225ed46e (patch)
tree1cafbbde11aea4a2ecdb5142e57feefe56292331 /tests
parent1fa3d23817b3242fb5a8cad38f75b2d4b9f6f1f5 (diff)
parenta07adf4d6d28771d9aa74ef06526e5fb3035f5c1 (diff)
downloadtcl-cff1d5a3e7658bac7935cd60c96b85de225ed46e.zip
tcl-cff1d5a3e7658bac7935cd60c96b85de225ed46e.tar.gz
tcl-cff1d5a3e7658bac7935cd60c96b85de225ed46e.tar.bz2
merge 8.5
Diffstat (limited to 'tests')
-rw-r--r--tests/ioCmd.test32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index f021ade..8bf32d2 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -774,6 +774,38 @@ 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 0
+} -cleanup {
+ close $ch
+ rename foo {}
+} -result {}
+test iocmd-21.22 {[close] in [read] segfaults} -setup {
+ proc foo {method chan args} {
+ switch -- $method initialize {
+ return {initialize finalize watch read}
+ } finalize {} watch {} read {
+ catch {close $chan}
+ return a
+ }
+ }
+ set ch [chan create read foo]
+} -body {
+ read $ch 1
+} -returnCodes error -cleanup {
+ catch {close $ch}
+ rename foo {}
+} -match glob -result {*invalid argument*}
# --- --- --- --------- --------- ---------
# Helper commands to record the arguments to handler methods.