summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-11-26 22:23:43 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-11-26 22:23:43 (GMT)
commitcbc47c069d3d222ae06bb469960912be8f12ef2b (patch)
treeb7a5f4bd533ab2779d7e02ef1def44954be288ab
parent0f9dcb1c0107a267f8c01044bf40150cb0fc3de7 (diff)
downloadtcl-cbc47c069d3d222ae06bb469960912be8f12ef2b.zip
tcl-cbc47c069d3d222ae06bb469960912be8f12ef2b.tar.gz
tcl-cbc47c069d3d222ae06bb469960912be8f12ef2b.tar.bz2
Stop segfaults in test suite.
-rw-r--r--generic/tclBasic.c1
-rw-r--r--generic/tclLoad.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 3906c0a..abfc456 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -485,6 +485,7 @@ Tcl_CreateInterp(void)
iPtr = ckalloc(sizeof(Interp));
interp = (Tcl_Interp *) iPtr;
+ iPtr->legacyResult = NULL;
iPtr->errorLine = 0;
iPtr->objResultPtr = Tcl_NewObj();
Tcl_IncrRefCount(iPtr->objResultPtr);
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index d4c67d7..ec1c617 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -472,11 +472,12 @@ Tcl_LoadObjCmd(
Interp *iPtr = (Interp *) target;
if (iPtr->legacyResult != NULL) {
/*
- * A call to Tcl_InitStubs() determined the caller extension and this
- * interp are incompatible in their stubs mechanisms, and recorded the
- * error in the oldest legacy place we have to do so.
+ * A call to Tcl_InitStubs() determined the caller extension and
+ * this interp are incompatible in their stubs mechanisms, and
+ * recorded the error in the oldest legacy place we have to do so.
*/
Tcl_SetObjResult(interp, Tcl_NewStringObj(iPtr->legacyResult, -1));
+ iPtr->legacyResult = NULL;
} else {
Tcl_TransferResult(target, code, interp);
}