summaryrefslogtreecommitdiffstats
path: root/tests/var.test
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2003-05-12 17:20:39 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2003-05-12 17:20:39 (GMT)
commit8606968d1609c45b49ee63b81ace58a077b6a1ba (patch)
treebe9ea5e0031a738dfb0c79b420fa69d47849b95a /tests/var.test
parent99fe4d8e2e7916cd7a6c4c361b6f6d4a92a41e53 (diff)
downloadtcl-8606968d1609c45b49ee63b81ace58a077b6a1ba.zip
tcl-8606968d1609c45b49ee63b81ace58a077b6a1ba.tar.gz
tcl-8606968d1609c45b49ee63b81ace58a077b6a1ba.tar.bz2
* generic/tclVar.c (TclObjLookupVar): [Bug 735335] temporary fix,
disabling usage of tclNsVarNameType. * tests/var.test (var-15.1): test for [Bug 735335]
Diffstat (limited to 'tests/var.test')
-rw-r--r--tests/var.test17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/var.test b/tests/var.test
index 7fff348..8969384 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.21 2003/03/24 00:49:00 msofer Exp $
+# RCS: @(#) $Id: var.test,v 1.22 2003/05/12 17:20:41 msofer Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -680,6 +680,21 @@ test var-14.1 {array names syntax} -body {
array names foo bar baz snafu
} -returnCodes 1 -match glob -result *
+test var-15.1 {segfault in [unset], [Bug 735335]} {
+ proc A { name } {
+ upvar $name var
+ set var $name
+ }
+ #
+ # Note that the variable name has to be
+ # unused previously for the segfault to
+ # be triggered.
+ #
+ namespace eval test A useSomeUnlikelyNameHere
+ namespace eval test unset useSomeUnlikelyNameHere
+} {}
+
+
catch {namespace delete ns}
catch {unset arr}
catch {unset v}