Skip to content

Test CppInterOp interpreter shutdown patch #891 - #21847

Draft
aaronj0 wants to merge 2 commits into
root-project:masterfrom
aaronj0:cppinterop-shutdown-patch
Draft

aaronj0 wants to merge 2 commits into
root-project:masterfrom
aaronj0:cppinterop-shutdown-patch

Conversation

@aaronj0

@aaronj0 aaronj0 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

aaronj0 and others added 2 commits April 8, 2026 17:51
Re-enable llvm::InitLLVM to handle system limits and signal handlers. To avoid
the "Static Destruction Order Fiasco," this patch transitions the internal
interpreter registry from llvm::ManagedStatic to a heap-allocated static pointer.

This ensures that the std::deque<InterpreterInfo> is not destroyed during the
C-runtime exit sequence. Without this, the JIT attempts to run de-initializers
(using LLVM globals) after those globals have already been cleared, leading to
segfaults on Darwin and Linux.

The  InitLLVM which does some heavy lifting in installing handlers and bumping
system limits. It is designed to work for binaries, however, since we have a
pimpl pattern which isolates llvm into the CppInterOp library we need to take
extra care.
@aaronj0
aaronj0 requested a review from dpiparo as a code owner April 8, 2026 15:56
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

Test Results

     3 files      3 suites   13h 30m 44s ⏱️
 3 751 tests 2 975 ✅  82 💤 694 ❌
10 675 runs  9 187 ✅ 792 💤 696 ❌

For more details on these failures, see this check.

Results for commit 29786d5.

@aaronj0
aaronj0 marked this pull request as draft April 23, 2026 08:46

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants