summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-03-12 18:06:13 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-03-12 18:06:13 (GMT)
commit0a78bbbd2192fb9210fb701537a53b9bf225c8dd (patch)
tree99c595705af12340ce3dbbb67bd55039aafabe4a /tests
parent9a2dce2fe1de8870e0fcbe8a8693b762065a336c (diff)
downloadtcl-0a78bbbd2192fb9210fb701537a53b9bf225c8dd.zip
tcl-0a78bbbd2192fb9210fb701537a53b9bf225c8dd.tar.gz
tcl-0a78bbbd2192fb9210fb701537a53b9bf225c8dd.tar.bz2
* generic/tclVar.c (TclArraySet): Make efficient private copy of
* tests/var.test (var-17.1): the "list" argument to [array set] to avoid crash due to shimmering invalidating pointers. [Bug 1669489].
Diffstat (limited to 'tests')
-rw-r--r--tests/var.test14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/var.test b/tests/var.test
index b3fc475..57c6fe4 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.27 2006/10/09 19:15:45 msofer Exp $
+# RCS: @(#) $Id: var.test,v 1.28 2007/03/12 18:06:14 dgp Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -702,6 +702,18 @@ test var-16.1 {CallVarTraces: save/restore interp error state} {
set ::errorInfo
} bar
+test var-17.1 {TclArraySet [Bug 1669489]} -setup {
+ unset -nocomplain ::a
+} -body {
+ namespace eval :: {
+ set elements {1 2 3 4}
+ trace add variable a write {string length $elements ;#}
+ array set a $elements
+ }
+} -cleanup {
+ unset -nocomplain ::a ::elements
+} -result {}
+
catch {namespace delete ns}
catch {unset arr}
catch {unset v}