summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2021-06-09 21:17:58 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-06-09 21:17:58 +0000
commitaeca23a1d2dcfd7034ad7a1708c245e90c2d09ee (patch)
treece989be8ba496780a34e87965f9cb1c2be6fd8e4
parentcc54d97adbd93e314e730a9f6e279a66d2dfb0c9 (diff)
parent09ecd9b304254bc77354f7076b43dd22c8267180 (diff)
downloadlibcxxabi-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.h2
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();
}