[llvm] [tsan] Don't use `enum __tsan_memory_order` in tsan interface (PR #114724)

Felipe de Azevedo Piovezan via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 09:28:44 PST 2024


felipepiovezan wrote:

This is breaking the greendragon bots, could you revert or submit a fix if it's a quick one?

```
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp:103:1: error: no matching function for call to '__tsan_atomic32_fetch_add'
  103 | OSATOMIC_INTERCEPTORS_ARITHMETIC(OSAtomicAdd, fetch_add,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  104 |                                  OSATOMIC_INTERCEPTOR_PLUS_X)
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp:81:37: note: expanded from macro 'OSATOMIC_INTERCEPTORS_ARITHMETIC'
   81 |     m(int32_t, int32_t, a32, f##32, __tsan_atomic32_##tsan_atomic_f,         \
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:6:1: note: expanded from here
    6 | __tsan_atomic32_fetch_add
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp:63:14: note: expanded from macro 'OSATOMIC_INTERCEPTOR_PLUS_X'
   63 |       return tsan_atomic_f((volatile tsan_t *)ptr, x, mo) + x;               \
      |              ^~~~~~~~~~~~~
/Users/ec2-user/jenkins/workspace/llvm.org/as-lldb-cmake/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface.h:278:5: note: candidate function not viable: no known conversion from 'const morder' to 'int' for 3rd argument
  278 | a32 __tsan_atomic32_fetch_add(volatile a32 *a, a32 v, int mo);
      |     ^                                                 ~~~~~~
```
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/14686/console

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


More information about the llvm-commits mailing list