Skip to content

🍒 420 - Intercept sigaction to prevent libraries from overwriting signal handlers#422

Open
jbachorik wants to merge 2 commits intorelease/1.39._from
jaroslav.bachorik/backport-pr-420
Open

🍒 420 - Intercept sigaction to prevent libraries from overwriting signal handlers#422
jbachorik wants to merge 2 commits intorelease/1.39._from
jaroslav.bachorik/backport-pr-420

Conversation

@jbachorik
Copy link
Collaborator

Backport of #420 to release/1.39._

jbachorik and others added 2 commits March 19, 2026 09:18
Wasmtime's SIGSEGV handler calls malloc() via __tls_get_addr, which is
not async-signal-safe and causes deadlocks when profiler uses safefetch.

Patch wasmtime's sigaction GOT entry to intercept handler installations.
Their handlers are stored as chain targets and called from our handlers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit 2fcf604)
- Add NATIVE_LIBS_DROPPED counter and LOG_WARN macro
- CodeCacheArray::add() returns bool, logs once on overflow
- Fix memory leak: delete CodeCache on failed add
- Add missing macOS stubs for sigaction protection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
(cherry picked from commit e35fff9)
@pr-commenter
Copy link

pr-commenter bot commented Mar 19, 2026

Integration Tests

All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 f825d3bd

@dd-octo-sts
Copy link

dd-octo-sts bot commented Mar 19, 2026

CI Test Results

Run: #23286139431 | Commit: 6dce2b4 | Duration: 9m 28s (longest job)

All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - - -
8-ibm - - -
8-j9 - -
8-librca - -
8-orcl - - -
11 - - -
11-j9 - -
11-librca - -
17 - -
17-graal - -
17-j9 - -
17-librca - -
21 - -
21-graal - -
21-librca - -
25 - -
25-graal - -
25-librca - -

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-03-19 08:38:08 UTC

@jbachorik jbachorik requested a review from rkennke March 19, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant