Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Thread-unsafe handling of cwdPathPtr

Closed710649ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2003-03-27 10:52:39
The new pluggable filesystem code located in
generic/tclIOUtils.c naively plays with global
Tcl_Obj*, passing them between threads
per-reference and neglecting the proper locks
for all except write operations. 
The spot in question is the global Tcl_Obj *cwdPathPtr.

The net-effect is that paths passed to the OS-calls 
gets garbled, memory is being trashed leading to
process exitus and whole bunch of other ugly things
is happening.

I think this has to be entirely revised, as one can not
simply share Tcl_Objs between threads. One has to 
always make a deep-copy (w/o internal references) 
of the object before passing it to some other thread.

I have some ideas on how to solve this, but it is 
really not that straight-forward, since few of design
issues have to be modified.

This bug is really a show-stopper for MT-apps
therefore the highest priority.
vasiljevicplain2003-03-28 23:24:15
Logged In: YES 
user_id=95086

Duplicate bug entry thanks to page-refresh.
Phew!
Closing this one.
Log in (anonymous is fine) to add a comment.