Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Loading same library in different thread causes SEGV

Closed / Invalid1303868fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2005-09-25 10:41:22
Platform: Linux 
Tcl Version: 8.4.11
Thread Version: 2.6.2

While loading libraries say expect library in a thread
causes segmentation fault

set initcmd "load
$env(NATS)/install/expect-5.43/libexpect5.43.so\n"
expect1.16>  set tid [thread::create [append initcmd \n
thread::wait]]
tid0xf58f5bb0
expect1.17>   set tid [thread::create [append initcmd
\n thread::wait]]
tid0xf62f6bb0
expect1.18> Segmentation fault

Workaround:

copying the libexpect in some other name and using it
in the second thread doesn't cause this problem
hobbsplain2005-09-26 04:18:18
Logged In: YES 
user_id=72656

Expect is known to not be thread-safe.  Don't use it in any
more than 1 thread at this time.
Log in (anonymous is fine) to add a comment.