Tcl Source Code

View Ticket
Login
Ticket UUID: 1204064
Title: Tcl 8.4 release compile error
Type: Bug Created on: 2005-05-18 04:56:59
Submitter: mistachkin Assigned to: vasiljevic
Subsystem: 49. Threading Severity:
Priority: 7 High Last modified: 2005-05-30 15:01:43
Status: Closed Closed by: hobbs
Resolution: Fixed Closed on: 2005-05-30 03:38:31
Version: obsolete: 8.4.9
Description:
When compiling in release mode using the threaded
memory allocator, the following code causes a problem:

in tclWinThrd.c, function TclpFinalizeThreadData, near
line #705:

#if defined(USE_THREAD_ALLOC) && !defined(TCL_MEM_DEBUG)
        if (indexPtr == &key) {
            TclpFreeAllocCache(result);
            return;
        }
#endif

There is no variable named "key".  I'm not sure what
the precise intent here is.

..\win\tclWinThrd.c(688) : error C2065: 'key' :
undeclared identifier
..\win\tclWinThrd.c(1046) : warning C4142: benign
redefinition of type
User Comments:
mistachkin added on 2005-05-18 11:59:13:
Logged In: YES 
user_id=113501


Perhaps the author wanted to do this?

#if defined(USE_THREAD_ALLOC) && !defined(TCL_MEM_DEBUG)
        if (indexPtr == &dataKey) {
            TclpFreeAllocCache(result);
            return;
        }
#endif

mistachkin added on 2005-05-18 12:00:41:
Logged In: YES 
user_id=113501


Issue introduced:

version 1.24.2.10, Thu Apr 7 11:29:33 2005 UTC

hobbs added on 2005-05-30 08:36:18:
Logged In: YES 
user_id=72656

Fixed in head - the decl was lower in the file.  Renamed to
tlsKey to be more descriptive.  Go ahead and test (passes
test suite).

mistachkin added on 2005-05-30 09:37:23:
Logged In: YES 
user_id=113501

Fix confirmed in HEAD.  However, this same error still
exists in core-8-4-branch.

hobbs added on 2005-05-30 10:15:13:
Logged In: YES 
user_id=72656

I expect you mean the opposite, since I only fixed
core-8-4-branch ...

mistachkin added on 2005-05-30 10:26:52:
Logged In: YES 
user_id=113501


Your previous message said you fixed it in HEAD?  

I'm really confused now, I see the declaration way above the
usage in HEAD.  Therefore, it must be fixed in HEAD;
however, it is not named "tlsKey".  

In core-8-4-branch, the declaration for 1.24.2.9 2004/10/28
21:12:38 is on line 1068, far beyond the usage.

hobbs added on 2005-05-30 10:38:31:
Logged In: YES 
user_id=72656

You must be accessing anoncvs, which is delayed.

vasiljevic added on 2005-05-30 15:01:43:
Logged In: YES 
user_id=95086

I have fixed the HEAD (8.5) now; please try it. 
Jeff has fixed the core-8-4-branch.
Sorry for this, but I do not have Win platform 
to test, therefore this one creeped in.