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 8 pull requests #115459

Closed
wants to merge 19 commits into from
Closed

Rollup of 8 pull requests #115459

wants to merge 19 commits into from

Commits on Aug 1, 2023

  1. rustc_llvm: Link to zlib on dragonfly

    Alex Zepeda committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    14dd4e9 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2023

  1. Use pointers instead of usize addresses for landing pads

    This bring unwind and personality code more in line with strict-provenance
    niluxv committed Aug 6, 2023
    Configuration menu
    Copy the full SHA
    b462967 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2023

  1. rustc_llvm: Link zlib on cross Solaris builds

    On native builds `llvm-config` picks up `zlib` and this gets pased into
    the rust build tools, but on cross builds `llvm-config` is explicitly
    ignored as it contains information for the host system and cannot be
    trusted to be accurate for the target system.
    
    Both DragonFly and Solaris contain `zlib` in the base system, so this is
    both a safe assumption and required for a successful cross build unless
    `zlib` support is disabled in LLVM.
    
    This is more or less in the same vein as rust-lang#75713 and rust-lang#75655.
    Alex Zepeda committed Aug 8, 2023
    Configuration menu
    Copy the full SHA
    6ef7813 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2023

  1. Rewrite read_encoded_pointer conforming to strict provenance

    * Entries in the callsite table now use a dedicated function for reading an offset rather than a pointer
    * `read_encoded_pointer` uses that new function for reading offsets when the "application" part of the encoding indicates an offset (relative to some pointer)
    * It now errors out on nonsensical "application" and "value encoding" combinations
    
    Inspired by @eddyb's comment on zulip about this:
    <https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/strict.20provenance.20in.20dwarf.3A.3Aeh/near/276197290>
    niluxv committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    a10751f View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. Add alignment to the NPO guarantee

    As far as I know, this is always true already, but it's not in the text of the Option module docs, so I figured I'd bring this up to FCP it.
    scottmcm committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    107cd8e View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2023

  1. Use OnceLock for SingleCache

    Zoxc committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    90f5f94 View commit details
    Browse the repository at this point in the history
  2. kmc-solid: Directly delegate to net::is_interrupted in `std::sys::s…

    …olid::is_interrupted`
    kawadakk committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    dc37959 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eb627ea View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b62eeb2 View commit details
    Browse the repository at this point in the history
  5. Const-stabilize is_ascii

    scottmcm committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    570c312 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8198c59 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2023

  1. Rollup merge of rust-lang#114349 - inferiorhumanorgans:dragonfly-link…

    …-libz, r=cuviper
    
    rustc_llvm: Link to `zlib` on dragonfly and solaris
    
    On native builds `llvm-config` picks up `zlib` and this gets pased into
    the rust build tools, but on cross builds `llvm-config` is explicitly
    ignored as it contains information for the host system and cannot be
    trusted to be accurate for the target system.
    
    Both DragonFly and Solaris contain `zlib` in the base system, so this is
    both a safe assumption and required for a successful cross build unless
    `zlib` support is disabled in LLVM.
    
    This is more or less in the same vein as rust-lang#75713 and rust-lang#75655.
    fmease committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    04a1804 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#114534 - niluxv:strict_prov_unwind, r=cuviper

    Strict provenance unwind
    
    1. Turned many `usize`s in the personality/unwind code that are actually pointers into `*const u8`.
    2. Rewrote `read_encoded_pointer` to conform to strict-provenance, along the lines as described by `@eddyb` [in zulip some time ago](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/strict.20provenance.20in.20dwarf.3A.3Aeh/near/276197290).
    
    This should make supporting CHERI in the future easier (but they use a [slightly modified format in the callsite table](https://cheri-compiler-explorer.cl.cam.ac.uk/z/n6GhhW), which requires a CHERI specific modification to `find_eh_action`).
    fmease committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    99e3f3b View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#114845 - scottmcm:npo-align, r=WaffleLapkin

    Add alignment to the NPO guarantee
    
    This PR [changes](rust-lang#114845 (comment)) "same size" to "same size and alignment" in the option module's null pointer optimization docs in <https://doc.rust-lang.org/std/option/#representation>.
    
    As far as I know, this has been true for a long time in the actual rustc implementation, but it's not in the text of those docs, so I figured I'd bring this up to FCP it.
    
    I also see no particular reason that we'd ever *want* to have higher alignment on these.  In many of the cases it's impossible, as the minimum alignment is already the size of the type, but even if we *could* do things like on 32-bit we could say that `NonZeroU64` is 4-align but `Option<NonZeroU64>` is 8-align, I just don't see any value in doing that, so feel completely fine closing this door for the few things on which the NPO is already guaranteed.  These are basically all primitives, and should end up with the same size & alignment as those primitives.
    
    (There's no layout guarantee for something like `Option<[u8; 3]>`, where it'd be at least plausible to consider raising the alignment from 1 to 4 on, say, some hypothetical target that doesn't have efficient unaligned 4-byte load/stores.  And even if we ever did start to offer some kind of guarantee around such a type, I doubt we'd put it under the "null pointer" optimization header.)
    
    Screenshots for the new examples:
    ![image](https://github.com/rust-lang/rust/assets/18526288/a7dbff42-50b4-462e-9e27-00d511b58763)
    ![image](https://github.com/rust-lang/rust/assets/18526288/dfd55288-80fb-419a-bc11-26198c27f9f9)
    fmease committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    b2d98ab View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#115422 - Zoxc:cache-once-lock, r=cjgillot

    Use `OnceLock` for `SingleCache`
    
    This uses `OnceLock` for `SingleCache` instead of `Lock<Option<T>>` so lookups are lock-free.
    
    r? `@cjgillot`
    fmease committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    e808280 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#115427 - solid-rs:patch/kmc-solid/is-interr…

    …upted, r=cuviper
    
    kmc-solid: Fix `is_interrupted`
    
    Follow-up to rust-lang#115228. Fixes a build error in [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets.
    
    ```
    error[E0603]: function `is_interrupted` is private
      --> library\std\src\sys\solid\mod.rs:77:12
       |
    77 |     error::is_interrupted(code)
       |            ^^^^^^^^^^^^^^ private function
       |
    note: the function `is_interrupted` is defined here
      --> library\std\src\sys\solid\error.rs:35:1
       |
    35 | fn is_interrupted(er: abi::ER) -> bool {
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ```
    fmease committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    b9980f3 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#115429 - compiler-errors:assoc-ct-lt-fallth…

    …rough, r=cjgillot
    
    Fall through when resolving elided assoc const lifetimes
    
    `@QuineDot` makes a good point in rust-lang#115010 (comment) that we probably should not accept *more* code due to rust-lang#115011 even though that code will eventually become a forbid-warning in a few versions (rust-lang#115010 (comment)).
    
    Fall through when walking thru the `AnonymousWarnToStatic` (renamed to `AnonymousWarn`) rib so that we can resolve as a fresh lifetime like we did before.
    fmease committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    1f3174e View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#115449 - scottmcm:stable-const-is-ascii, r=…

    …ChrisDenton
    
    Const-stabilize `is_ascii`
    
    Resolves rust-lang#111090
    
    FCP completed in rust-lang#111090 (comment)
    fmease committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    43d963d View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#115456 - spastorino:spastorino-vacation, r=…

    …spastorino
    
    Add spastorino on vacation
    fmease committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    c08ad39 View commit details
    Browse the repository at this point in the history