Skip to content

fix(bridge): propagate signal-killed child as 128+sig (reld#123 Phase 0 / D6) - #134

Merged
zackees merged 1 commit into
mainfrom
phase0-signal-propagation
Sep 16, 2026
Merged

zackees merged 1 commit into
mainfrom
phase0-signal-propagation

Conversation

@zackees

@zackees zackees commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

What

Implements the reld#123 D6 item: a bridged child's signal must be propagated.

When a bridged linker (ld.lld, lld-link, ld64.lld) is killed by a signal (SIGSEGV, SIGABRT, …), the bridge previously collapsed the failure to a bare exit 1 because ExitStatus::code() is None for a signal termination. That hides the crash from the parent process.

Change

  • In run_bridge, when ExitStatus::signal() is Some(sig) (Unix), exit with 128 + sig and print reld: <engine> bridge terminated by signal <sig>, so the crash is diagnosable and the exit status reflects the signal.

Verification

  • cargo build -p reld-core — clean.
  • cargo clippy -p reld-core --all-targets -- -D warnings — clean.
  • cargo fmt --check — clean.

🤖 Generated with Claude Code

… 0 / D6)

When a bridged linker (ld.lld, lld-link, ld64.lld) is killed by a signal, the
bridge previously collapsed the failure to a bare exit 1. Propagate the signal
as `128 + signal` and print a stderr line naming the engine and signal, so a
crashed bridge is diagnosable (reld#123 D6).

Co-Authored-By: Claude Code <[email protected]>
@zackees
zackees merged commit 5d887e1 into main Sep 16, 2026
17 checks passed
@zackees
zackees deleted the phase0-signal-propagation branch September 16, 2026 19:33
zackees added a commit that referenced this pull request Sep 17, 2026
…23) (#156)

Two Phase 0 checklist lines had shipped behavior but no evidence.

`bridged_child_signal_is_reported`: PR #134 made a signal-killed bridge exit
`128 + signal` with a diagnostic naming the engine, and nothing pinned it.
The new test points RELD_BRIDGE_LINKER at a script that SIGSEGVs itself and
asserts exit 139 plus the message. It skips where the host has no POSIX
signals, asked through the platform facade rather than host cfg.

`nix_runpath_on_every_route`: the NixOS RUNPATH tests only ever exercised
the native engine, even though bridge.rs re-derives the same RUNPATH for
routed links. All three now run with `--engine=reld` and `--engine=lld`,
skipping the bridge leg only when no bridge linker is discoverable. Both
legs run on this host, so the routed path is now covered.

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.

1 participant