Skip to content

fix(runtime): list raising functions first in stacktraces - #24

Merged
mremond merged 2 commits into
mainfrom
fm/task-8b43ec71
Nov 14, 2026
Merged

mremond merged 2 commits into
mainfrom
fm/task-8b43ec71

Conversation

@mremond

@mremond mremond commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Why

Native exception handlers reported an outer caller instead of the raising function because captured stacktraces used the opposite order from BEAM.

What changed

  • Exception stacktraces put the raising function first, including traces inside exit reasons.
  • Self stack queries share that order, while crash reports retain raising-first output with an accurate header.
  • Regression checks cover native execution and BEAM, with an automatic uncaught-crash check on Linux and macOS.

Before and after

Before: A three-function call chain returned outermost-first caught traces; self stack queries did too, and crash reports described their order incorrectly.

After: The same chain returns inner, middle, outer on native Nera and BEAM; crash reports keep that order and label it correctly.

This changes runtime stacktrace lists and terminal crash output, not a graphical view; retained execution transcripts show the results.

Checked

Live validation: Awaiting live validation. This version and evidence need an independent review of coverage and proof.

  • Complete local gate at the proposed version: 2,156 Rust tests and 487 native tests passed; one Rust test was ignored and two external native tests were skipped. Clippy and allocator checks passed.
  • Consecutive regression runs: The edited runtime unit test, native fixture, BEAM fixture and committed crash-output check each passed ten consecutive runs without retries.
  • CI policy and cross-object checks: All policy tests and both cross-object smoke checks passed.
  • Independent review and product proof: The independently approved patch is unchanged; all five required live scenarios passed again after bringing the branch up to date.
  • Supervisor integration at the combined version: The existing supervisor fixture passed ten consecutive runs and a direct full-output check after incorporating the main-line fix.
How it was checked

Ordered release runtime, compiler and workspace builds passed.

cargo clippy --workspace --all-targets --locked -- -D warnings passed.

cargo test --workspace --locked --no-fail-fast passed: 2,156 tests, one ignored.

python3 scripts/test-allocator-config.py and nera test -j 1 --timeout 30 passed: 487 native tests, two external skips.

The exact edited unit test, native stacktrace_order fixture, committed crash check and OTP 29 fixture each passed ten consecutive runs.

The existing supervisor_shutdown fixture also passed ten consecutive native runs and a direct full-output check.

Both cross-object smoke checks passed; they do not establish execution on cross targets.

Every approved per-path added and removed line is unchanged; supervisor and performance expectations match main.

Risk

Risk above low: Blast radius, medium — Exception capture, self introspection and crash printing share the frame-order invariant.

Full risk assessment
Dimension Level Why
Blast radius medium Exception capture, self introspection and crash printing share the frame-order invariant.
Behavior low Corrects stacktrace order while preserving supplied traces and existing crash frame order.
Undo low Reverting the code restores the previous behavior without data migration.
Evidence low All five required scenarios and every edited test passed live at the proposed version.
Sensitivity low No saved data, accounts, keys, payments or release steps are involved.
Novelty low Small changes to existing readers share the existing compact-frame conversion.
Dependencies low No dependencies were added or changed.

@github-actions github-actions Bot added this to the 0.1.1 milestone Nov 13, 2026
@mremond
mremond force-pushed the fm/task-8b43ec71 branch 2 times, most recently from 27b0835 to cca49e6 Compare November 13, 2026 20:55
@mremond
mremond merged commit 4f4b134 into main Nov 14, 2026
21 checks passed
@mremond
mremond deleted the fm/task-8b43ec71 branch November 15, 2026 14:05
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