about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
AgeCommit message (Collapse)AuthorLines
2015-11-01Use guard-pages also on DragonFly/FreeBSD.Michael Neumann-0/+4
Only tested on DragonFly.
2015-09-26Add support for the rumprun unikernelSebastian Wicki-2/+2
For most parts, rumprun currently looks like NetBSD, as they share the same libc and drivers. However, being a unikernel, rumprun does not support process management, signals or virtual memory, so related functions might fail at runtime. Stack guards are disabled exactly for this reason. Code for rumprun is always cross-compiled, it uses always static linking and needs a custom linker.
2015-09-11std: Internalize almost all of `std::rt`Alex Crichton-1/+1
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.
2015-09-04Add ptr import (fixup #28187)Manish Goregaokar-1/+1
2015-09-03Use `null()`/`null_mut()` instead of `0 as *const T`/`0 as *mut T`Vadim Petrochenkov-2/+2
2015-08-11Register new snapshotsAlex Crichton-3/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-10Remove morestack supportAlex Crichton-39/+33
This commit removes all morestack support from the compiler which entails: * Segmented stacks are no longer emitted in codegen. * We no longer build or distribute libmorestack.a * The `stack_exhausted` lang item is no longer required The only current use of the segmented stack support in LLVM is to detect stack overflow. This is no longer really required, however, because we already have guard pages for all threads and registered signal handlers watching for a segfault on those pages (to print out a stack overflow message). Additionally, major platforms (aka Windows) already don't use morestack. This means that Rust is by default less likely to catch stack overflows because if a function takes up more than one page of stack space it won't hit the guard page. This is what the purpose of morestack was (to catch this case), but it's better served with stack probes which have more cross platform support and no runtime support necessary. Until LLVM supports this for all platform it looks like morestack isn't really buying us much. cc #16012 (still need stack probes) Closes #26458 (a drive-by fix to help diagnostics on stack overflow)
2015-08-03syntax: Implement #![no_core]Alex Crichton-1/+3
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-07-01Add netbsd amd64 supportAlex Newman-0/+2
2015-06-22sys/unix: Consolidate signal-handling FFI bindingsGeoffrey Thomas-136/+5
Both c.rs and stack_overflow.rs had bindings of libc's signal-handling routines. It looks like the split dated from #16388, when (what is now) c.rs was in libnative but not libgreen. Nobody is currently using the c.rs bindings, but they're a bit more accurate in some places. Move everything to c.rs (since I'll need signal handling in process.rs, and we should avoid duplication), clean up the bindings, and manually double-check everything against the relevant system headers (fixing a few things in the process).
2015-04-27std: Don't assume thread::current() works on panicAlex Crichton-1/+1
Inspecting the current thread's info may not always work due to the TLS value having been destroyed (or is actively being destroyed). The code for printing a panic message assumed, however, that it could acquire the thread's name through this method. Instead this commit propagates the `Option` outwards to allow the `std::panicking` module to handle the case where the current thread isn't present. While it solves the immediate issue of #24313, there is still another underlying issue of panicking destructors in thread locals will abort the process. Closes #24313
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-3/+3
Now that support has been removed, all lingering use cases are renamed.
2015-03-18Fix private module loophole in the 'private type in public item' checkNick Cameron-3/+3
2015-03-12std: Remove #[allow] directives in sys modulesAlex Crichton-1/+0
These were suppressing lots of interesting warnings! Turns out there was also quite a bit of dead code.
2015-02-11fixing PR review commentsDave Huseby-4/+1
2015-02-11fixing trailing whitespace errorsDave Huseby-1/+1
2015-02-11bitrig integrationDave Huseby-4/+11
2015-02-01openbsd supportSébastien Marie-3/+20
2015-01-30Remove all `i` suffixesTobias Bucher-3/+3
2015-01-17Register new snapshots.Eduard Burtescu-4/+2
2015-01-11powerpc: Fixup more stack workRicho Healey-0/+1
2015-01-08Rename `target_word_size` to `target_pointer_width`Nick Cameron-2/+4
Closes #20421 [breaking-change]
2015-01-03Initial version of AArch64 support.Akos Kiss-1/+2
Adds AArch64 knowledge to: * configure, * make files, * sources, * tests, and * documentation.
2015-01-02Fallout - change array syntax to use `;`Nick Cameron-2/+2
2014-12-26Require types to opt-in SyncFlavio Percoco-1/+1
2014-12-18Fallout from new thread APIAaron Turon-23/+9
2014-12-18libs: merge librustrt into libstdAaron Turon-0/+291
This commit merges the `rustrt` crate into `std`, undoing part of the facade. This merger continues the paring down of the runtime system. Code relying on the public API of `rustrt` will break; some of this API is now available through `std::rt`, but is likely to change and/or be removed very soon. [breaking-change]