llvm-project/llvm/lib/DebugInfo/PDB/Native
Zachary Turner 5b74ff33e7 [PDB] Fix use after free.
Previously MappedBlockStream owned its own BumpPtrAllocator that
it would allocate from when a read crossed a block boundary.  This
way it could still return the user a contiguous buffer of the
requested size.  However, It's not uncommon to open a stream, read
some stuff, close it, and then save the information for later.
After all, since the entire file is mapped into memory, the data
should always be available as long as the file is open.

Of course, the exception to this is when the data isn't *in* the
file, but rather in some buffer that we temporarily allocated to
present this contiguous view.  And this buffer would get destroyed
as soon as the strema was closed.

The fix here is to force the user to specify the allocator, this
way it can provide an allocator that has whatever lifetime it
chooses.

Differential Revision: https://reviews.llvm.org/D33858

llvm-svn: 304623
2017-06-03 00:33:35 +00:00
..
DbiModuleDescriptor.cpp [llvm-pdbdump] Abstract some of the YAML/Raw printing code. 2017-04-29 01:13:21 +00:00
DbiModuleDescriptorBuilder.cpp [PDB] Fix use after free. 2017-06-03 00:33:35 +00:00
DbiModuleList.cpp [PDB] Don't build the entire source file list up front. 2017-05-04 23:53:29 +00:00
DbiStream.cpp [PDB] Fix use after free. 2017-06-03 00:33:35 +00:00
DbiStreamBuilder.cpp [PDB] Fix use after free. 2017-06-03 00:33:35 +00:00
EnumTables.cpp
GSI.cpp [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
GSI.h [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
GlobalsStream.cpp [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
Hash.cpp
HashTable.cpp [PDB] Make streams carry their own endianness. 2017-02-28 00:04:07 +00:00
InfoStream.cpp Added missing break. 2017-05-30 19:02:49 +00:00
InfoStreamBuilder.cpp [PDB] Fix use after free. 2017-06-03 00:33:35 +00:00
ModuleDebugStream.cpp [CodeView] Support CodeView subsections in any order. 2017-06-02 19:49:14 +00:00
ModuleDebugStreamBuilder.cpp [CodeView] Write CodeView line information. 2017-05-01 23:27:42 +00:00
NamedStreamMap.cpp [llvm-pdbdump] Add support for diffing the PDB Stream. 2017-03-16 20:18:41 +00:00
NativeCompilandSymbol.cpp [PDB] Don't build the entire source file list up front. 2017-05-04 23:53:29 +00:00
NativeEnumModules.cpp [PDB] Don't build the entire source file list up front. 2017-05-04 23:53:29 +00:00
NativeExeSymbol.cpp [PDB] Don't build the entire source file list up front. 2017-05-04 23:53:29 +00:00
NativeRawSymbol.cpp [llvm-pdbdump] Re-write the record layout code to be more resilient. 2017-04-24 17:47:24 +00:00
NativeSession.cpp [llvm-pdbdump] More advanced class definition dumping. 2017-04-12 23:18:21 +00:00
PDBFile.cpp [PDB] Fix use after free. 2017-06-03 00:33:35 +00:00
PDBFileBuilder.cpp [PDB] Fix use after free. 2017-06-03 00:33:35 +00:00
PDBStringTable.cpp [CodeView] Support CodeView subsections in any order. 2017-06-02 19:49:14 +00:00
PDBStringTableBuilder.cpp Resubmit r301986 and r301987 "Add codeview::StringTable" 2017-05-03 15:58:37 +00:00
PDBTypeServerHandler.cpp [lld] Fix a bug where we continually re-follow type servers. 2017-05-25 21:16:03 +00:00
PublicsStream.cpp [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
RawError.cpp [pdb] Write the module info and symbol record streams. 2017-03-15 22:18:53 +00:00
SymbolStream.cpp [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
TpiHashing.cpp
TpiStream.cpp [PDB] Fix use after free. 2017-06-03 00:33:35 +00:00
TpiStreamBuilder.cpp [PDB] Fix use after free. 2017-06-03 00:33:35 +00:00