commit | 5493ddcaa2ebe5dacc849c2d9f73e906796e297b | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Thu Apr 04 19:47:52 2019 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Thu Apr 04 19:47:52 2019 +0000 |
tree | 84f6f846b3adba4bd9121af03824d9f1e9baa96f | |
parent | 02accd0ff4396f6fd6e74b662032e0e8fabf0d6c [diff] | |
parent | 8c1a14d4f358a8135e0c0632da6d40c37192c0c2 [diff] |
Merge "Workaround potential access to unmapped stack"
diff --git a/libc/private/bionic_lock.h b/libc/private/bionic_lock.h index 410e637..ec179d1 100644 --- a/libc/private/bionic_lock.h +++ b/libc/private/bionic_lock.h
@@ -70,8 +70,9 @@ } void unlock() { + bool shared = process_shared; /* cache to local variable */ if (atomic_exchange_explicit(&state, Unlocked, memory_order_release) == LockedWithWaiter) { - __futex_wake_ex(&state, process_shared, 1); + __futex_wake_ex(&state, shared, 1); } } };