[compiler-rt] Add SANITIZER_CDECL to __tsan_check_no_mutexes_held (PR #71471)

Charlie Barto via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 6 17:12:10 PST 2023


https://github.com/barcharcraz created https://github.com/llvm/llvm-project/pull/71471

in https://github.com/llvm/llvm-project/pull/69625 @strega-nil added cdecl to a huge number of sanitizer interface declarations. It looks like she was racing against @kennyyu adding a tsan interface function. I noticed this when merging in the latest changes from llvm/main and corrected it.

>From c29f4788731d5990ba16cdf74289972aa47dad93 Mon Sep 17 00:00:00 2001
From: Charlie Barto <Charles.Barto at microsoft.com>
Date: Mon, 6 Nov 2023 17:07:52 -0800
Subject: [PATCH] Add SANITIZER_CDECL to __tsan_check_no_mutexes_held

---
 compiler-rt/include/sanitizer/tsan_interface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/include/sanitizer/tsan_interface.h b/compiler-rt/include/sanitizer/tsan_interface.h
index 01c08fe41e4da95..e11a4175cd8ed9f 100644
--- a/compiler-rt/include/sanitizer/tsan_interface.h
+++ b/compiler-rt/include/sanitizer/tsan_interface.h
@@ -129,7 +129,7 @@ void SANITIZER_CDECL __tsan_mutex_post_divert(void *addr, unsigned flags);
 
 // Check that the current thread does not hold any mutexes,
 // report a bug report otherwise.
-void __tsan_check_no_mutexes_held();
+void SANITIZER_CDECL __tsan_check_no_mutexes_held();
 
 // External race detection API.
 // Can be used by non-instrumented libraries to detect when their objects are



More information about the llvm-commits mailing list