]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #72204 - RalfJung:abort, r=Mark-Simulacrum
authorbors <bors@rust-lang.org>
Sun, 17 May 2020 12:49:01 +0000 (12:49 +0000)
committerbors <bors@rust-lang.org>
Sun, 17 May 2020 12:49:01 +0000 (12:49 +0000)
make abort intrinsic safe, and correct its documentation

Turns out `std::process::abort` is not the same as the intrinsic, the comment was just wrong. Quoting from the unix implementation:
```
// On Unix-like platforms, libc::abort will unregister signal handlers
// including the SIGABRT handler, preventing the abort from being blocked, and
// fclose streams, with the side effect of flushing them so libc buffered
// output will be printed.  Additionally the shell will generally print a more
// understandable error message like "Abort trap" rather than "Illegal
// instruction" that intrinsics::abort would cause, as intrinsics::abort is
// implemented as an illegal instruction.
```

1  2 
src/liballoc/rc.rs
src/liballoc/sync.rs

Simple merge
Simple merge