diff options
author | Fangrui Song <maskray@google.com> | 2021-06-09 21:17:58 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-06-09 21:17:58 +0000 |
commit | aeca23a1d2dcfd7034ad7a1708c245e90c2d09ee (patch) | |
tree | ce989be8ba496780a34e87965f9cb1c2be6fd8e4 | |
parent | cc54d97adbd93e314e730a9f6e279a66d2dfb0c9 (diff) | |
parent | 09ecd9b304254bc77354f7076b43dd22c8267180 (diff) | |
download | libcxxabi-aeca23a1d2dcfd7034ad7a1708c245e90c2d09ee.tar.gz |
[libcxxabi] __cxa_guard_require: test guard byte with != 0 instead of == 1 am: 6f1796448f am: bda6af8573 am: 29d50b4282 am: 09ecd9b304
Original change: https://android-review.googlesource.com/c/platform/external/libcxxabi/+/1727437
Change-Id: I1ca26b86f96cc56f1fcb95a6aa8ae4210f618914
-rw-r--r-- | src/cxa_guard_impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cxa_guard_impl.h b/src/cxa_guard_impl.h index 412099e..58c5dc5 100644 --- a/src/cxa_guard_impl.h +++ b/src/cxa_guard_impl.h @@ -170,7 +170,7 @@ public: /// Implements __cxa_guard_acquire AcquireResult cxa_guard_acquire() { AtomicInt<uint8_t> guard_byte(guard_byte_address); - if (guard_byte.load(std::_AO_Acquire) == COMPLETE_BIT) + if (guard_byte.load(std::_AO_Acquire) != UNSET) return INIT_IS_DONE; return derived()->acquire_init_byte(); } |