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

cranelift: Round inline stack probes down, not up #8397

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Apr 17, 2024

  1. cranelift: Round inline stack probes down, not up

    When we have `enable_probestack` turned on and set `probestack_strategy`
    to "inline", we have to compute how many pages of the stack we'll probe.
    
    The current implementation rounds our stack frame size up to the nearest
    multiple of the page size, then probes each page once.
    
    However, if our stack frame is not a multiple of the page size, that
    means there's a partial page at the end. It's not necessary to probe
    that partial page, just like it's unnecessary to probe at all if the
    frame is smaller than one page. Either way, any signal handler needs to
    be prepared for stack accesses on that last page to fault at any time
    during the function's execution.
    jameysharp committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    402ae99 View commit details
    Browse the repository at this point in the history