[PATCH] D97239: [profile] Fix buffer overrun when parsing %c in filename string
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 23 08:32:43 PST 2021
vsk added inline comments.
================
Comment at: compiler-rt/lib/profile/InstrProfilingFile.c:773
__llvm_profile_set_page_size(getpagesize());
__llvm_profile_enable_continuous_mode();
} else {
----------------
MaskRay wrote:
> Adding `getChar` seems excessive. Does simply dropping `I++` here fix the bug?
Yes. `getChar` adds a little complexity, but lets us write a test that reliably fails pre-patch. I think that's worth it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97239/new/
https://reviews.llvm.org/D97239
More information about the llvm-commits
mailing list