[llvm] r330026 - [llvm-exegesis] Fix use after free.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 13 07:46:48 PDT 2018
Author: courbet
Date: Fri Apr 13 07:46:48 2018
New Revision: 330026
URL: http://llvm.org/viewvc/llvm-project?rev=330026&view=rev
Log:
[llvm-exegesis] Fix use after free.
Reviewers: gchatelet
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D45625
Modified:
llvm/trunk/tools/llvm-exegesis/lib/InMemoryAssembler.cpp
Modified: llvm/trunk/tools/llvm-exegesis/lib/InMemoryAssembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/lib/InMemoryAssembler.cpp?rev=330026&r1=330025&r2=330026&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/InMemoryAssembler.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/InMemoryAssembler.cpp Fri Apr 13 07:46:48 2018
@@ -215,7 +215,7 @@ JitFunction::JitFunction(JitFunctionCont
// Adding the generated object file containing the assembled function.
// The ExecutionEngine makes sure the object file is copied into an
// executable page.
- ExecEngine->addObjectFile(ObjHolder.takeBinary().first);
+ ExecEngine->addObjectFile(std::move(ObjHolder));
// Setting function
FunctionBytes =
llvm::StringRef(reinterpret_cast<const char *>(
More information about the llvm-commits
mailing list