Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 3 Sep 2015 15:44:57 +0300
From: Eugene <e.yudin@...systems.com>
To: musl@...ts.openwall.com
Subject: Using PTHREAD_MUTEX_RECURSIVE and PTHREAD_MUTEX_ERRORCHECK leads to
 segmentation fault

Hello,

I have problem with mutexes of type PTHREAD_MUTEX_RECURSIVE and 
PTHREAD_MUTEX_ERRORCHECK.
Using this mutexes sometimes leads to segmentation fault in functions 
__pthread_mutex_trylock_owner() and __pthread_mutex_unlock().
Problem is floating and very bad reproducible with library PJSIP.

Broken places are following.

__pthread_mutex_unlock():
  24                 if (next != &self->robust_list.head) *(volatile 
void *volatile *)
  25                         ((char *)next - sizeof(void *)) = prev;


__pthread_mutex_trylock_owner():
  37         if (next != &self->robust_list.head) *(volatile void 
*volatile *)
  38                 ((char *)next - sizeof(void *)) = &m->_m_next;

GCC: 4.9.2
Version: 1.1.10
Architeture: MIPS (little endian)

Best regards,
Eugene

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.