[llvm] r312408 - Return copy of XML dump
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 22:14:56 PDT 2017
Author: vitalybuka
Date: Fri Sep 1 22:14:55 2017
New Revision: 312408
URL: http://llvm.org/viewvc/llvm-project?rev=312408&view=rev
Log:
Return copy of XML dump
COFF/DriverUtils.cpp uses buffer after WindowsManifestMerger destroyed.
Modified:
llvm/trunk/lib/WindowsManifest/WindowsManifestMerger.cpp
Modified: llvm/trunk/lib/WindowsManifest/WindowsManifestMerger.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/WindowsManifest/WindowsManifestMerger.cpp?rev=312408&r1=312407&r2=312408&view=diff
==============================================================================
--- llvm/trunk/lib/WindowsManifest/WindowsManifestMerger.cpp (original)
+++ llvm/trunk/lib/WindowsManifest/WindowsManifestMerger.cpp Fri Sep 1 22:14:55 2017
@@ -677,7 +677,7 @@ WindowsManifestMerger::WindowsManifestMe
Buffer.reset(Buff);
}
- return BufferSize ? MemoryBuffer::getMemBuffer(StringRef(
+ return BufferSize ? MemoryBuffer::getMemBufferCopy(StringRef(
FROM_XML_CHAR(Buffer.get()), (size_t)BufferSize))
: nullptr;
}
More information about the llvm-commits
mailing list