This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Don't do lock elision on an error checking mutex (bug 17514)


On 2016-01-14 12:49, Andreas Schwab wrote:
> Error checking mutexes are not supposed to be subject to lock elision.
> That would defeat the error checking nature of the mutex because lock
> elision doesn't record ownership.
> 
> 	[BZ #17514]
> 	* nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock)
> 	<case PTHREAD_MUTEX_ERRORCHECK_NP>: Don't do lock elision.
> 	* nptl/Makefile (tests): Add tst-mutex-errorcheck.
> 	* nptl/tst-mutex-errorcheck.c: New file.
> ---
>  nptl/Makefile                  |  2 +-
>  nptl/pthread_mutex_timedlock.c |  3 ++-
>  nptl/tst-mutex-errorcheck.c    | 58 ++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 61 insertions(+), 2 deletions(-)
>  create mode 100644 nptl/tst-mutex-errorcheck.c

Thanks for the patch. I confirm it fixes the error reported in bugs
nptl/17514 and nptl/19515.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]