[PATCH] D115167: [DSE] Use precise loc for memset_chk writing to local objects.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 15 05:23:28 PST 2021


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/MemoryLocation.cpp:256
       if (const auto *Len = dyn_cast<ConstantInt>(Call->getArgOperand(2))) {
         // memset_chk writes at most Len bytes. It may write less, if Len
         // exceeds the specified max size and aborts.
----------------
fhahn wrote:
> I now moved the code, but I'm not sure how to adjust/frame the comment here. 
memset_chk will either write exactly Len bytes or abort the process. If memset_chk aborts, then the partial write cannot be observed. For analysis purposes we can assume that exactly Len bytes are written.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115167



More information about the llvm-commits mailing list