summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2021-06-09 20:59:12 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-06-09 20:59:12 +0000
commit09ecd9b304254bc77354f7076b43dd22c8267180 (patch)
treece989be8ba496780a34e87965f9cb1c2be6fd8e4
parent19a20b22605fd40577e2c9e04c8c666d7865146c (diff)
parent29d50b4282534f333d6e86bbd29e758cb8bc5bd1 (diff)
downloadlibcxxabi-09ecd9b304254bc77354f7076b43dd22c8267180.tar.gz
[libcxxabi] __cxa_guard_require: test guard byte with != 0 instead of == 1 am: 6f1796448f am: bda6af8573 am: 29d50b4282
Original change: https://android-review.googlesource.com/c/platform/external/libcxxabi/+/1727437 Change-Id: Ic9caa4873a69d6482a559f05a294fe2e9cac2369
-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();
}