Stabilize `intrinsics::abort` in `core`
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
I would like to see intrinsics::abort stabilized in some form as it's useful in some cases to have
panicking behavior (and alloc_error) = abort (minimizes code size and the abort exception / signal
can be handled elsewhere or in a upper abstraction layer).
As intrinsics::abort lowers to a trap instruction on most architectures (*) I propose we add a
safe wrapper around it in core::arch::$ARCH for the architectures where it does.
(*) On most but not on all. For example, On MSP430 it lowers to a call to the abort function
which results in a linker error unless that symbol is defined somewhere in the dependency graph.
(Related: There's std::process::abort which claims to be a safe wrapper around intrinsics::abort
but if you at its implementation it is, in fact, not just a wrapper around intrinsics::abort but
something completely different.)
@rust-lang/libs what would be needed to move this forward? An full RFC, or just a PR + FCP?
cc @Amanieu @glandium
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposal for stabilizing intrinsics::abort, including the suggested core::arch::$ARCH wrappers and the distinction from std::process::abort. The issue does not identify files or tests; work is not ready to begin until the required RFC or PR-plus-FCP path and supported architectures are decided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100