diff options
| author | Ed Schouten <ed@nuxi.nl> | 2018-01-05 22:16:54 +0100 |
|---|---|---|
| committer | Ed Schouten <ed@nuxi.nl> | 2018-01-05 22:16:54 +0100 |
| commit | 91611fc3d0ee8a7a0a7accff4377e3a21fd7b6c4 (patch) | |
| tree | 83290036063c621dce44b582c9121fa639613acd | |
| parent | 9a8f0a8cb050e647fc146363d6558a6c17155ce5 (diff) | |
| download | rust-91611fc3d0ee8a7a0a7accff4377e3a21fd7b6c4.tar.gz rust-91611fc3d0ee8a7a0a7accff4377e3a21fd7b6c4.zip | |
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).
| -rw-r--r-- | src/libpanic_abort/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libpanic_abort/lib.rs b/src/libpanic_abort/lib.rs index 29a9e1aadaf..c3bd6a2bc18 100644 --- a/src/libpanic_abort/lib.rs +++ b/src/libpanic_abort/lib.rs @@ -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(); |
