about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2015-09-24 17:21:29 +0200
committerAndrea Canciani <ranma42@gmail.com>2015-09-24 23:52:13 +0200
commit54c0231b14a71a46e6607255d509457e0df0b8be (patch)
tree41ef410ea263c71bb40005b6aae4c4fbf3615f4a /src/libstd/sys/unix/stack_overflow.rs
parentc7b84909b00dcf5f762778b4aa9783770c69416d (diff)
downloadrust-54c0231b14a71a46e6607255d509457e0df0b8be.tar.gz
rust-54c0231b14a71a46e6607255d509457e0df0b8be.zip
Abort earlier upon multi-panics
The double-panic `abort` is run after the logging code, to provide
feedback in case of a double-panic. This means that if the panic
logging fails with a panic, the `abort` might never be reached.

This should not normally occur, but if the `on_panic` function detects
more than 2 panics, aborting *before* logging makes panic handling
somewhat more robust, as it avoids an infinite recursion, which would
eventually crash the process, but also make the problem harder to
debug.

This handles the FIXME about what to do if the thread printing panics.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions