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] Fix race in pthread_mutex_lock while promoting to PTHREAD_MUTEX_ELISION_NP [BZ #23275]


I've also retested tst-mutex10 without the remaining patch on multiple s390x machines. I've found out, that it depends on the used gcc (at least on s390x). On one machine, gcc 6 was used. With gcc 7 / 8, the type of the mutex was loaded from memory multiple times. With gcc 6, it is loaded only one time and thus all threads are promoting the mutex to PTHREAD_MUTEX_ELISION_NP. Then you don't see a fail.

On x86_64, I've used gcc 8. Perhaps I can try other gcc versions.
I've tried gcc 6, 7, 8 on x86_64:
-gcc 6: the mutex-type is only loaded one time from memory => no fails
-gcc 7/8: the mutex-type is loaded two times from memory => fails


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