summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--generic/tclBinary.c1
-rw-r--r--generic/tclDictObj.c1
-rw-r--r--generic/tclEncoding.c1
-rw-r--r--generic/tclListObj.c1
-rw-r--r--generic/tclNamesp.c1
-rw-r--r--generic/tclObj.c1
-rw-r--r--generic/tclPathObj.c5
-rw-r--r--generic/tclProc.c1
-rw-r--r--generic/tclRegexp.c1
-rw-r--r--generic/tclStringObj.c1
-rw-r--r--generic/tclVar.c3
12 files changed, 27 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 79bc9f9..73c9ca7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-04-27 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclBinary.c: Backport fix for [Bug 2857044].
+ * generic/tclDictObj.c: All freeIntRepProcs set typePtr to NULL.
+ * generic/tclEncoding.c:
+ * generic/tclListObj.c:
+ * generic/tclNamesp.c:
+ * generic/tclObj.c:
+ * generic/tclPathObj.c:
+ * generic/tclProc.c:
+ * generic/tclRegexp.c:
+ * generic/tclStringObj.c:
+ * generic/tclVar.c:
+
2011-04-21 Don Porter <dgp@users.sourceforge.net>
* generic/tclInt.h: Use macro to set List intreps.
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index b1bf2ab..90d392b 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -436,6 +436,7 @@ FreeByteArrayInternalRep(
Tcl_Obj *objPtr) /* Object with internal rep to free. */
{
ckfree((char *) GET_BYTEARRAY(objPtr));
+ objPtr->typePtr = NULL;
}
/*
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index 593108f..912e7a9 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -402,6 +402,7 @@ FreeDictInternalRep(
}
dictPtr->internalRep.otherValuePtr = NULL; /* Belt and braces! */
+ dictPtr->typePtr = NULL;
}
/*
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index ad60ed7..2e0d51f 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -334,6 +334,7 @@ FreeEncodingIntRep(
Tcl_Obj *objPtr)
{
Tcl_FreeEncoding((Tcl_Encoding) objPtr->internalRep.otherValuePtr);
+ objPtr->typePtr = NULL;
}
/*
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 1849319..036d624 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -1639,6 +1639,7 @@ FreeListInternalRep(
listPtr->internalRep.twoPtrValue.ptr1 = NULL;
listPtr->internalRep.twoPtrValue.ptr2 = NULL;
+ listPtr->typePtr = NULL;
}
/*
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index aed28db..5dbffc6 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -4615,6 +4615,7 @@ FreeNsNameInternalRep(
}
ckfree((char *) resNamePtr);
}
+ objPtr->typePtr = NULL;
}
/*
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 15c8276..5c17df2 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -4194,6 +4194,7 @@ FreeCmdNameInternalRep(
ckfree((char *) resPtr);
}
}
+ objPtr->typePtr = NULL;
}
/*
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index bb2c35d..da3b280 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -1154,7 +1154,6 @@ Tcl_FSConvertToPathType(
UpdateStringOfFsPath(pathPtr);
}
FreeFsPathInternalRep(pathPtr);
- pathPtr->typePtr = NULL;
}
return Tcl_ConvertToType(interp, pathPtr, &tclFsPathType);
@@ -1173,7 +1172,6 @@ Tcl_FSConvertToPathType(
* UpdateStringOfFsPath(pathPtr);
* }
* FreeFsPathInternalRep(pathPtr);
- * pathPtr->typePtr = NULL;
* return Tcl_ConvertToType(interp, pathPtr, &tclFsPathType);
* }
* }
@@ -1963,7 +1961,6 @@ Tcl_FSGetNormalizedPath(
UpdateStringOfFsPath(pathPtr);
}
FreeFsPathInternalRep(pathPtr);
- pathPtr->typePtr = NULL;
if (Tcl_ConvertToType(interp, pathPtr, &tclFsPathType) != TCL_OK) {
return NULL;
}
@@ -2270,7 +2267,6 @@ TclFSEnsureEpochOk(
UpdateStringOfFsPath(pathPtr);
}
FreeFsPathInternalRep(pathPtr);
- pathPtr->typePtr = NULL;
if (SetFsPathFromAny(NULL, pathPtr) != TCL_OK) {
return TCL_ERROR;
}
@@ -2660,6 +2656,7 @@ FreeFsPathInternalRep(
}
ckfree((char *) fsPathPtr);
+ pathPtr->typePtr = NULL;
}
static void
diff --git a/generic/tclProc.c b/generic/tclProc.c
index dd12901..89bd0b9 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -2434,6 +2434,7 @@ FreeLambdaInternalRep(
TclProcCleanupProc(procPtr);
}
TclDecrRefCount(nsObjPtr);
+ objPtr->typePtr = NULL;
}
static int
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index ed47dc9..d340f4c 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -756,6 +756,7 @@ FreeRegexpInternalRep(
if (--(regexpRepPtr->refCount) <= 0) {
FreeRegexp(regexpRepPtr);
}
+ objPtr->typePtr = NULL;
}
/*
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 17bed1b..13dda54 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -3056,6 +3056,7 @@ FreeStringInternalRep(
Tcl_Obj *objPtr) /* Object with internal rep to free. */
{
ckfree((char *) GET_STRING(objPtr));
+ objPtr->typePtr = NULL;
}
/*
diff --git a/generic/tclVar.c b/generic/tclVar.c
index a1885b5..aaf1cb9 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -4776,6 +4776,7 @@ FreeLocalVarName(
if (namePtr) {
Tcl_DecrRefCount(namePtr);
}
+ objPtr->typePtr = NULL;
}
static void
@@ -4817,6 +4818,7 @@ FreeNsVarName(
CleanupVar(varPtr, NULL);
}
}
+ objPtr->typePtr = NULL;
}
static void
@@ -4856,6 +4858,7 @@ FreeParsedVarName(
TclDecrRefCount(arrayPtr);
ckfree(elem);
}
+ objPtr->typePtr = NULL;
}
static void