[PATCH] D97239: [profile] Fix buffer overrun when parsing %c in filename string

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 23:15:35 PST 2021


MaskRay added inline comments.


================
Comment at: compiler-rt/lib/profile/InstrProfilingFile.c:773
         __llvm_profile_set_page_size(getpagesize());
         __llvm_profile_enable_continuous_mode();
       } else {
----------------
Adding `getChar` seems excessive. Does simply dropping `I++` here fix the bug?


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