summaryrefslogtreecommitdiffstats
path: root/tests/var.test
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2010-08-03 17:25:13 (GMT)
committerandreas_kupries <akupries@shaw.ca>2010-08-03 17:25:13 (GMT)
commitab5c3c96ae0986e82a8b19544545609110e5a6a1 (patch)
treef9094a52110e9198bc807b6f65b22e772ebce337 /tests/var.test
parenta806b22a63bbc7ded535172808d56e1d5cf258f8 (diff)
downloadtcl-ab5c3c96ae0986e82a8b19544545609110e5a6a1.zip
tcl-ab5c3c96ae0986e82a8b19544545609110e5a6a1.tar.gz
tcl-ab5c3c96ae0986e82a8b19544545609110e5a6a1.tar.bz2
* tests/var.test (var-19.1): [Bug 3037525]: Added test
demonstrating the local hashtable deletion crash and fix.
Diffstat (limited to 'tests/var.test')
-rw-r--r--tests/var.test9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/var.test b/tests/var.test
index 59b71be..dd9483b 100644
--- a/tests/var.test
+++ b/tests/var.test
@@ -14,7 +14,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: var.test,v 1.35 2010/02/02 00:11:31 dkf Exp $
+# RCS: @(#) $Id: var.test,v 1.36 2010/08/03 17:25:13 andreas_kupries Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -762,6 +762,13 @@ test var-18.1 {array unset and unset traces: Bug 2939073} -setup {
} -cleanup {
unset x already
} -result 0
+
+
+test var-19.1 {crash when freeing locals hashtable: Bug 3037525} {
+ proc foo {} { catch {upvar 0 dummy \$index} }
+ foo ; # This crashes without the fix for the bug
+ rename foo {}
+} {}
catch {namespace delete ns}
catch {unset arr}