[PATCH] D148188: [llvm-profdata] Make profile reader behavior consistent when encountering malformed profiles

William Junda Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 19:10:22 PDT 2023


huangjd created this revision.
huangjd added reviewers: davidxl, xur, kazu, ellis, snehasish.
Herald added subscribers: wenlei, hiraditya.
Herald added a project: All.
huangjd requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changes to the profile reader behavior (previously the behavior is bugged when encountering such scenario);

1. For extbinary format, when reading a second name table, the previous one is cleared (previously causes array out of bound)

2. Check if profile mixes MD5 and nonMD5 functions


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148188

Files:
  llvm/include/llvm/ProfileData/SampleProfReader.h
  llvm/lib/ProfileData/SampleProfReader.cpp
  llvm/test/tools/llvm-profdata/Inputs/sample-multiple-nametables.profdata
  llvm/test/tools/llvm-profdata/Inputs/sample-nametable-after-samples.profdata
  llvm/test/tools/llvm-profdata/Inputs/sample-nametable-empty-string.profdata
  llvm/test/tools/llvm-profdata/sample-nametable.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148188.513041.patch
Type: text/x-patch
Size: 7741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230413/d2b33991/attachment.bin>


More information about the llvm-commits mailing list