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

Rollup of 6 pull requests #128002

Merged
merged 24 commits into from
Jul 20, 2024
Merged

Rollup of 6 pull requests #128002

merged 24 commits into from
Jul 20, 2024

Commits on Jul 15, 2024

  1. Configuration menu
    Copy the full SHA
    0d508bb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    14430e6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9b80250 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2024

  1. abstract merge-base commit logic

    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    2b5a982 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2024

  1. unix: Unsafe-wrap stack_overflow::signal_handler

    sometimes a safety comment is a prayer.
    avoid fuzzy provenance casts after deref.
    
    Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
    workingjubilee and joboet committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    9e354da View commit details
    Browse the repository at this point in the history
  2. unix: lift init of sigaltstack before sigaction

    This is technically "not necessary", as we will "just" segfault instead
    if we e.g. arrive inside the handler fn with the null altstack. However,
    it seems incorrect to go about this hoping that segfaulting is okay,
    seeing as how our purpose here is to mitigate stack overflow problems.
    
    Make sure NEED_ALTSTACK syncs with PAGE_SIZE when we do.
    
    Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
    workingjubilee and joboet committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    357ba1f View commit details
    Browse the repository at this point in the history
  3. unix: Unsafe-wrap stack_overflow::cleanup

    Editorialize on the wisdom of this as we do.
    workingjubilee committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    fa628ce View commit details
    Browse the repository at this point in the history
  4. unix: Unsafe-wrap stack_overflow::{drop,make}_handler

    Note that current_guard is probably not unsafe for future work.
    workingjubilee committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    c1740ee View commit details
    Browse the repository at this point in the history
  5. unix: acquire-load NEED_ALTSTACK

    Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
    workingjubilee and joboet authored Jul 18, 2024
    Configuration menu
    Copy the full SHA
    529fcbc View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2024

  1. Configuration menu
    Copy the full SHA
    36ebf7a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d83da8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e9b3e9c View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2024

  1. Configuration menu
    Copy the full SHA
    3b7e4bc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e091c35 View commit details
    Browse the repository at this point in the history
  3. Split out test_remaining_match_pairs_after_or

    Only the last candidate can possibly have more match pairs, so this can be
    separate from the main or-candidate postprocessing loop.
    Zalathar committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    e60c5c1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    886668c View commit details
    Browse the repository at this point in the history
  5. Inline finalize_or_candidate

    Zalathar committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    239037e View commit details
    Browse the repository at this point in the history
  6. use precompiled rustdoc with CI rustc

    When CI rustc is enabled and rustdoc sources are unchanged, we can use
    the precompiled rustdoc from the CI rustc's sysroot. This speeds up
    bootstrapping quite a lot by avoiding unnecessary rustdoc compilation.
    
    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    0636293 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#127463 - onur-ozkan:precompiled-rustdoc, r=…

    …Kobzol
    
     use precompiled rustdoc with CI rustc
    
    When CI rustc is enabled and rustdoc sources are unchanged, we can use the precompiled rustdoc from the CI rustc's sysroot. This speeds up bootstrapping quite a lot by avoiding unnecessary rustdoc compilation.
    matthiaskrgr authored Jul 20, 2024
    Configuration menu
    Copy the full SHA
    3a9bfa3 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#127779 - momvart:should_codegen_hook, r=cjg…

    …illot
    
    Add a hook for `should_codegen_locally`
    
    This PR lifts the module-local function `should_codegen_locally` to `TyCtxt` as a hook.
    In addition to monomorphization, this function is used for checking the dependency of `compiler_builtins` on other libraries. Moving this function to the hooks also makes overriding it possible for the tools that use the rustc interface.
    matthiaskrgr authored Jul 20, 2024
    Configuration menu
    Copy the full SHA
    9a6f8cc View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#127843 - workingjubilee:break-up-big-ass-st…

    …ack-overflow-fn, r=joboet
    
    unix: document unsafety for std `sig{action,altstack}`
    
    I found many surprising elements here while trying to wrap a measly 5 functions with `unsafe`. I would rather not "just" mindlessly wrap this code with `unsafe { }`, so I decided to document it properly.
    
    On Unix, this code covers the "create and setup signal handler" part of the stack overflow code, and serves as the primary safety boundary for the signal handler. It is rarely audited, very gnarly, and worth extra attention. It calls other unsafe functions defined in this module, but "can we correctly map the right memory, or find the right address ranges?" are separate questions, and get increasingly platform-specific. The question here is the more general "are we doing everything in the correct order, and setting up the handler in the correct way?"
    
    As part of this audit, I noticed that we do some peculiar things that we should probably refrain from. However, I avoided making changes that I deemed might have a different final result in Rust programs. I did, however, reorder some events so that the signal handler is installed _after_ we install the alternate stack. We do not run much code between these events, but it is probably best if the timespan between the handler being available and the new stack being installed is 0 nanoseconds.
    matthiaskrgr authored Jul 20, 2024
    Configuration menu
    Copy the full SHA
    2ee3668 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#127873 - workingjubilee:forbid-unsafe-ops-f…

    …or-kmc-solid, r=Amanieu
    
    kmc-solid: `#![forbid(unsafe_op_in_unsafe_fn)]`
    
    The path logic _should_ handle the forbiddance in the itron sources correctly, despite them being an "out-of-line" module.
    matthiaskrgr authored Jul 20, 2024
    Configuration menu
    Copy the full SHA
    6b9982d View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#127917 - Zalathar:after-or, r=Nadrieril

    match lowering: Split `finalize_or_candidate` into more coherent methods
    
    I noticed that `finalize_or_candidate` was responsible for several different postprocessing tasks, making it difficult to understand.
    
    This PR aims to clean up some of the confusion by:
    - Extracting `remove_never_subcandidates` from `merge_trivial_subcandidates`
    - Extracting `test_remaining_match_pairs_after_or` from `finalize_or_candidate`
    - Taking what remains of `finalize_or_candidate`, and inlining it into its caller
    
    ---
    Reviewing individual commits and ignoring whitespace is recommended.
    
    Most of the large-looking changes are just moving existing code around, mostly unaltered.
    
    r? ``@Nadrieril``
    matthiaskrgr authored Jul 20, 2024
    Configuration menu
    Copy the full SHA
    d846e92 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#127964 - jieyouxu:rmake-rustfmt-skip, r=nne…

    …thercote
    
    run_make_support: skip rustfmt for lib.rs
    
    To avoid them getting reordered once rust-lang#125443 goes through.
    
    r? ``@nnethercote`` (since you were working on this)
    matthiaskrgr authored Jul 20, 2024
    Configuration menu
    Copy the full SHA
    8963855 View commit details
    Browse the repository at this point in the history