[PATCH] D71683: [ORC][EH] Deregister EH frames in MemoryManager dtor

Min-Yih Hsu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 19:30:33 PST 2019


myhsu added a comment.

In D71683#1793661 <https://reviews.llvm.org/D71683#1793661>, @lhames wrote:

> Actually, are you seeing this bug on ORC? Or just on MCJIT?


ORC, specifically ORCv2. I did see deregistration called in LegacyRTDyldObjectLinkingLayer, but well, it’s legacy v1. I didn’t see any deregistration in v2.

> Looking at the code again, if you're using ORC this should be handled automatically. If you're using MCJIT it is (unfortunately) contract that you're responsible for calling this yourself. It would be safe to add this call to SectionMemoryManager as redundant calls (from existing clients) are no-ops, but it introduces a hazard: Anyone who brings up a JIT successfully with SectionMemoryManager is suddenly going to discover that their code fails when they try to use a custom memory manager.

So I did see a new EHFrameRegistraPlugin that will deregistrate EH frame. However, I didn’t see any usage of that class other than llvm-jitlink utility. Will that plugin be the mandatory component for EH in the future?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71683/new/

https://reviews.llvm.org/D71683





More information about the llvm-commits mailing list