diff options
| author | Teresa Johnson <tejohnson@google.com> | 2015-11-02 20:43:33 +0000 |
|---|---|---|
| committer | Teresa Johnson <tejohnson@google.com> | 2015-11-02 20:43:33 +0000 |
| commit | 746426b48727a9850b0c58b135d2934616b909b0 (patch) | |
| tree | bb242e59d6945997e4c54e8d3d388f7c934d9ccb | |
| parent | 260b65850c1d8a056d1a40ecfca6971b9483811c (diff) | |
| download | bcm5719-llvm-746426b48727a9850b0c58b135d2934616b909b0.tar.gz bcm5719-llvm-746426b48727a9850b0c58b135d2934616b909b0.zip | |
Fix use-after-free in function index merging code.
This was flagged by ASAN when using a test case I will be committing
along with D13515.
llvm-svn: 251827
| -rw-r--r-- | llvm/lib/IR/FunctionInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/FunctionInfo.cpp b/llvm/lib/IR/FunctionInfo.cpp index 015f1235f6d..d26c7a4e9a0 100644 --- a/llvm/lib/IR/FunctionInfo.cpp +++ b/llvm/lib/IR/FunctionInfo.cpp @@ -23,7 +23,7 @@ void FunctionInfoIndex::mergeFrom(std::unique_ptr<FunctionInfoIndex> Other, StringRef ModPath; for (auto &OtherFuncInfoLists : *Other) { - StringRef FuncName = OtherFuncInfoLists.getKey(); + std::string FuncName = OtherFuncInfoLists.getKey(); FunctionInfoList &List = OtherFuncInfoLists.second; // Assert that the func info list only has one entry, since we shouldn't |

