[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Weechat-dev] [bug #41576] weechat hangs/crashes if libpthread.so.0 is l
From: |
Johannes Nixdorf |
Subject: |
[Weechat-dev] [bug #41576] weechat hangs/crashes if libpthread.so.0 is loaded after startup and GnuTLS is used |
Date: |
Thu, 13 Feb 2014 10:56:48 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 |
URL:
<http://savannah.nongnu.org/bugs/?41576>
Summary: weechat hangs/crashes if libpthread.so.0 is loaded
after startup and GnuTLS is used
Project: WeeChat
Submitted by: mixi
Submitted on: Thu 13 Feb 2014 10:56:47 AM GMT
Category: other
Severity: 3 - Normal
Item Group: other
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 0.4.3
IRC nick: mixi
_______________________________________________________
Details:
GnuTLS sets up mutexes with pthread_mutex_init before libpthread.so.0 is
loaded. This works because glibc provides stubbed pthread functions, which are
used when libpthread.so.0 is not loaded. Because some weechat plugins link to
libpthread.so.0, it is loaded after the mutex is thought to be initialized
with pthread_mutex_init (which is actually a stub, because the libpthread.so.0
wasn't loaded) and later calls to e.g. pthread_mutex_lock/pthread_mutex_unlock
use code from libpthread.so.0, which assumes the mutex was properly
initialized. This causes weechat to crash in some cases and hang in
pthread_mutex_lock in other cases (as shown in the attached file).
This is not a problem when compiling weechat with autotools, because it links
the weechat binary with libpthread.so.0. With cmake this only happens on
openbsd.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 13 Feb 2014 10:56:47 AM GMT Name: weechat_bt_hang.txt Size: 3kB
By: mixi
<http://savannah.nongnu.org/bugs/download.php?file_id=30533>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?41576>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Weechat-dev] [bug #41576] weechat hangs/crashes if libpthread.so.0 is loaded after startup and GnuTLS is used,
Johannes Nixdorf <=