Rollup of 20 pull requests - #160190
Conversation
This is also how it is done on other platforms.
This optimization was already partially in place, but not used. Other platforms already do this.
Previously, we read all entries into a huge initialized buffer up front, which does not work correctly since on Hermit 0.12, getdents64 behaves more reasonable and does no longer fail on buffers which cannot hold all entries. Additionally, for each new entry, we started searching for the current position from the start instead of just saving the position directly. The new design uses a fixed-size uninitialized buffer that is read into as necessary. Co-authored-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
While Hermit does not return these yet, it will do so in the future.
fix: give reason before the issue number
…-reentrancy-159923.rs`
Currently a Rust CFI failure only inserts a ud2. However, for clang
we have the option for a helpful diagnostic message that explains the
violation and is especially helpful for fixing it. This message works
through hooking the UBSan runtime and calling into it with the
necessary information for a helpful error message. In clang, this is
enabled via -fno-sanitize-trap=cfi.
This change adds the same behavior to rustc's CFI. Instead of a
no-sanitize-trap flag, we added -Z cfi-mode={diag|trap}, with trap
as the default. The diag mode will print the following error message
for a violation:
```
tests/ui/sanitizer/cfi/fn-ptr-type-mismatch.rs:1:1: runtime error: control flow integrity check for type fn(i32, i32) -> i32 failed during indirect function call
fn_ptr_type_mismatch.ecd806f409c5c1fc-cgu.0: note: fn_ptr_type_mismatch::add_one defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tests/ui/sanitizer/cfi/fn-ptr-type-mismatch.rs:1:1
```
…over={false,true}
…span `missing_items_err` has logic to figure out where in the impl to insert suggestions. Factor that logic out into a function to support reusing it.
`missing_items_err` has logic to compute a set of suggestions regarding the missing items. Factor that logic out into a function to support reusing it.
As with the suggestions for mandatory trait methods, provide suggestions
for `must_implement_one_of`, which include the signatures of the trait
methods. This makes it easy to copy-paste the signatures into the impl
block.
Invoke the same logic from `check_drop_xor_pin_drop`, to provide
suggestions with the signatures of `drop` and `pin_drop`.
Without this change:
```
error[E0046]: not all trait items implemented, missing one of: `read`, `read_buf`
--> src/main.rs:3:1
|
3 | impl std::io::Read for R {
| ^^^^^^^^^^^^^^^^^^^^^^^^ missing one of `read`, `read_buf` in implementation
For more information about this error, try `rustc --explain E0046`.
```
With this change:
```
error[E0046]: not all trait items implemented, missing one of: `read`, `read_buf`
--> src/main.rs:3:1
|
3 | impl std::io::Read for R {
| ^^^^^^^^^^^^^^^^^^^^^^^^ missing one of `read`, `read_buf` in implementation
|
= help: implement the missing item: `fn read(&mut self, _: &mut [u8]) -> Result<usize, std::io::Error> { todo!() }`
= help: implement the missing item: `fn read_buf(&mut self, _: BorrowedCursor<'_, u8>) -> Result<(), std::io::Error> { todo!() }`
For more information about this error, try `rustc --explain E0046`.
```
CC [Wine bug 60084](https://bugs.winehq.org/show_bug.cgi?id=60084) CC tokio-rs/mio#1980 Wine's `WSAStartup`/`WSACleanup` are currently not thread-safe (though they probably should be, which is why I reported an upstream bug). Before rust-lang#141809 (and Rust 1.90), Rust used to call `WSAStartup` at most once. This PR restores that behavior. I believe that this is not a regression for real Windows, since the hot path of a `Once` already having executed is well-optimized, it's just one atomic load, like before.
… having a `OnceLock` around it for parallel import resolution
Deeply nested associated-type projections used to ICE with "type variables should not be hashed" under incremental compilation; they now produce ordinary trait-bound errors. Uses `//@ incremental` so the crash path is exercised.
rust-lang#158547 moved `std::io::BufWriter` to `alloc::io::BufWriter`. That allows it to be used in `no-std` configurations, and in particular on platforms where unwinding isn't supported. However one of the doc tests uses `catch_unwind`, which fails on platforms which cannot unwind. Fix this by copying the magic incantation from a similar doctest in library/core/src/range.rs
|
No apparent cause. @bors try jobs=dist-x86_64-msvc |
This comment has been minimized.
This comment has been minimized.
Rollup of 20 pull requests try-job: dist-x86_64-msvc
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
@bors retry (pending try run outcome) |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 83709ee (parent) -> be3d26d (this PR) Test differencesShow 186 test diffsStage 1
Stage 2
Additionally, 110 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard be3d26db984c6f96335faca1f254dc04873cb1c1 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
📌 Perf builds for each rolled up PR:
previous master: 83709eedff In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
|
Finished benchmarking commit (be3d26d): comparison URL. Overall result: ❌ regressions - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.6%, secondary -0.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -0.1%, secondary -2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 491.471s -> 489.155s (-0.47%) |
Successful merges:
unsupported()instead offrom_raw_os_error(22)#158247 (hermit/fs: Returnunsupported()instead offrom_raw_os_error(22))readdir()#158649 (Hermit: fixreaddir())needs-unwindannotation toadd-spawn-hook-reentrancy-159923test #160101 (Add missingneeds-unwindannotation toadd-spawn-hook-reentrancy-159923test)must_implement_one_of#160106 (Add suggestions formust_implement_one_of)errors.rsfile todiagnostics.rs(15/N) #160148 (Renameerrors.rsfile todiagnostics.rs(15/N))f16/f128Fromimpls #160166 (Use correct feature gates forf16/f128Fromimpls)va_startintrinsic #160178 (Remove unusedva_startintrinsic)r? @ghost
Create a similar rollup