Skip to content

Commit 14987c5

Browse files
committed
[libcxxabi] __cxa_guard_require: test guard byte with != 0 instead of == 1
llvm-svn: 369109 Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project Cr-Mirrored-Commit: 6897f99314452a04be2e08058ef2f7a93053539f
1 parent 1057c5a commit 14987c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cxa_guard_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ struct GuardObject {
175175
/// Implements __cxa_guard_acquire
176176
AcquireResult cxa_guard_acquire() {
177177
AtomicInt<uint8_t> guard_byte(guard_byte_address);
178-
if (guard_byte.load(std::_AO_Acquire) == COMPLETE_BIT)
178+
if (guard_byte.load(std::_AO_Acquire) != UNSET)
179179
return INIT_IS_DONE;
180180
return derived()->acquire_init_byte();
181181
}

0 commit comments

Comments
 (0)