[llvm] r251827 - Fix use-after-free in function index merging code.
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 12:43:33 PST 2015
Author: tejohnson
Date: Mon Nov 2 14:43:33 2015
New Revision: 251827
URL: http://llvm.org/viewvc/llvm-project?rev=251827&view=rev
Log:
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.
Modified:
llvm/trunk/lib/IR/FunctionInfo.cpp
Modified: llvm/trunk/lib/IR/FunctionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/FunctionInfo.cpp?rev=251827&r1=251826&r2=251827&view=diff
==============================================================================
--- llvm/trunk/lib/IR/FunctionInfo.cpp (original)
+++ llvm/trunk/lib/IR/FunctionInfo.cpp Mon Nov 2 14:43:33 2015
@@ -23,7 +23,7 @@ void FunctionInfoIndex::mergeFrom(std::u
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
More information about the llvm-commits
mailing list