Skip to content

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

Closed

Description

@ehartford

Found fixing #996. with_panic_core (rt/rt_core.w) prints panic: … and the backtrace, then rt_exit(1). with_panic / with_panic_ref (rt/panic_runtime.w) exit 134, and the suite holds 134 as the panic exit (behav_array_index_bounds_panics.w, behav_slice_index_bounds_panics.w, every //! expect-exit: 134 panic fixture). with_panic_core is also not fiber-aware: inside a fiber it exits the process instead of capturing the panic for the awaiting task as with_panic_ref does.

Its callers include List index out of bounds (rt_core.w, two sites). A List index out of range therefore exits 1, while an array or slice index out of range exits 134. A test harness or shell script that checks for the panic status sees an ordinary failure.

Expected: one panic convention. with_panic_core routes through with_panic_ref (exit 134, fiber capture), or its callers call that directly.

Activity

  1. ehartford commented on Oct 26, 2026

    @ehartford
    ContributorAuthor

    Fixed on main by ede3823 (stack #2743, battery GREEN on its top ddb68e8: behavior-tests 1949/1949, gate, uat and battery-checks green).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions