u-skip-main-thread-stack-guard
authorRust Maintainers <pkg-rust-maintainers@lists.alioth.debian.org>
Tue, 25 Jul 2017 21:19:47 +0000 (22:19 +0100)
committerXimin Luo <infinity0@debian.org>
Tue, 25 Jul 2017 21:19:47 +0000 (22:19 +0100)
commit2ab7a1391753dd86fe272de9e6aaed5bbc93e1e7
tree9f280a60799e19258a0f8b2a6f8f7e3ec2a1d3cb
parent75ec8088155b283fd9cfcf4d8b200df2821f4cdf
u-skip-main-thread-stack-guard

commit be509b3387aebb453b09a4942cf902c7d05a0f1e
Author: Josh Stone <jistone@redhat.com>
Date:   Wed Jul 5 12:03:17 2017 -0700

    Skip the main thread's manual stack guard on Linux

    Linux doesn't allocate the whole stack right away, and the kernel has
    its own stack-guard mechanism to fault when growing too close to an
    existing mapping.  If we map our own guard, then the kernel starts
    enforcing a rather large gap above that, rendering much of the possible
    stack space useless.

    Instead, we'll just note where we expect rlimit to start faulting, so
    our handler can report "stack overflow", and trust that the kernel's own
    stack guard will work.

    Fixes #43052.

Gbp-Pq: Name u-skip-main-thread-stack-guard.patch
src/libstd/sys/unix/thread.rs