Skip to content

Abort in "assert_*" intrinsics #1222

Closed
@RalfJung

Description

@RalfJung

These three intrinsics should, IMO, abort instead of panic. The main reason we make them panic in rustc is that we want a good backtrace, and doing that from codegen is hard. But causing a panic is easy thanks to libcore having panic support, and std hooking into it.

But in Miri, we can show great backtraces on abort! So, there is no reason to use panics IMO. So I propose that we extend this with an abort message:

Abort,

and then cause an abort from the intrinsic.

@elichai that they would look into this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-shimsArea: This affects the external function shimsC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions