Hi !

After some days... (yes, it is *always* very costly and difficult)
I've pinpointed a large hole in Tcl8.4.(1|2) which effectively
generates bogus OS paths, corrupts memory and otherwise impairs
the AOLserver (or any other MT-enabled application).

The problem is in Tcl generic/tclIOUtil.c and naive handling
of static Tcl_Obj *cwdPathPtr.  The pointer to this Tcl object
gets shuffled arround threads by simple reference, it is
read (referenced) without proper locks, etc.
The implementor obviously protected the most obvious write
operations, but neglected any others. Also, the Rule#1 in
Tcl "Do not pass Tcl_Obj's between threads" is grossly violated.

I must see how we can solve this. I'm afraid that we'd need
to rewrite some parts of the above file and bump to Tcl8.4.3
or such.

How come nobody has noticed this so far?
Well, the problem starts displaying itself if you ever change
the current directory of the process *after* the Tcl has been
initialized. You need not do [cd] explicitly; some internal
Tcl code does that on your behalf as well.

As for AOLserver 4.0; we do need at least Tcl8.4 or higher.
So, I'm afraid we will not be able to go to production
before fixing this ugly thing.


Cheers,
Zoran


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/

Reply via email to