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

[beta] backports #118492

Merged
merged 7 commits into from
Dec 1, 2023
Merged

[beta] backports #118492

merged 7 commits into from
Dec 1, 2023

Commits on Dec 1, 2023

  1. Build pre-coroutine-transform coroutine body

    (cherry picked from commit 0ba7d19)
    compiler-errors authored and cuviper committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    20b2dbf View commit details
    Browse the repository at this point in the history
  2. Fix coroutine validation for mixed panic strategy

    Validation introduced in rust-lang#113124 allows UnwindAction::Continue and
    TerminatorKind::Resume to occur only in functions with ABI that can
    unwind. The function ABI depends on the panic strategy, which can vary
    across crates.
    
    Usually MIR is built and validated in the same crate. The coroutine drop
    glue thus far was an exception. As a result validation could fail when
    mixing different panic strategies.
    
    Avoid the problem by executing AbortUnwindingCalls along with the
    validation.
    
    (cherry picked from commit 5161b22)
    tmiasko authored and cuviper committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    ae0b24f View commit details
    Browse the repository at this point in the history
  3. Precommit test for rust-lang#118328.

    (cherry picked from commit b1a6cf4)
    aDotInTheVoid authored and cuviper committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    ebd43bd View commit details
    Browse the repository at this point in the history
  4. ConstProp: Remove const when rvalue check fails.

    (cherry picked from commit 9121a41)
    aDotInTheVoid authored and cuviper committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    cb4f87a View commit details
    Browse the repository at this point in the history
  5. Rename and add another test

    (cherry picked from commit 6e956c0)
    aDotInTheVoid authored and cuviper committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    98d3e99 View commit details
    Browse the repository at this point in the history
  6. Dispose llvm::TargetMachines prior to llvm::Context being disposed

    If the TargetMachine is disposed after the Context is disposed, it can
    lead to use after frees in some cases.
    
    I've observed this happening occasionally on code compiled for
    aarch64-pc-windows-msvc using `-Zstack-protector=strong` but other users
    have reported AVs from host aarch64-pc-windows-msvc compilers as well.
    
    (cherry picked from commit 3323e4d)
    wesleywiser authored and cuviper committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    76e6681 View commit details
    Browse the repository at this point in the history
  7. Update compiler/rustc_codegen_llvm/src/lib.rs

    Co-authored-by: Josh Stone <cuviper@gmail.com>
    (cherry picked from commit 1011078)
    wesleywiser authored and cuviper committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    6c45608 View commit details
    Browse the repository at this point in the history