[PATCH] D148188: [llvm-profdata] Make profile reader behavior consistent when encountering malformed profiles
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 17:35:49 PDT 2023
wenlei added inline comments.
================
Comment at: llvm/lib/ProfileData/SampleProfReader.cpp:557-558
Data = MD5NameMemStart + ((*Idx) * sizeof(uint64_t));
+ End = reinterpret_cast<const uint8_t *>(
+ std::numeric_limits<uintptr_t>::max());
auto FID = readUnencodedNumber<uint64_t>();
----------------
What is the bogus End used for? Defend against call site that didn't check error and tries to continue reading?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148188/new/
https://reviews.llvm.org/D148188
More information about the llvm-commits
mailing list