[compiler-rt] [TSan] Add lock_during_write flag on Apple platforms to avoid deadlock (PR #157928)

Dan Blackwell via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 11 11:12:50 PDT 2025


================
@@ -167,8 +167,19 @@ uptr internal_read(fd_t fd, void *buf, uptr count) {
   return read(fd, buf, count);
 }
 
+}  // namespace __sanitizer
+
+// Weak symbol no-op when TSan is not linked
+SANITIZER_WEAK_ATTRIBUTE void __tsan_set_in_internal_write_call(bool value) {}
----------------
DanBlackwell wrote:

TODO: Just move this definition up to the top of the file rather than exit and re-enter the namespace.

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


More information about the llvm-commits mailing list