Skip to content

Test CppInterOp interpreter shutdown patch #891#21847

Open
aaronj0 wants to merge 2 commits intoroot-project:masterfrom
aaronj0:cppinterop-shutdown-patch
Open

Test CppInterOp interpreter shutdown patch #891#21847
aaronj0 wants to merge 2 commits intoroot-project:masterfrom
aaronj0:cppinterop-shutdown-patch

Conversation

@aaronj0
Copy link
Copy Markdown
Contributor

@aaronj0 aaronj0 commented Apr 8, 2026

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
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

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.

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