[libcxx-commits] [libcxx] [libc++][test][msan] Fix bots after #67799 (PR #73152)

Vitaly Buka via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 22 14:33:29 PST 2023


vitalybuka wrote:

I attached debugger and it infinitely spinning 
```
while (!__self.compare_exchange_weak(__old, __new, __m, memory_order_relaxed)) {
#  ifdef _LIBCPP_COMPILER_CLANG_BASED
            if constexpr (__is_fp80_long_double()) {
              // https://github.com/llvm/llvm-project/issues/47978
              // clang bug: __old is not updated on failure for atomic<long double>::compare_exchange_weak
              // Note __old = __self.load(memory_order_relaxed) will not work
              std::__cxx_atomic_load_inplace(std::addressof(__self.__a_), &__old, memory_order_relaxed);
            }
#  endif
            __new = __operation(__old, __operand);
          }
          return __old;
```

https://github.com/llvm/llvm-project/pull/73152


More information about the libcxx-commits mailing list