[PATCH] D66979: [InstrProf] Tighten a check for malformed data records in raw profiles

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 21:49:22 PDT 2019


davidxl added inline comments.


================
Comment at: llvm/lib/ProfileData/InstrProfReader.cpp:423
     return error(instrprof_error::malformed);
+  ptrdiff_t CounterOffset = getCounterOffset(CounterPtr);
+  if (CounterOffset < 0 || CounterOffset > MaxNumCounters ||
----------------
davidxl wrote:
> should it assert to be zero?
Discard this comment. I read it wrong.


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

https://reviews.llvm.org/D66979





More information about the llvm-commits mailing list