Skip to content

Commit 91611fc

Browse files
committed
Let libpanic_abort call into libc's abort() on CloudABI.
Ideally, we should make use of CloudABI's internal proc_raise(SIGABRT) system call. POSIX abort() requires things like flushing of stdios, which may not be what we want under panic conditions. Invoking the raw CloudABI system call would have prevented that. Unfortunately, we have to make use of the "cloudabi" crate to invoke raw CloudABI system calls. This is undesired, as discussed in the pull request (#47190).
1 parent 9a8f0a8 commit 91611fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libpanic_abort/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8),
5353
pub unsafe extern fn __rust_start_panic(_data: usize, _vtable: usize) -> u32 {
5454
abort();
5555

56-
#[cfg(unix)]
56+
#[cfg(any(unix, target_os = "cloudabi"))]
5757
unsafe fn abort() -> ! {
5858
extern crate libc;
5959
libc::abort();

0 commit comments

Comments
 (0)