[llvm] [hwasan] Add hwasan-all-globals option (PR #149621)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 30 12:03:40 PDT 2025


================
@@ -1772,11 +1782,17 @@ void HWAddressSanitizer::instrumentGlobals() {
     if (GV.hasCommonLinkage())
       continue;
 
-    // Globals with custom sections may be used in __start_/__stop_ enumeration,
-    // which would be broken both by adding tags and potentially by the extra
-    // padding/alignment that we insert.
-    if (GV.hasSection())
-      continue;
+    if (ClAllGlobals) {
+      // Avoid intrumenting intrinsic global variables.
----------------
fmayer wrote:

nit: typo

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


More information about the llvm-commits mailing list