Fix custom EHFrame registration on llvm21#60358
Closed
Conversation
gbaraldi
added a commit
that referenced
this pull request
Mar 9, 2026
LLVM 21 removes `jitlink::EHFrameRegistrar` and changes the `EHFrameRegistrationPlugin` constructor to use a factory method. Add `JLEHFrameRegistrationPlugin` which uses JITLink allocation actions for EH frame registration/deregistration, and update the `JuliaOJIT` constructor with version guards. Supersedes #60358. Co-Authored-By: yuyichao <yyc1992@gmail.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
xal-0
pushed a commit
to xal-0/julia
that referenced
this pull request
Mar 9, 2026
LLVM 21 removes `jitlink::EHFrameRegistrar` and changes the `EHFrameRegistrationPlugin` constructor to use a factory method. Add `JLEHFrameRegistrationPlugin` which uses JITLink allocation actions for EH frame registration/deregistration, and update the `JuliaOJIT` constructor with version guards. Supersedes JuliaLang#60358. Co-Authored-By: yuyichao <yyc1992@gmail.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
xal-0
added a commit
that referenced
this pull request
Mar 11, 2026
LLVM 21 removes `jitlink::EHFrameRegistrar` and changes the `EHFrameRegistrationPlugin` constructor to use a factory method. Use the new EHFrameRegistrationPlugin constructor to pass our register/deregister actions. Supersedes #60358. Co-Authored-By: yuyichao <yyc1992@gmail.com> Co-Authored-By: Sam Schweigel <sam.schweigel@juliahub.com>
oscardssmith
pushed a commit
that referenced
this pull request
Mar 11, 2026
## Summary - Add `withContextDo` compatibility shim for `ThreadSafeContext` API changes in LLVM 21 (which removes `getLock()`, `Lock`, and `getContext()` in favor of callback-based `withContextDo`) - Replace all manual lock/unlock patterns with scoped `withContextDo` callbacks across `jitlayers.h`, `jitlayers.cpp`, `aotcompile.cpp`, and `disasm.cpp` - Add `JLEHFrameRegistrationPlugin` for LLVM 21+ (which removes `jitlink::EHFrameRegistrar`), using JITLink allocation actions for EH frame registration - Debug asserts ensure `get_context()`/`get_module()` are only called inside `withContextDo` scope - Lock hierarchy respected: TSC locks released before `addOutput()`/`R->replace()` which can trigger materialization Supersedes #59946 and #60358, forward-porting those changes to current master. ## Test plan - [x] Builds and passes smoke test on LLVM 20 - [x] Builds and passes smoke test on LLVM 21 (tested with libLLVM 21.1.2 JLL) - [ ] CI This pull request was written with the assistance of generative AI (Claude). 🤖 Generated with [Claude Code](https://claude.com/claude-code) There is quite a few whitespace changes so ignoring it is quite helpful --------- Co-authored-by: yuyichao <yyc1992@gmail.com> Co-authored-by: Sam Schweigel <sam.schweigel@juliahub.com>
Member
|
Superseded by #61273, right? |
Member
|
yes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also split out of #59946.
Ref llvm/llvm-project@76d5a79