[compiler-rt] [RTSan][Darwin] Adjust OSSpinLock/_os_nospin_lock interceptor and tests (PR #132867)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 02:17:21 PDT 2025
================
@@ -1113,6 +1113,14 @@ TEST(TestRtsanInterceptors, PthreadJoinDiesWhenRealtime) {
#pragma clang diagnostic push
// OSSpinLockLock is deprecated, but still in use in libc++
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#undef OSSpinLockLock
+extern "C" {
+typedef int32_t OSSpinLock;
+void OSSpinLockLock(volatile OSSpinLock *__lock);
+typedef volatile OSSpinLock *_os_nospin_lock_t;
----------------
davidtrevelyan wrote:
All good - that makes sense - thanks for the info. Would you mind adding this context as a comment into the code at the points where the `typedef` is made (here and in `rtsan_interceptors_posix.cpp`)? I'd be happy to add the context comments myself, but I would want to get your approval on the wording before merging. Let me know - then I think this PR should be good to go in 👍
https://github.com/llvm/llvm-project/pull/132867
More information about the llvm-commits
mailing list