Browse Source

Merge changes I6ddb47d7,I3df3d304

* changes:
  [hwasan] Increase BB to explore for reachability
  [hwasan] Also pass use-after-scope flag in LTO
Treehugger Robot 11 months ago
parent
commit
f44ac9efc1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      cc/sanitize.go

+ 3 - 1
cc/sanitize.go

@@ -38,11 +38,11 @@ var (
 	}
 	asanLdflags = []string{"-Wl,-u,__asan_preinit"}
 
+	// DO NOT ADD MLLVM FLAGS HERE! ADD THEM BELOW TO hwasanCommonFlags.
 	hwasanCflags = []string{
 		"-fno-omit-frame-pointer",
 		"-Wno-frame-larger-than=",
 		"-fsanitize-hwaddress-abi=platform",
-		"-mllvm", "-hwasan-use-after-scope=1",
 	}
 
 	// ThinLTO performs codegen during link time, thus these flags need to
@@ -60,6 +60,8 @@ var (
 		// GlobalISel is the default at -O0 on aarch64.
 		"--aarch64-enable-global-isel-at-O=-1",
 		"-fast-isel=false",
+		"-hwasan-use-after-scope=1",
+		"-dom-tree-reachability-max-bbs-to-explore=128",
 	}
 
 	sanitizeIgnorelistPrefix = "-fsanitize-ignorelist="