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

Don't spill operands onto the stack in naked functions #75417

Merged
merged 2 commits into from
Aug 14, 2020

Commits on Aug 11, 2020

  1. Revert "Suppress debuginfo on naked function arguments"

    This reverts commit 2567074.
    
    This commit does not actually fix the problem. It merely removes the name of
    the argument from the LLVM output. Even without the name, Rust codegen still
    spills the (nameless) variable onto the stack which is the root cause. The root
    cause is solved in the next commit.
    npmccallum committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    0356bb9 View commit details
    Browse the repository at this point in the history
  2. Don't spill operands onto the stack in naked functions

    Currently, the code spills operands onto the stack for the purpose of
    debuginfo. However, naked functions can only contain an asm block. Therefore,
    attempting to spill the operands on the stack is undefined behavior.
    
    Fixes rust-lang#42779
    cc rust-lang#32408
    npmccallum committed Aug 11, 2020
    Configuration menu
    Copy the full SHA
    050fb38 View commit details
    Browse the repository at this point in the history