[all-commits] [llvm/llvm-project] a8b8a9: [llvm-profdata]Fix llvm-profdata crash on compact ...
WenleiHe via All-commits
all-commits at lists.llvm.org
Sun Sep 20 16:59:51 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: a8b8a9374a3c555ac8528fc37b92935554083b9f
https://github.com/llvm/llvm-project/commit/a8b8a9374a3c555ac8528fc37b92935554083b9f
Author: wlei <wlei at dev001.prn2.facebook.com>
Date: 2020-09-20 (Sun, 20 Sep 2020)
Changed paths:
M llvm/test/tools/llvm-profdata/compact-sample.proftext
M llvm/tools/llvm-profdata/llvm-profdata.cpp
Log Message:
-----------
[llvm-profdata]Fix llvm-profdata crash on compact binary profile
llvm-profdata `show` and `overlap` will crash in `getFuncName` on compact binary profile. This change fixed this by switching to use `getName`.
`getFuncName` is misused in llvm-profdata. As showed below, `GUIDToFuncNameMap` is only supported in compilation mode, there is no initialization in llvm-profdata. Compact profile whose MD5 is true would try to query `GUIDToFuncNameMap` then caused the crash. So fix this by switching to `getName`
Reviewed By: MaskRay, wmi, wenlei, weihe, hoy
Differential Revision: https://reviews.llvm.org/D87740
More information about the All-commits
mailing list