This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] pthread_mutex_unlock: fix wrong assertion with lock elision (bug#19515)
- From: Aurelien Jarno <aurelien at aurel32 dot net>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Sat, 23 Jan 2016 22:59:38 +0100
- Subject: Re: [PATCH] pthread_mutex_unlock: fix wrong assertion with lock elision (bug#19515)
- Authentication-results: sourceware.org; auth=none
- References: <1453580875-29240-1-git-send-email-aurelien at aurel32 dot net> <877fj0m0wp dot fsf at igel dot home>
On 2016-01-23 22:38, Andreas Schwab wrote:
> Aurelien Jarno <aurelien@aurel32.net> writes:
>
> > [BZ #19515]
> > * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
> > Use PTHREAD_MUTEX_TYPE to get the mutex type.
>
> That doesn't fix the bug. The correct patch is at
> <http://permalink.gmane.org/gmane.comp.lib.glibc.alpha/58565>.
Thanks for the link and sorry for the duplicate bug. While I agree your
patch is correct to fix the issue, I still believe the assert is wrongly
accessing the mutex type directly. It might work, but that is something
fragile that might break if the mutex flags are changed.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net