summary refs log tree commit diff
path: root/src/libstd/sys/common/unwind
AgeCommit message (Collapse)AuthorLines
2016-01-06Add std::panic::propagateSteven Fackler-1/+1
2015-12-21Register new snapshotsAlex Crichton-11/+1
Lots of cruft to remove!
2015-11-18Fix buildbot failuresVadim Petrochenkov-0/+2
2015-11-18Add missing annotations and some testsVadim Petrochenkov-0/+6
2015-11-09std: Migrate to the new libcAlex Crichton-143/+40
* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself * Update all references to use `libc` as a result. * Update all references to the new flat namespace. * Moves all windows bindings into sys::c
2015-11-01Auto merge of #29177 - vadimcn:rtstuff, r=alexcrichtonbors-26/+59
Note: for now, this change only affects `-windows-gnu` builds. So why was this `libgcc` dylib dependency needed in the first place? The stack unwinder needs to know about locations of unwind tables of all the modules loaded in the current process. The easiest portable way of achieving this is to have each module register itself with the unwinder when loaded into the process. All modules compiled by GCC do this by calling the __register_frame_info() in their startup code (that's `crtbegin.o` and `crtend.o`, which are automatically linked into any gcc output). Another important piece is that there should be only one copy of the unwinder (and thus unwind tables registry) in the process. This pretty much means that the unwinder must be in a shared library (unless everything is statically linked). Now, Rust compiler tries very hard to make sure that any given Rust crate appears in the final output just once. So if we link the unwinder statically to one of Rust's crates, everything should be fine. Unfortunately, GCC startup objects are built under assumption that `libgcc` is the one true place for the unwind info registry, so I couldn't find any better way than to replace them. So out go `crtbegin`/`crtend`, in come `rsbegin`/`rsend`! A side benefit of this change is that rustc is now more in control of the command line that goes to the linker, so we could stop using `gcc` as the linker driver and just invoke `ld` directly.
2015-10-25std: Stabilize library APIs for 1.5Alex Crichton-2/+2
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-21Moar comments.Vadim Chugunov-17/+29
2015-10-18Create entry points for unwind frame registry in libstd.Vadim Chugunov-0/+21
2015-10-18Implement `eh_unwind_resume` in libstd.Vadim Chugunov-9/+9
2015-10-05Fix MSVC stage0 with landing pads enabledSimonas Kazlauskas-1/+11
2015-09-24Explicitly count the number of panicsAndrea Canciani-18/+4
Move the panic handling logic from the `unwind` module to `panicking` and use a panic counter to distinguish between normal state, panics and double panics.
2015-09-23Auto merge of #28585 - ranma42:simpler-panic, r=alexcrichtonbors-83/+5
This is part of some cleanup I did while investigating #28129. This also ensures that `on_panic` is run even if the user has registered too many callbacks.
2015-09-22Remove unwind::registerAndrea Canciani-69/+2
The `register` function is unstable and it is not used anymore, hence it can be removed (together with the now-unused `Callback` type and `static` variables).
2015-09-22Simplify inner_try in std::rt::unwind::tryAndrea Canciani-9/+11
Resolve the TLS PANICKING variable just once and re-use it as needed.
2015-09-22Simplify on_panic callback handlingAndrea Canciani-16/+5
The registration of `panicking::on_panic` as a general-purpose callback is overcomplicated and can fail. Instead, invoking it explicitly removes the need for locking and paves the way for further improvements.
2015-09-14Mark all extern functions as nounwindBjörn Steinbrink-0/+4
Unwinding across an FFI boundary is undefined behaviour, so we can mark all external function as nounwind. The obvious exception are those functions that actually perform the unwinding.
2015-09-11std: Internalize almost all of `std::rt`Alex Crichton-0/+922
This commit does some refactoring to make almost all of the `std::rt` private. Specifically, the following items are no longer part of its API: * DEFAULT_ERROR_CODE * backtrace * unwind * args * at_exit * cleanup * heap (this is just alloc::heap) * min_stack * util The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is an entry point for the `panic!` macro via the `begin_unwind` and `begin_unwind_fmt` reexports.