[PATCH] D82680: MSAN: Allow emitting checks for struct types

Gui Andrade via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 10:15:31 PDT 2020


guiand marked an inline comment as done.
guiand added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1155
     unsigned StoreSize = DL.getTypeStoreSize(Shadow->getType());
     if (Shadow->getType()->isAggregateType()) {
       paintOrigin(IRB, updateOrigin(Origin, IRB), OriginPtr, StoreSize,
----------------
eugenis wrote:
> this can be improved now by moving the origin update code behind the shadow check
This check covers arrays as well, so I don't think I can get rid of it completely but I can change it to check for `isArrayType()`. I wrote some code to let `convertShadowToScalar` handle Array types as well, but I thought I would leave that to a separate patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82680





More information about the llvm-commits mailing list