summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Mistachkin <joe@mistachkin.com>2009-10-18 10:39:39 (GMT)
committerJoe Mistachkin <joe@mistachkin.com>2009-10-18 10:39:39 (GMT)
commit87322cc40198a30c474da4769e08103cb41e7576 (patch)
tree91bfe567ae94cb539c60451f504e8bf8b2001985
parentced84e1de5cdbd9a1c6a9e1850ab53968facc2d6 (diff)
downloadtcl-87322cc40198a30c474da4769e08103cb41e7576.zip
tcl-87322cc40198a30c474da4769e08103cb41e7576.tar.gz
tcl-87322cc40198a30c474da4769e08103cb41e7576.tar.bz2
Fix for [Bug 2871908]
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclObj.c12
2 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 1814f7a..f3b82ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2009-10-18 Joe Mistachkin <joe@mistachkin.com>
+ * generic/tclObj.c (TclDbDumpActiveObjects, TclDbInitNewObj)
+ (Tcl_DbIncrRefCount, Tcl_DbDecrRefCount, Tcl_DbIsShared): [Bug 2871908]
+ Enforce separation of concerns between the lineCLPtr and objThreadMap
+ thread specific data members.
+
+2009-10-18 Joe Mistachkin <joe@mistachkin.com>
+
* tests/thread.test (thread-4.[345]): [Bug 1565466]: Correct tests to
save their error state before the final call to threadReap just in case
it triggers an "invalid thread id" error. This error can occur if one
diff --git a/generic/tclObj.c b/generic/tclObj.c
index d0e1115..8869e9b 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclObj.c,v 1.162 2009/10/07 23:09:17 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.163 2009/10/18 10:39:41 mistachkin Exp $
*/
#include "tclInt.h"
@@ -1009,7 +1009,7 @@ TclDbDumpActiveObjects(
Tcl_HashSearch hSearch;
Tcl_HashEntry *hPtr;
Tcl_HashTable *tablePtr;
- ThreadSpecificData *tsdPtr = TclGetContLineTable();
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
tablePtr = tsdPtr->objThreadMap;
@@ -1076,7 +1076,7 @@ TclDbInitNewObj(
Tcl_HashTable *tablePtr;
int isNew;
ObjData *objData;
- ThreadSpecificData *tsdPtr = TclGetContLineTable();
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
if (tsdPtr->objThreadMap == NULL) {
tsdPtr->objThreadMap = (Tcl_HashTable *)
@@ -3644,7 +3644,7 @@ Tcl_DbIncrRefCount(
if (!TclInExit()) {
Tcl_HashTable *tablePtr;
Tcl_HashEntry *hPtr;
- ThreadSpecificData *tsdPtr = TclGetContLineTable();
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
tablePtr = tsdPtr->objThreadMap;
if (!tablePtr) {
@@ -3709,7 +3709,7 @@ Tcl_DbDecrRefCount(
if (!TclInExit()) {
Tcl_HashTable *tablePtr;
Tcl_HashEntry *hPtr;
- ThreadSpecificData *tsdPtr = TclGetContLineTable();
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
tablePtr = tsdPtr->objThreadMap;
if (!tablePtr) {
@@ -3789,7 +3789,7 @@ Tcl_DbIsShared(
if (!TclInExit()) {
Tcl_HashTable *tablePtr;
Tcl_HashEntry *hPtr;
- ThreadSpecificData *tsdPtr = TclGetContLineTable();
+ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
tablePtr = tsdPtr->objThreadMap;
if (!tablePtr) {
Tcl_Panic("object table not initialized");