[PATCH] D44479: [MSan] Add an isStore argument to getShadowOriginPtr(). NFC

Alexander Potapenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 19 02:35:59 PDT 2018


glider added a comment.

> Are you going to provide a zero page for ignores loads and a scratch page for ignored stores?

Yes, that is the intention.

> Is it valid to use an isStore pointer for loading?

In general it is not.

> If not, then load-modify-store operations will have to request two pointers and expect them to be different?

Good point.
Note that we don't instrument the atomic RMW operations in (K)MSan properly anyway, so this isn't a problem for atomic CAS/RMW.
For a nonatomic sequence of load/modify/store instructions we might be losing some optimization opportunities here, but I can't think of any. (E.g. in the case when we're overwriting the old shadow value, and there's no point in reading it, we shouldn't do it irrespective of whether the read and write shadow pointers match)


Repository:
  rL LLVM

https://reviews.llvm.org/D44479





More information about the llvm-commits mailing list