Date: Fri, 4 Sep 2015 15:11:23 +0300 From: Eugene <e.yudin@...systems.com> To: musl@...ts.openwall.com Subject: Re: Using PTHREAD_MUTEX_RECURSIVE and PTHREAD_MUTEX_ERRORCHECK leads to segmentation fault Unfortunately I can reproduce it only with real configuration. I has tried to write small program to reproduce problem but without luck. I can add some debug or asserts if it helps. On 03.09.2015 17:15, Rich Felker wrote: > On Thu, Sep 03, 2015 at 03:44:57PM +0300, Eugene wrote: >> 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. > Do you have a way to reproduce it without an actual SIP > configuration/deployment? > >> 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; > This is almost surely a bug in the caller but I'd like to look into > it. My guess is that they're destroying or freeing mutexes that are > locked. > > Rich
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.