mirror of https://gitee.com/Nocallback/glibc.git
Browse Source
65810f0ef0 fixed a robust mutex bug but
introduced BZ 21778: if the CAS used to try to acquire a lock fails, the
expected value is not updated, which breaks other cases in the loce
acquisition loop. The fix is to simply update the expected value with
the value returned by the CAS, which ensures that behavior is as if the
first case with the CAS never happened (if the CAS fails).
This is a regression introduced in the last release.
Tested on x86_64, i686, ppc64, ppc64le, s390x, aarch64, armv7hl.
hjl/pr21815/master
6 changed files with 73 additions and 22 deletions
@ -0,0 +1,7 @@ |
|||
/* Bug 21778: Fix oversight in robust mutex lock acquisition. */ |
|||
#define TYPE PTHREAD_MUTEX_NORMAL |
|||
#define ROBUST PTHREAD_MUTEX_ROBUST |
|||
#define DELAY_NSEC 0 |
|||
#define ROUNDS 1000 |
|||
#define N 32 |
|||
#include "tst-mutex7.c" |
|||
Loading…
Reference in new issue