Skip to content
Tcl Source Code View Ticket
Login

View Ticket

mt-safety issue in filesystem record list

Closed / Remind753315ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 23 years ago
Descriptionplain2003-06-12 14:30:19
There is a new MT-safety bug appearing in the 
tclIOUtil.c code. The problem is the shared list of
filesystem records. Pointers from this list are being
referenced in each path internal rep in every
Tcl path object. Now, when objects are getting
destroyed, they decrement refcount of the *shared*
record. This happens w/o mutex protection, leading to
memory corruptions. Especially on MP machines, this
comes out pretty soon, i.e. the process cores.
vasiljevicplain2003-06-22 22:35:39
Logged In: YES 
user_id=95086

Here is the patch which corrects the problem.
vasiljevicplain2003-06-22 22:35:40
File Added - 53808: tclIOUtil.c.patch
vincentdarleyplain2003-06-23 14:46:19
Logged In: YES 
user_id=32170

The patch looks good to me; please do apply against both 
cvs head and 8.4 branch (looks like minor changes will be 
needed for cvs head, because of the splitting into multiple 
files of the fs code).

Thanks!
vasiljevicplain2003-06-23 16:09:09
Logged In: YES 
user_id=95086

Good. I will do that. I will, however, first wait for people at AOL 
to double-check this in their MP test environment just  to be 
100% sure.
hobbsplain2003-07-19 03:29:27
Logged In: YES 
user_id=72656

Commited for 8.4.4, but not 8.5 (requires some translation to 
patch tclPathObj.c as well).  Zoran - please update for 8.5 
and commit there.  Also, any chance of core tests to exercise 
this?
vasiljevicplain2003-08-23 18:51:18
Logged In: YES 
user_id=95086

I have merged the changes into tclIOUtil.c, tclPathObj.c and
tclFileSystem.h in current CVS.
I'm closing this now.
Log in (anonymous is fine) to add a comment.

Attachments: