[compiler-rt] [scudo] Add thread-safety annotation on getMemoryGroupFragmentationIn… (PR #108277)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 12:09:29 PDT 2024


https://github.com/ChiaHungDuan created https://github.com/llvm/llvm-project/pull/108277

…foInRegion

>From 7481c67a22fb3882294bf8026fe5d0e60d67f260 Mon Sep 17 00:00:00 2001
From: Chia-hung Duan <chiahungduan at google.com>
Date: Wed, 11 Sep 2024 19:07:00 +0000
Subject: [PATCH] [scudo] Add thread-safety annotation on
 getMemoryGroupFragmentationInfoInRegion

---
 compiler-rt/lib/scudo/standalone/primary64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/lib/scudo/standalone/primary64.h b/compiler-rt/lib/scudo/standalone/primary64.h
index 045070d0e34de9..a3b6e309ed3fce 100644
--- a/compiler-rt/lib/scudo/standalone/primary64.h
+++ b/compiler-rt/lib/scudo/standalone/primary64.h
@@ -1207,7 +1207,7 @@ template <typename Config> class SizeClassAllocator64 {
 
   void getMemoryGroupFragmentationInfoInRegion(RegionInfo *Region, uptr ClassId,
                                                ScopedString *Str)
-      REQUIRES(Region->MMLock) {
+      REQUIRES(Region->MMLock) EXCLUDES(Region->FLLock) {
     const uptr BlockSize = getSizeByClassId(ClassId);
     const uptr AllocatedUserEnd =
         Region->MemMapInfo.AllocatedUser + Region->RegionBeg;



More information about the llvm-commits mailing list