summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-13 12:42:38 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-13 12:42:38 (GMT)
commit3c1b7f78dc3d31142226b8c29cce38d5d3a86f03 (patch)
tree52d0ca4489845303b074fc697d13f83df4e2d29d /generic
parentc903f10ac62ec93774a9785e5a29e06259882e1a (diff)
downloadtcl-3c1b7f78dc3d31142226b8c29cce38d5d3a86f03.zip
tcl-3c1b7f78dc3d31142226b8c29cce38d5d3a86f03.tar.gz
tcl-3c1b7f78dc3d31142226b8c29cce38d5d3a86f03.tar.bz2
Backout uncomplete fix for [3422267ed6b79922]: segmentation fault from deleting the the target of an imported alias during a trace on the target of the alias.
Since it causes build failures.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclNamesp.c7
-rw-r--r--generic/tclProc.c7
2 files changed, 1 insertions, 13 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index fea23aa..26dca62 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -959,7 +959,7 @@ Tcl_DeleteNamespace(
/*
* If the namespace has associated ensemble commands, delete them first.
* This leaves the actual contents of the namespace alone (unless they are
- * linked ensemble commands, of course). This code is
+ * linked ensemble commands, of course). Note that this code is actually
* reentrant so command delete traces won't purturb things badly.
*/
@@ -1770,9 +1770,7 @@ DoImport(
TclInvokeImportedCmd, InvokeImportedNRCmd, dataPtr,
DeleteImportedCmd);
dataPtr->realCmdPtr = cmdPtr;
- cmdPtr->refCount++;
dataPtr->selfPtr = (Command *) importedCmd;
- dataPtr->selfPtr->refCount++;
dataPtr->selfPtr->compileProc = cmdPtr->compileProc;
Tcl_DStringFree(&ds);
@@ -1783,7 +1781,6 @@ DoImport(
refPtr = (ImportRef *)ckalloc(sizeof(ImportRef));
refPtr->importedCmdPtr = (Command *) importedCmd;
- refPtr->importedCmdPtr->refCount++;
refPtr->nextPtr = cmdPtr->importRefPtr;
cmdPtr->importRefPtr = refPtr;
} else {
@@ -2079,9 +2076,7 @@ DeleteImportedCmd(
} else {
prevPtr->nextPtr = refPtr->nextPtr;
}
- TclCleanupCommandMacro(refPtr->importedCmdPtr);
ckfree(refPtr);
- TclCleanupCommandMacro(selfPtr)
ckfree(dataPtr);
return;
}
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 150d036..0d67c37 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -215,7 +215,6 @@ Tcl_ProcObjCmd(
*/
procPtr->cmdPtr = (Command *) cmd;
- procPtr->cmdPtr->refCount++;
/*
* TIP #280: Remember the line the procedure body is starting on. In a
@@ -2155,12 +2154,6 @@ TclProcCleanupProc(
ckfree(localPtr);
localPtr = nextPtr;
}
- /*
- * TclOOMethod.c:clOOMakeProcMethod sets cmdPtr to NULL
- */
- if (procPtr->cmdPtr) {
- TclCleanupCommandMacro(procPtr->cmdPtr);
- }
ckfree(procPtr);
/*