Tcl Source Code

View Ticket
Login
Ticket UUID: 1303868
Title: Loading same library in different thread causes SEGV
Type: Bug Created on: 2005-09-25 10:41:22
Submitter: rbalakri Assigned to: andreas_kupries
Subsystem: 49. Threading Severity:
Priority: 5 Medium Last modified: 2005-09-26 04:18:18
Status: Closed Closed by: hobbs
Resolution: Invalid Closed on: 2005-09-25 21:18:18
Version: obsolete: 8.4.11
Description:
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
User Comments:
hobbs added on 2005-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.