llvm-project/llvm/lib
Lang Hames c936ac7f37 [ExecutionEngine] Make RuntimeDyld::MemoryManager responsible for tracking EH
frames.

RuntimeDyld was previously responsible for tracking allocated EH frames, but it
makes more sense to have the RuntimeDyld::MemoryManager track them (since the
frames are allocated through the memory manager, and written to memory owned by
the memory manager). This patch moves the frame tracking into
RTDyldMemoryManager, and changes the deregisterFrames method on
RuntimeDyld::MemoryManager from:

void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size);

to:

void deregisterEHFrames();

Separating this responsibility will allow ORC to continue to throw the
RuntimeDyld instances away post-link (saving a few dozen bytes per lazy
function) while properly deregistering frames when modules are unloaded.

This patch also updates ORC to call deregisterEHFrames when modules are
unloaded. This fixes a bug where an exception that tears down the JIT can then
unwind through dangling EH frames that have been deallocated but not
deregistered, resulting in UB.

For people using SectionMemoryManager this should be pretty much a no-op. For
people with custom allocators that override registerEHFrames/deregisterEHFrames,
you will now be responsible for tracking allocated EH frames.

Reviewed in https://reviews.llvm.org/D32829

llvm-svn: 302589
2017-05-09 21:32:18 +00:00
..
Analysis Introduce experimental generic intrinsics for horizontal vector reductions. 2017-05-09 10:43:25 +00:00
AsmParser AMDGPU: Add AMDGPU_HS calling convention 2017-05-02 15:41:10 +00:00
Bitcode Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI." 2017-05-04 18:03:25 +00:00
CodeGen DAGCombine: Combine shuffles of splat-shuffles 2017-05-09 20:25:38 +00:00
DebugInfo [DWARF] Fix a parsing issue with type unit headers. 2017-05-09 19:38:38 +00:00
Demangle Add support for demangling C++11 thread_local variables. 2017-01-31 15:56:36 +00:00
ExecutionEngine [ExecutionEngine] Make RuntimeDyld::MemoryManager responsible for tracking EH 2017-05-09 21:32:18 +00:00
Fuzzer [libFuzzer] update docs on -print_coverage/-dump_coverage 2017-05-09 01:34:27 +00:00
IR [codeview] Check for a DIExpression offset for local variables 2017-05-09 19:59:29 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI." 2017-05-04 18:03:25 +00:00
LibDriver Fix some ArgList uses after API change in r300135. 2017-04-12 23:43:58 +00:00
LineEditor
Linker [Linker] Provide callback for internalization 2017-03-13 18:08:11 +00:00
MC [ARM] Clear the constant pool cache on explicit .ltorg directives 2017-05-08 10:26:24 +00:00
Object Fix the Endianness bug by adding the little endian UTF marker. 2017-05-09 19:35:45 +00:00
ObjectYAML [WebAssembly] Add ObjectYAML support for wasm name section 2017-05-05 18:12:34 +00:00
Option ArgList: cache index ranges containing arguments with each ID 2017-04-12 23:19:51 +00:00
Passes [PM] Add ProfileSummaryAnalysis as a required pass in the new pipeline. 2017-05-04 16:58:45 +00:00
ProfileData [ProfileData] Unify getInstrProf*SectionName helpers 2017-04-15 00:09:57 +00:00
Support [APInt] Remove return value from tcFullMultiply. 2017-05-09 16:47:33 +00:00
TableGen Use print() instead of dump() in code 2017-01-28 02:47:46 +00:00
Target [AMDGPU] Fixed typo in GCNRegPressure, NFC 2017-05-09 20:50:04 +00:00
Transforms [GVN] Fix a crash on encountering non-integral pointers 2017-05-09 21:07:20 +00:00
XRay [XRay] - Fix spelling error to test commit access. 2017-04-06 03:32:01 +00:00
CMakeLists.txt [XRay] Define the library for XRay trace logs 2017-01-11 06:39:09 +00:00
LLVMBuild.txt