Skip to content

Runtime: a List index out of range exits with the panic status, and a fiber captures it (#2669) - #2734

Merged
ehartford merged 1 commit into
fix-2702from
fix-2669
Oct 26, 2026
Merged

ehartford merged 1 commit into
fix-2702from
fix-2669

Conversation

@ehartford

@ehartford ehartford commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

with_panic_core (rt_core.w) printed the panic and exited 1. Every other
panic (with_panic_ref, panic_runtime.w) exits 134, the status every
expect-exit: 134 fixture holds, and is captured for the awaiting task
inside a fiber. So xs.remove(5) exited 1 with "List index out of
bounds", unlike an index out of range (134). with_panic_core stays the
allocation-free path for the allocator's own panics (an invalid free, a
debug-alloc trap, a corrupt header, out of memory) and now exits 134; the
List index, SlotMap and interior-NUL panics go through with_panic_ref.

Test: test/behavior/behav_2669_list_index_panic_exits_134.w.

Closes #2669

@ehartford
ehartford added this pull request to stack #2743 October 26, 2026 04:07
@ehartford ehartford changed the title fix 2669 Runtime: a List index out of range exits with the panic status, and a fiber captures it (#2669) Oct 26, 2026
… fiber captures it (#2669)

with_panic_core (rt_core.w) printed the panic and exited 1. Every other
panic (with_panic_ref, panic_runtime.w) exits 134, the status every
`expect-exit: 134` fixture holds, and is captured for the awaiting task
inside a fiber. So `xs.remove(5)` exited 1 with "List index out of
bounds", unlike an index out of range (134). with_panic_core stays the
allocation-free path for the allocator's own panics (an invalid free, a
debug-alloc trap, a corrupt header, out of memory) and now exits 134; the
List index, SlotMap and interior-NUL panics go through with_panic_ref.

behav_str_to_cstr_interior_nul_panics.w pinned the interior-NUL panic at
exit 1, the status this fixes; it expects 134 now.

Test: test/behavior/behav_2669_list_index_panic_exits_134.w.
@ehartford
ehartford marked this pull request as ready for review October 26, 2026 04:31
@ehartford
ehartford merged commit ede3823 into main Oct 26, 2026
@ehartford
ehartford deleted the fix-2669 branch October 26, 2026 04:32
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.

Runtime: with_panic_core exits 1 (a List index panic is not exit 134 like every other panic) and is not fiber-aware

1 participant