[Pkg-tcltk-devel] Bug#818697: libtcl8.6: Segv in Tcl_FinalizeNotifier()

OGAWA Hirofumi hirofumi at mail.parknet.co.jp
Sat Mar 19 20:06:12 UTC 2016


Package: libtcl8.6
Version: 8.6.5+dfsg-2
Severity: normal

When closing wish, process die at 

	pthread_cond_wait(&notifierCV, &notifierMutex);

if cpu is supporting HLE/RTM. (xend instruction doesn't allow to use without
xbegin)

Tcl_FinalizeNotifier() is using following combination

	pthread_mutex_lock(&notifierInitMutex);
	pthread_cond_wait(&notifierCV, &notifierMutex);
	pthread_mutex_unlock(&notifierInitMutex);

>From history, this is clearly conversion mistake. notifierInitMutex should be
notifierMutex (no Init).

---

 unix/tclUnixNotfy.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN unix/tclUnixNotfy.c~fix-mutex-typo unix/tclUnixNotfy.c
--- tcl8.6-8.6.5+dfsg/unix/tclUnixNotfy.c~fix-mutex-typo	2016-03-19 01:25:29.900145502 +0900
+++ tcl8.6-8.6.5+dfsg-hirofumi/unix/tclUnixNotfy.c	2016-03-19 01:24:20.795871648 +0900
@@ -417,7 +417,7 @@ Tcl_FinalizeNotifier(
 #ifdef TCL_THREADS
 	ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
 
-	pthread_mutex_lock(&notifierInitMutex);
+	pthread_mutex_lock(&notifierMutex);
 	notifierCount--;
 
 	/*
@@ -460,7 +460,7 @@ Tcl_FinalizeNotifier(
 #endif /* __CYGWIN__ */
 	tsdPtr->waitCVinitialized = 0;
 
-	pthread_mutex_unlock(&notifierInitMutex);
+	pthread_mutex_unlock(&notifierMutex);
 #endif /* TCL_THREADS */
     }
 }
_

-- System Information:
Debian Release: stretch/sid
  APT prefers testing-proposed-updates
  APT policy: (500, 'testing-proposed-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.5 (SMP w/8 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages libtcl8.6 depends on:
ii  libc6   2.22-3
ii  tzdata  2016a-1
ii  zlib1g  1:1.2.8.dfsg-2+b1

libtcl8.6 recommends no packages.

Versions of packages libtcl8.6 suggests:
ii  tcl8.6  8.6.5+dfsg-1

-- no debconf information

-- 
OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>



More information about the Pkg-tcltk-devel mailing list