vitalybuka added inline comments.

================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:571
+      getShadowMapping(TargetTriple, M.getDataLayout().getPointerSizeInBits(),
+                       ClEnableKasan.getNumOccurrences() > 0);
+  *ShadowBase = Mapping.Offset;
----------------
Unfortunately we need Kernel as argument, similar to RecoverShift in HWAsan.
Look at CL flags as internal per process constants. So if value is controlled 
by them then it's OK to assume the same value.
Kernel value however can be set by fronted e.g. from clang and does not match 
ClEnableKasan.

I propose to have own set of intrinsics for kernel/non-kernel to avoid fancy 
bit packing or unreadable 1/0 arguments.
Later we can cleunup hwasan as well.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108377/new/

https://reviews.llvm.org/D108377

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to