Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove fixed_stack_segment #10407

Merged
merged 2 commits into from
Nov 11, 2013
Merged

Commits on Nov 11, 2013

  1. Remove #[fixed_stack_segment] and #[rust_stack]

    These two attributes are no longer useful now that Rust has decided to leave
    segmented stacks behind. It is assumed that the rust task's stack is always
    large enough to make an FFI call (due to the stack being very large).
    
    There's always the case of stack overflow, however, to consider. This does not
    change the behavior of stack overflow in Rust. This is still normally triggered
    by the __morestack function and aborts the whole process.
    
    C stack overflow will continue to corrupt the stack, however (as it did before
    this commit as well). The future improvement of a guard page at the end of every
    rust stack is still unimplemented and is intended to be the mechanism through
    which we attempt to detect C stack overflow.
    
    Closes rust-lang#8822
    Closes rust-lang#10155
    alexcrichton committed Nov 11, 2013
    Configuration menu
    Copy the full SHA
    7755ffd View commit details
    Browse the repository at this point in the history
  2. Decrease the default stack size back to 2MB

    I increased this to 4MB when I implemented abort-on-stack-overflow for Rust
    functions. Now that the fixed_stack_segment attribute is removed, no rust
    function will ever reasonably request 2MB of stack (due to calling an FFI
    function).
    
    The default size of 2MB should be plenty for everyday use-cases, and tasks can
    still request more stack via the spawning API.
    alexcrichton committed Nov 11, 2013
    5 Configuration menu
    Copy the full SHA
    1f19243 View commit details
    Browse the repository at this point in the history