[PATCH] D26630: Fix heap-use-after-free coff::createPDB
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 12:31:05 PST 2016
vitalybuka created this revision.
vitalybuka added a reviewer: ruiu.
vitalybuka added a subscriber: llvm-commits.
getInputSections returns std::vector by value and ArrayRef
pointed to destroyed temporarily.
https://reviews.llvm.org/D26630
Files:
COFF/PDB.cpp
Index: COFF/PDB.cpp
===================================================================
--- COFF/PDB.cpp
+++ COFF/PDB.cpp
@@ -82,9 +82,8 @@
IpiBuilder.setVersionHeader(pdb::PdbTpiV80);
// Add Section Contributions.
- ArrayRef<coff_section> InputSections = getInputSections(Symtab);
std::vector<pdb::SectionContrib> Contribs =
- pdb::DbiStreamBuilder::createSectionContribs(InputSections);
+ pdb::DbiStreamBuilder::createSectionContribs(getInputSections(Symtab));
DbiBuilder.setSectionContribs(Contribs);
// Add Section Map stream.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26630.77863.patch
Type: text/x-patch
Size: 561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161114/b2ba039a/attachment.bin>
More information about the llvm-commits
mailing list