diff options
author | Clement Courbet <courbet@google.com> | 2018-04-13 14:46:48 +0000 |
---|---|---|
committer | Clement Courbet <courbet@google.com> | 2018-04-13 14:46:48 +0000 |
commit | 1924993b22898f12bc87789b1f14aa1f0025c43a (patch) | |
tree | 6cc4ed1a0be76d2c866d3c79ac6826f65e33f7cd /llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp | |
parent | 01637c473f7da106c0085899ab8e9004a7d19d23 (diff) | |
download | bcm5719-llvm-1924993b22898f12bc87789b1f14aa1f0025c43a.tar.gz bcm5719-llvm-1924993b22898f12bc87789b1f14aa1f0025c43a.zip |
[llvm-exegesis] Fix use after free.
Reviewers: gchatelet
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D45625
llvm-svn: 330026
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp b/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp index 7e1e58ff888..00b7ee74ca0 100644 --- a/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp +++ b/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp @@ -215,7 +215,7 @@ JitFunction::JitFunction(JitFunctionContext &&Context, // 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 *>( |