[compiler-rt] [TSAN] Add __tsan_check_no_mutexes_held helper (PR #69372)
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 22:42:00 PDT 2023
================
@@ -93,7 +93,9 @@ static const char *ReportTypeString(ReportType typ, uptr tag) {
return "signal handler spoils errno";
case ReportTypeDeadlock:
return "lock-order-inversion (potential deadlock)";
- // No default case so compiler warns us if we miss one
+ case ReportTypeMutexCannotBeLocked:
+ return "mutex cannot be locked on this code path";
----------------
dvyukov wrote:
The word "locked" makes me think that the report is produces when a mutex is locked. We are not locking a mutex here, but rather "holding" it. The word "held" used in the interface function name looks like a better fit here. Perhaps something like "mutex held in the wrong context"?
https://github.com/llvm/llvm-project/pull/69372
More information about the llvm-commits
mailing list