[PATCH] D84446: [MSAN] Allow inserting array checks

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 13:49:40 PDT 2020


eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1784
         (isa<IntegerType>(ShadowTy) || isa<VectorType>(ShadowTy) ||
-         isa<StructType>(ShadowTy)) &&
-        "Can only insert checks for integer, vector, and struct shadow types");
+         isa<StructType>(ShadowTy) || isa<ArrayType>(ShadowTy)) &&
+        "Can only insert checks for integer, vector, and aggregate shadow types");
----------------
guiand wrote:
> @eugenis With eager checks enabled, any noundef array arguments or return values will attempt to call this code. The behavior without this patch is for this assertion to fire. The patch enables these checks to work correctly.
> 
> If you'd like, I can make this clear in the test I added by using `-msan-eager-checks`.
Got it, MSan is simply broken without this patch - it crashes on valid IR.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84446





More information about the llvm-commits mailing list