Rollup of 7 pull requests#145785
Closed
samueltardieu wants to merge 14 commits intorust-lang:masterfrom
Closed
Conversation
Darwin's `read`/`write` syscalls emit `EINVAL` only when `nbyte > INT_MAX`. The case `nbyte == INT_MAX` is valid, so the subtraction can be removed.
Save a few instructions in `encode_utf8_raw_unchecked` by performing manual CSE.
Fixes an issue where if the underlying `Once` panics because it is poisoned, the panic displays the wrong message. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
To avoid workspace warnings.
…, r=ChrisDenton
std/sys/fd: Relax `READ_LIMIT` on Darwin
Darwin's `read`/`write` syscalls emit `EINVAL` only when `nbyte > INT_MAX`. The case `nbyte == INT_MAX` is valid, so the subtraction (`- 1`) in
```rust
const READ_LIMIT: usize = if cfg!(target_vendor = "apple") {
libc::c_int::MAX as usize - 1 // <- HERE
} else {
libc::ssize_t::MAX as usize
};
```
can be removed.
I tested that the case `nbyte == INT_MAX` is valid on various versions of macOS, including old one like Mac OS X 10.5.
The man page says:
- read() and pread() will fail if the parameter nbyte exceeds INT_MAX (link: https://keith.github.io/xcode-man-pages/read.2.html)
- write() and pwrite() will fail if the parameter nbyte exceeds INT_MAX (link: https://keith.github.io/xcode-man-pages/write.2.html)
Here are links to Darwin's code:
- [macOS 15.5] https://github.com/apple-oss-distributions/xnu/blob/e3723e1f17661b24996789d8afc084c0c3303b26/bsd/kern/sys_generic.c#L307
- [Mac OS X 10.2] https://github.com/apple/darwin-xnu/blob/d738f900846ed2d5f685e18bf85ce63b0176f61a/bsd/kern/sys_generic.c#L220
Related PR: rust-lang#38622.
…r=Amanieu Fix `LazyLock` poison panic message Fixes the issue raised in rust-lang#144872 (comment) r? `@Amanieu`
…f8, r=Mark-Simulacrum Optimize `char::encode_utf8` Save a few instructions in `encode_utf8_raw_unchecked` by performing manual CSE.
interpret/allocation: get_range on ProvenanceMap Helper method to grab all provenances in a given address range for an allocation, making some logic in Miri nicer.
…lt-opts-method, r=Kobzol Remove default opts from config We forgot to remove this method in rust-lang#145352. This PR removes that. r? `@Kobzol`
Do not warn about missing change ID in tarball builds Fixes: rust-lang#145778 r? `@jieyouxu`
Remove profile section from Clippy To avoid workspace warnings. [This](rust-lang#145749) subtree sync started causing warnings in Rust builds (rust-lang#145777) because of the `profile` section in Clippy's `Cargo.toml` file. This profile section was added in rust-lang/rust-clippy#13408 last year, and since it also caused issues then, it was later reverted. However, this change recently reappeared in [this commit](rust-lang/rust-clippy@90364dd), so it is again causing issues for rust-lang/rust. This PR removes the profile section again. Fixes: rust-lang#145777
Member
Author
Collaborator
This comment has been minimized.
This comment has been minimized.
rust-bors bot
added a commit
that referenced
this pull request
Aug 23, 2025
Rollup of 7 pull requests try-job: test-various
bors
added a commit
that referenced
this pull request
Aug 23, 2025
Rollup of 7 pull requests Successful merges: - #144452 (std/sys/fd: Relax `READ_LIMIT` on Darwin) - #145307 (Fix `LazyLock` poison panic message) - #145515 (Optimize `char::encode_utf8`) - #145540 (interpret/allocation: get_range on ProvenanceMap) - #145774 (Remove default opts from config) - #145780 (Do not warn about missing change ID in tarball builds) - #145781 (Remove profile section from Clippy) r? `@ghost` `@rustbot` modify labels: rollup
Collaborator
Member
|
FYI I had deliberately not created a rollup of these PRs so as to get the |
Member
Author
|
@jhpratt This rollup just started, feel free to raise the prio of rollup=never PRs and "retry" this one (or cancel it). I checked Zulip's rollup channel first and didn't see any notice. |
Member
Author
|
(I wanted to get #145781 in to get rid of those annoying warnings, but this is benign) |
Member
|
No worries as it's already being tested; I just thought I'd mention it for future reference. Admittedly I should have said something on Zulip. |
Contributor
Member
|
Sorry, #145780 (comment) had unsettled design questions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
READ_LIMITon Darwin #144452 (std/sys/fd: RelaxREAD_LIMITon Darwin)LazyLockpoison panic message #145307 (FixLazyLockpoison panic message)char::encode_utf8#145515 (Optimizechar::encode_utf8)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup