[PATCH] D47229: Make atomic non-member functions as nonnull

Jake Ehrlich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 25 09:56:13 PDT 2018


jakehehrlich added a comment.

This is causing breaks in fuchsia,

Code that looks like this

  uintptr_t last_unlogged =
       atomic_load_explicit(&unlogged_tail, memory_order_acquire);
   do { 
       if (last_unlogged == 0)
           return;
   } while (!atomic_compare_exchange_weak_explicit(&unlogged_tail,
                                                   &last_unlogged, 0,
                                                   memory_order_acq_rel,
                                                   memory_order_relaxed));

Where unlogged_tail is somewhere on the stack. And 'atomic_compare_exchange_weak_explicit' is an #define alias for '__c11_atomic_compare_exchange_weak'

Full context here: https://fuchsia.googlesource.com/zircon/+/master/third_party/ulib/musl/ldso/dynlink.c#822


Repository:
  rL LLVM

https://reviews.llvm.org/D47229





More information about the cfe-commits mailing list