[PATCH] D108142: [SamplePGO] Fixing a memory issue when creating profiles on-demand

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 16 11:43:41 PDT 2021


wenlei added a comment.

Thanks for the fix. I guess since we didn't really use the key of the map, it was just a hidden bug not causing trouble in the past (no ICE)?



================
Comment at: llvm/include/llvm/ProfileData/SampleProfReader.h:411
+    auto It = Profiles.find(CanonName);
+    if (It == Profiles.end()) {
+      if (!FGUID.empty())
----------------
Can we assert this only happens for MD5? 

Additionally, NameBuffer -> MD5NameBuffer to make that explicit?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108142



More information about the llvm-commits mailing list