Open
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.