llvm/lib
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
..
Analysis [InlineCost] Enable the new switch cost heuristic 2017-06-02 20:42:54 +00:00
AsmParser [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
Bitcode BitcodeWriter: Removing unnecessary std::function in favor of template 2017-06-02 18:25:29 +00:00
CodeGen LiveRegUnits: Port recent LivePhysRegs bugfixes 2017-06-03 00:26:35 +00:00
DebugInfo [PDB] Fix use after free. 2017-06-03 00:33:35 +00:00
Demangle [ItaniumDemangle] Fix a exponential string copying bug 2017-05-28 23:24:52 +00:00
ExecutionEngine [RuntimeDyld, PowerPC] Fix regression from r303637 2017-05-23 17:03:23 +00:00
Fuzzer [libFuzzer] fix a test to match the new sanitizer run-time 2017-05-31 19:47:11 +00:00
IR Reapply "[Cloning] Take another pass at properly cloning debug info" 2017-06-01 23:02:12 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LineEditor
Linker Support for taking the max of module flags when linking, use for PIE/PIC 2017-05-23 00:08:00 +00:00
LTO Move summary dead stripping before regular LTO. 2017-06-02 18:24:17 +00:00
MC [WebAssembly] MC: Fix references to undefined externals in data section 2017-06-02 01:05:24 +00:00
Object Re-land "COFF: migrate def parser from LLD to LLVM" 2017-06-02 17:53:06 +00:00
ObjectYAML Fix build error on gcc. 2017-06-02 21:00:22 +00:00
Option [GSoC] Shell autocompletion for clang 2017-05-23 18:39:08 +00:00
Passes Move GVNHoist to the right position in the new pass manager pipeline. 2017-06-01 23:08:14 +00:00
ProfileData [InstrProf] Use more ArrayRef/StringRef. 2017-05-28 13:23:02 +00:00
Support Revert r304117 - WebAssembly object format isn't ready to be the default 2017-06-02 01:26:17 +00:00
TableGen [TableGen] Remove RecordVal constructor that takes a StringRef and Record::setName(StringRef). Leave just the versions that take an Init. 2017-06-01 06:56:16 +00:00
Target [AMDGPU] V_DIV_FIXUP_F16 is not a commutable operation 2017-06-03 00:16:44 +00:00
ToolDrivers Add missing files 2017-05-13 22:10:13 +00:00
Transforms [SLP] Improve comments and naming of functions/variables/members, NFC. 2017-06-03 00:08:21 +00:00
XRay [XRay][lib] Support and temporarily skip over CustomEvent records 2017-05-12 01:06:41 +00:00
CMakeLists.txt Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI. 2017-05-13 22:06:46 +00:00
LLVMBuild.txt Move lib/LibDriver -> lib/ToolDrivers/llvm-lib. NFCI. 2017-05-13 22:06:46 +00:00