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).
This commit is contained in:
parent
9a8f0a8cb0
commit
91611fc3d0
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8),
|
|||
pub unsafe extern fn __rust_start_panic(_data: usize, _vtable: usize) -> u32 {
|
||||
abort();
|
||||
|
||||
#[cfg(unix)]
|
||||
#[cfg(any(unix, target_os = "cloudabi"))]
|
||||
unsafe fn abort() -> ! {
|
||||
extern crate libc;
|
||||
libc::abort();
|
||||
|
|
Loading…
Add table
Reference in a new issue