-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.WG-embeddedWorking group: Embedded systemsWorking group: Embedded systems
Description
It seems like core
knows how to abort a program (it has core::intrinsics::abort
), but only std
exposes this functionality.
In some rare cases, a potentially unwinding panic might lead to unsoundness, where an abort would do a better job. A good example is the implementation of Arc
.
The very same situation occurs in the atomic_refcell
crate. As there is nothing else in the crate depending on std
it should be a no_std
crate. However, that change replaces the std
exit/abort call with an ugly hack using a double-panic to try to cause an abort.
Instead, a stable abort
function in core
would be a lot nicer.
Aaron1011, jonas-schievink, orlp, Techcable, finnbear and 1 more
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.WG-embeddedWorking group: Embedded systemsWorking group: Embedded systems