Skip to content

Test SjLj across C++ noexcept boundaries#925

Closed
brandonpayton wants to merge 1 commit into
mainfrom
test/sjlj-noexcept-regression
Closed

Test SjLj across C++ noexcept boundaries#925
brandonpayton wants to merge 1 commit into
mainfrom
test/sjlj-noexcept-regression

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jul 13, 2026

Copy link
Copy Markdown
Member

What this follows up

#907 already landed the Dinit production and package workaround that lets a
normal SIGCHLD service exit reach Dinit's existing handler without aborting.
This PR does not replay that fix. It keeps the useful test and documentation
work from closed #911 and links it to #918.

What remains here

  • Raw wasm32 and wasm64 controls show the pinned LLVM 21 behavior when
    siglongjmp crosses a C++ noexcept frame.
  • A fork-instrumented wasm32 control proves that the same behavior is present
    after Kandelo instrumentation.
  • A permissive control proves the matching SjLj landing still works when it
    does not cross noexcept.
  • A positive SIGCHLD fixture proves the handler can jump back from pselect
    and reap a clean child.
  • Node and Chromium run the maintained regression, including the raw wasm64
    control, and the SDK guide explains the narrow toolchain limitation.

The failure controls deliberately expect the current SIGABRT. When the
toolchain is fixed, they should fail clearly and tell us to update the SDK
documentation and expected behavior together.

What was deliberately removed

This leaves out the Dinit patches, Dinit package revision changes, service
fixtures, and production changes from #911 that are already on main through
#907. It also avoids rebuilding or republishing Dinit.

ABI and package impact

There is no ABI change. ABI 39, the ABI snapshot, generated bindings, syscall
behavior, and fork metadata are unchanged. There is no package revision,
published package artifact, binary index, or VFS image change. The build script
only emits raw Wasm controls under the local test-fixture directory.

Validation

Run inside scripts/dev-shell.sh:

  • bash -n scripts/build-programs.sh
  • Fresh wasm32 and wasm64 musl builds
  • Full scripts/build-programs.sh and rootfs builds
  • cd host && npx vitest run test/sjlj-noexcept-boundary.test.ts: 6 passed
  • Focused Chromium SjLj regression: 1 passed
  • cd host && npm run typecheck: passed
  • bash scripts/ci-check-browser-assets.sh: 92 imports resolved
  • bash scripts/check-abi-version.sh: passed
  • bash scripts/ci-run-test-suite.sh fork-instrument: passed
  • bash scripts/ci-run-test-suite.sh vitest: 1,379 passed, 2 expected
    failures, 26 skipped; Bun teardown also passed
  • Non-slow Chromium suite: the new test passed; overall 29 passed, 4 skipped,
    4 did not run, and 1 unrelated nginx demo failed because
    nginx-vfs.vfs.zst was not built in this local staging workspace
  • scripts/fetch-binaries.sh --fetch-only: resolved 71 of 79 packages, then
    reported the eight unpublished packages already missing from this checkout

GitHub Actions is green:

  • Staging run 29273971351 attempt 2 passed the browser, cargo-kernel,
    fork-instrument, libc, POSIX, Sortix, and Vitest suites plus the merge gates.
  • Browser demo smoke run 29273971574 passed.
  • The first staging attempt missed the existing Homebrew gallery fixture in
    Chromium. The exact fixture passed locally, and the browser-job rerun passed
    without a code change.

Not run locally: ./run.sh browser or the full libc/POSIX/Sortix suites.
Those conformance suites did run and pass in CI. Package rebuilds and
performance benchmarks were not run. This change does not alter runtime
semantics, the ABI, or package outputs, and it makes no performance claim.

Tracks #918.

Add raw wasm32/wasm64 and fork-instrumented controls for issue #918, plus a positive SIGCHLD child-reaping fixture. Cover the behavior in Node and Chromium and document the pinned LLVM 21 limitation without replaying Dinit production or package changes from #911.
@brandonpayton

Copy link
Copy Markdown
Member Author

Closing this issue-#918 follow-up because its raw and instrumented SjLj/noexcept controls, positive SIGCHLD fixture, browser coverage, and SDK limitation documentation are now carried by #934 at exact green head 260d75d5adc31b327f5591229dbfbb287d395fd6. Dinit production changes were deliberately excluded. The full staging and browser gates passed. This is not a claim that this branch was merged verbatim.

@brandonpayton
brandonpayton deleted the test/sjlj-noexcept-regression branch July 14, 2026 02:43
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