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 morestack support #27338

Merged
merged 1 commit into from
Aug 11, 2015
Merged

Commits on Aug 10, 2015

  1. Remove morestack support

    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 rust-lang#16012 (still need stack probes)
    Closes rust-lang#26458 (a drive-by fix to help diagnostics on stack overflow)
    alexcrichton committed Aug 10, 2015
    Configuration menu
    Copy the full SHA
    7a3fdfb View commit details
    Browse the repository at this point in the history