summaryrefslogtreecommitdiffstats
path: root/generic/tclResult.c
diff options
context:
space:
mode:
authorandreas_kupries <andreas_kupries@noemail.net>2008-03-07 22:42:48 (GMT)
committerandreas_kupries <andreas_kupries@noemail.net>2008-03-07 22:42:48 (GMT)
commit33bd56bc6910c3af369d0b9cf106c114c12532cf (patch)
treefcfc35f56a9cec72b96133d5e90043cd507c4f85 /generic/tclResult.c
parent414056ae37aa2d1bfd2b12ffcdd5357b824c20f9 (diff)
downloadtcl-33bd56bc6910c3af369d0b9cf106c114c12532cf.zip
tcl-33bd56bc6910c3af369d0b9cf106c114c12532cf.tar.gz
tcl-33bd56bc6910c3af369d0b9cf106c114c12532cf.tar.bz2
* generic/tclResult.c (ReleaseKeys): Workaround for [Bug
1904907]. Reset the return option keys to NULL to allow full re-initialization by GetKeys(). This introduces a memory leak for the key objects, but gets us around a crash in the finalization of reflected channels when handling returns, either at compile- or runtime. In both cases we access the keys after they have been released by their thread exit handler. A proper fix is entangled with the untangling of the finalization ordering and attendant issues. For now we choose the lesser evil. FossilOrigin-Name: e3e2980503dfd0f1a9a9a195d12028bda8429444
Diffstat (limited to 'generic/tclResult.c')
-rw-r--r--generic/tclResult.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c
index f9ef5b6..054ba9d 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclResult.c,v 1.46 2008/02/29 21:02:20 dgp Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.47 2008/03/07 22:42:49 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -1161,6 +1161,7 @@ ReleaseKeys(
for (i = KEY_CODE; i < KEY_LAST; i++) {
Tcl_DecrRefCount(keys[i]);
+ keys[i] = NULL;
}
}