about summary refs log tree commit diff
path: root/src/libsyntax/errors
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-05-22 23:14:11 -0700
committerbors <bors@rust-lang.org>2016-05-22 23:14:11 -0700
commit6e455640950c4e8cb8bff919edb4854fcf7773ca (patch)
tree72c06cdbaf5c6dc34fc76b0c82c9e8d76a22ec4d /src/libsyntax/errors
parente24d621fcacf59fa8ecc1c1af1c4adeded4bddee (diff)
parentcfc386583291c8868d093d07431a57a20e69c944 (diff)
downloadrust-6e455640950c4e8cb8bff919edb4854fcf7773ca.tar.gz
rust-6e455640950c4e8cb8bff919edb4854fcf7773ca.zip
Auto merge of #31457 - lambda:rtabort-use-libc-abort, r=alexcrichton
Use libc::abort, not intrinsics::abort, in rtabort!

intrinsics::abort compiles down to an illegal instruction, which on
Unix-like platforms causes the process to be killed with SIGILL.  A more
appropriate way to kill the process would be SIGABRT; this indicates
better that the runtime has explicitly aborted, rather than some kind of
compiler bug or architecture mismatch that SIGILL might indicate.

For rtassert!, replace this with libc::abort.  libc::abort raises
SIGABRT, but is defined to do so in such a way that it will terminate
the process even if SIGABRT is currently masked or caught by a signal
handler that returns.

On non-Unix platforms, retain the existing behavior.  On Windows we
prefer to avoid depending on the C runtime, and we need a fallback for
any other platforms that may be defined.  An alternative on Windows
would be to call TerminateProcess, but this seems less essential than
switching to using SIGABRT on Unix-like platforms, where it is common
for the process-killing signal to be printed out or logged.

This is a [breaking-change] for any code that depends on the exact
signal raised to abort a process via rtabort!

cc #31273
cc #31333
Diffstat (limited to 'src/libsyntax/errors')
0 files changed, 0 insertions, 0 deletions