about summary refs log tree commit diff
path: root/src/libstd/sys_common/thread_info.rs
AgeCommit message (Collapse)AuthorLines
2018-03-18rustc_driver: get rid of extra thread on UnixTatsuyuki Ishi-0/+4
2018-01-31Use a range to identify SIGSEGV in stack guardsJosh Stone-4/+5
Previously, the `guard::init()` and `guard::current()` functions were returning a `usize` address representing the top of the stack guard, respectively for the main thread and for spawned threads. The `SIGSEGV` handler on `unix` targets checked if a fault was within one page below that address, if so reporting it as a stack overflow. Now `unix` targets report a `Range<usize>` representing the guard memory, so it can cover arbitrary guard sizes. Non-`unix` targets which always return `None` for guards now do so with `Option<!>`, so they don't pay any overhead. For `linux-gnu` in particular, the previous guard upper-bound was `stackaddr + guardsize`, as the protected memory was *inside* the stack. This was a glibc bug, and starting from 2.27 they are moving the guard *past* the end of the stack. However, there's no simple way for us to know where the guard page actually lies, so now we declare it as the whole range of `stackaddr ± guardsize`, and any fault therein will be called a stack overflow. This fixes #47863.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-2/+2
Like #43008 (f668999), but _much more aggressive_.
2017-07-10Use LocalKey::try_with in stdLee Bousfield-8/+3
2017-03-13std: remove a workaround for privacy limitations that isn't necessary anymoreSean Gillespie-6/+1
2016-11-01std: Move sys_common to libstd/sys_commonBrian Anderson-0/+61
Make the directory structure reflect the module structure. I've always found the existing structure confusing.