diff options
author | dgp <dgp@users.sourceforge.net> | 2014-04-30 19:12:37 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-04-30 19:12:37 (GMT) |
commit | 75c22ad9870b02a3a9b9d213a1d38a1e93a7f7e7 (patch) | |
tree | 469f1760cf3bb5013c886359b7b65a23b3bbf6cc | |
parent | 267c1eb9f4c15531f7bf4095ffb56151ad8f9203 (diff) | |
download | tcl-75c22ad9870b02a3a9b9d213a1d38a1e93a7f7e7.zip tcl-75c22ad9870b02a3a9b9d213a1d38a1e93a7f7e7.tar.gz tcl-75c22ad9870b02a3a9b9d213a1d38a1e93a7f7e7.tar.bz2 |
Another segfault demo test, this one with [close] during [gets].
-rw-r--r-- | tests/ioCmd.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 8bf32d2..d2c0173 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -806,6 +806,22 @@ test iocmd-21.22 {[close] in [read] segfaults} -setup { catch {close $ch} rename foo {} } -match glob -result {*invalid argument*} +test iocmd-21.23 {[close] in [gets] segfaults} -setup { + proc foo {method chan args} { + switch -- $method initialize { + return {initialize finalize watch read} + } finalize {} watch {} read { + catch {close $chan} + return \n + } + } + set ch [chan create read foo] +} -body { + gets $ch +} -returnCodes error -cleanup { + catch {close $ch} + rename foo {} +} -match glob -result {*invalid argument*} # --- --- --- --------- --------- --------- # Helper commands to record the arguments to handler methods. |