summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-02-04 18:38:41 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-02-04 18:38:41 (GMT)
commit00085648bf2759b366438cbc3d9d1c4eb7ba379f (patch)
treeb8a3ae129e2fb1c22449d661cafeda30f5b0af46
parente3ebdcef6c0fac5f986d73c45f0c70b4f02f0707 (diff)
downloadtcl-00085648bf2759b366438cbc3d9d1c4eb7ba379f.zip
tcl-00085648bf2759b366438cbc3d9d1c4eb7ba379f.tar.gz
tcl-00085648bf2759b366438cbc3d9d1c4eb7ba379f.tar.bz2
Cherrypick again. Add test.bug_3602706
-rw-r--r--generic/tclVar.c6
-rw-r--r--tests/set.test5
2 files changed, 5 insertions, 6 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 4458dac..d000296 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -70,9 +70,6 @@ VarHashCreateVar(
}
}
-/*
- * Callers must Incr key if they plan to Decr it.
- */
#define VarHashFindVar(tablePtr, key) \
VarHashCreateVar((tablePtr), (key), NULL)
#define VarHashInvalidateEntry(varPtr) \
@@ -4987,13 +4984,11 @@ Tcl_FindNamespaceVar(
Tcl_Obj *namePtr = Tcl_NewStringObj(name, -1);
Tcl_Var var;
- Tcl_IncrRefCount(namePtr);
var = ObjFindNamespaceVar(interp, namePtr, contextNsPtr, flags);
Tcl_DecrRefCount(namePtr);
return var;
}
-/* Callers must incr namePtr if they plan to decr it. */
static Tcl_Var
ObjFindNamespaceVar(
Tcl_Interp *interp, /* The interpreter in which to find the
@@ -5463,7 +5458,6 @@ TclInfoLocalsCmd(
*
* Side effects:
* None.
- * Caller must incr patternPtr if they plan to decr it.
*
*----------------------------------------------------------------------
*/
diff --git a/tests/set.test b/tests/set.test
index 9e0ddc0..cad951b 100644
--- a/tests/set.test
+++ b/tests/set.test
@@ -521,6 +521,11 @@ test set-5.1 {error on malformed array name} testset2 {
list $msg $msg1
} {{can't read "z(a)(b)": variable isn't array} {can't read "z(b)(a)": variable isn't array}}
+# In a mem-debug build, this test will crash unless Bug 3602706 is fixed.
+test set-5.2 {Bug 3602706} -body {
+ testset2 ::tcl_platform not-in-there
+} -returnCodes error -result * -match glob
+
# cleanup
catch {unset a}
catch {unset b}