[PATCH] D102288: [HWASan] Add -fsanitize=lam flag and enable HWASan to use it.
Evgenii Stepanov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 12 15:39:29 PDT 2021
eugenis added inline comments.
================
Comment at: clang/include/clang/Basic/Sanitizers.def:55-59
+// Utilize Intel LAM in sanitizers. Currently only used in combination with
+// -fsanitize=hwaddress. This is an experimental flag which may be removed in
+// the future.
+// TODO: Use -mlam instead, if/when it is supported by clang.
+SANITIZER("lam", LAM)
----------------
vitalybuka wrote:
> morehouse wrote:
> > vitalybuka wrote:
> > > if it's experimental, why not just "-fsanitize=hwaddress -mllvm -havasan-lam=1" ?
> > Well, `-mllvm` indicates a flag for LLVM, but we need to change the Clang behavior to link with the LAM-enabled HWASan runtime. It seems to me that we should use a flag directed to Clang for this.
> >
> > Maybe it's possible to parse the `-mllvm` flag before the point where we need to choose a runtime (I'm not sure), but it seems simpler to do it this way.
> I see, I expected you convince you to keep same runtime lib, but I see your reasoning on the another patch.
>
> What do you thing about still keeping it hwasan and add hwasan internal flag like we added for asan
> e.g. -fsanitize-hwasan-use-lam=1. Later when -mlam is available we will drop this flag.
>
I agree, this is not a new "sanitizer", just a different kind of hwasan.
Can we simply add "-mlam" right now, with the single purpose of selecting the new hwasan mode? It can grow more functionality later.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102288/new/
https://reviews.llvm.org/D102288
More information about the cfe-commits
mailing list