Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-18
21:36 • Ticket [218200ffff] Tcl_DuplicateObj needs thread safety status still Closed... artifact: ede01375eb user: dgp
2000-10-26
08:16 • Closed ticket [218200ffff]. artifact: 03153842a5 user: welch
00:54 • New ticket [218200ffff]. artifact: 7b98daa2c2 user: nobody

Tcl_DuplicateObj needs thread safety

Closed / Fixed218200ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:54:25
OriginalBugID: 2433 Bug
Version: 8.2b1
SubmitDate: '1999-07-22'
LastModified: '1999-07-30'
Severity: MED
Status: Closed
Submitter: techsupp
ChangedBy: redman
OS: Windows NT
OSVersion: 4.0 sp5
Machine: X86
FixedDate: '2000-10-25'
FixedInVersion: NA
ClosedDate: '1999-07-30'


Name:
David Gravereaux

CVS:
RCS: @(#) $Id: tclObj.c,v 1.9 1999/06/15 01:16:23 hershey Exp $

ReproducibleScript:
N/A  I can only explain it.

ObservedBehavior:
In a multithreaded extension I am working on, I have to create Tcl_Obj
    copies from outside the thread context of Tcl.  In rare instances, there
    is a possibility that the refcount will be greater than 1 (Tcl_IsShared
    returns true) and I appropriately Tcl_DuplicateObj.
    
    Although I have realized that the copies are only used in a "read-only"
    fashion and I don't need to Tcl_DuplicateObj, it did frighten me to see
    that Tcl_DuplicateObj isn't thread-safe.
    
    As the Object allocator is a global entity, I do feel that access to it
    deserves a mutexlock.



The function is already threadsafe.  David agrees. 
-- 07/30/1999 redman
welch Closed ticket [218200ffff]. [History diff]2000-10-26 08:16:56
dgp Ticket [218200ffff]: 3 changes [History diff]2001-04-18 21:36:23
Log in (anonymous is fine) to add a comment.