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

wasm: Increase default stack size to 1MB #50083

Merged
merged 1 commit into from
Apr 20, 2018

Commits on Apr 19, 2018

  1. wasm: Increase default stack size to 1MB

    This commit increases the dfeault stack size allocated to the
    wasm32-unknown-unknown target to 1MB by default. Currently the default stack
    size is one wasm page, or 64 kilobytes. This default stack is quite small and
    has caused a stack overflow or two in the wild by accident.
    
    The current "best practice" for fixing this is to pass `-Clink-args='-z
    stack-size=$bigger'` but that's not great nor always easy to do. A default of
    1MB matches more closely with other platforms where it's "pretty big" by
    default.
    
    Note that it was tested and if the users uses `-C link-args` to pass a custom
    stack size that's still resepected as lld seems to take the first argument, and
    where rustc is passing it will always be last.
    alexcrichton committed Apr 19, 2018
    Configuration menu
    Copy the full SHA
    e58629b View commit details
    Browse the repository at this point in the history