[compiler-rt] [llvm] [TySan] Add option to outline instrumentation (PR #120582)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 05:33:11 PDT 2025


================
@@ -591,6 +633,29 @@ bool TypeSanitizer::instrumentWithShadowUpdate(
 
   Value *TD = IRB.CreateBitCast(TDGV, IRB.getPtrTy());
 
+  if (ClOutlineInstrumentation) {
+    if (!ForceSetType && (!ClWritesAlwaysSetType || IsRead)) {
+      // We need to check the type here. If the type is unknown, then the read
+      // sets the type. If the type is known, then it is checked. If the type
+      // doesn't match, then we call the runtime (which may yet determine that
+      // the mismatch is okay).
+
----------------
gbMattN wrote:

Ah, yes I'll clarify that its the runtime type check

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


More information about the llvm-commits mailing list