[compiler-rt] a33acdb - [compiler-rt] Enable GWP-ASan for Hexagon (#188410)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 07:26:21 PDT 2026


Author: Brian Cain
Date: 2026-03-30T09:26:16-05:00
New Revision: a33acdb0b2dca00db08630050b10b09a7546235a

URL: https://github.com/llvm/llvm-project/commit/a33acdb0b2dca00db08630050b10b09a7546235a
DIFF: https://github.com/llvm/llvm-project/commit/a33acdb0b2dca00db08630050b10b09a7546235a.diff

LOG: [compiler-rt] Enable GWP-ASan for Hexagon (#188410)

Add Hexagon to ALL_GWP_ASAN_SUPPORTED_ARCH, add struct layout
assertions.

Added: 
    

Modified: 
    compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
    compiler-rt/lib/gwp_asan/common.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
index fbd25ce58c7ef..3aa037726a482 100644
--- a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+++ b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
@@ -76,7 +76,7 @@ else()
   set(ALL_FUZZER_SUPPORTED_ARCH ${X86_64} ${ARM64})
 endif()
 
-set(ALL_GWP_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64})
+set(ALL_GWP_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${HEXAGON})
 if(APPLE)
   set(ALL_LSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64} ${ARM64})
 else()

diff  --git a/compiler-rt/lib/gwp_asan/common.h b/compiler-rt/lib/gwp_asan/common.h
index df451021d3412..5e33c6f4815c0 100644
--- a/compiler-rt/lib/gwp_asan/common.h
+++ b/compiler-rt/lib/gwp_asan/common.h
@@ -187,6 +187,11 @@ static_assert(sizeof(AllocatorState) == 32, "");
 static_assert(offsetof(AllocatorState, FailureAddress) == 28, "");
 static_assert(sizeof(AllocationMetadata) == 560, "");
 static_assert(offsetof(AllocationMetadata, IsDeallocated) == 552, "");
+#elif defined(__hexagon__)
+static_assert(sizeof(AllocatorState) == 32, "");
+static_assert(offsetof(AllocatorState, FailureAddress) == 28, "");
+static_assert(sizeof(AllocationMetadata) == 560, "");
+static_assert(offsetof(AllocationMetadata, IsDeallocated) == 552, "");
 #endif // defined($ARCHITECTURE)
 
 } // namespace gwp_asan


        


More information about the llvm-commits mailing list