llvm/unittests
Zachary Turner a5be24d937 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304623 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-03 00:33:35 +00:00
..
ADT Tidy up a bit of r304516, use SmallVector::assign rather than for loop 2017-06-02 17:24:26 +00:00
Analysis [OrderedBasicBlock] Return false for comesBefore(A, A) 2017-06-02 13:10:31 +00:00
AsmParser
Bitcode
CodeGen [SVE] Fix mismatched sign comparison warning in unit test from r300842. 2017-04-20 16:54:49 +00:00
DebugInfo [PDB] Fix use after free. 2017-06-03 00:33:35 +00:00
ExecutionEngine [ExecutionEngine] Make RuntimeDyld::MemoryManager responsible for tracking EH 2017-05-09 21:32:18 +00:00
IR Fix assertion when merging multiple empty AttributeLists 2017-05-31 14:24:06 +00:00
LineEditor
Linker
MC
MI
Object
ObjectYAML
Option Fix some ArgList uses after API change in r300135. 2017-04-12 23:43:58 +00:00
ProfileData
Support Make mcpu=generic the default for armv7-a and armv8-a. 2017-06-01 07:31:43 +00:00
Target [globalisel][tablegen] Demote OptForSize/OptForMinSize/ForCodeSize to per-function predicates. 2017-05-19 11:08:33 +00:00
Transforms Reapply "[Cloning] Take another pass at properly cloning debug info" 2017-06-01 23:02:12 +00:00
XRay
CMakeLists.txt