-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
interpret: remove support for uninitialized scalars #100043
Conversation
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
7a5c415
to
c006f64
Compare
⌛ Trying commit c006f64b0d9e4619f0f5983be5c249e99d0b5b70 with merge a8425075041d4b9af9bf32e2a267dfb9db2cfffb... |
☀️ Try build successful - checks-actions |
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
c006f64
to
29193dd
Compare
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
Most of these failures are due to "Failed to get rustc version" in the libc build script... what is going on there? That can't be this PR. Out of the 10 I have checked so far, all 10 show that error. Is there some way that we don't have to check >600 regressions manually for whether they are all the same spurious failure...? |
I downloaded the 'regressed' logs, removed the spurious libc things, spurious syn build failures ("trait X does not implement Y"), and some strange spurious "file not found for module", and went through the rest by hand, and they are all spurious. |
Just to help diagnose the crater issue: |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
@craterbot p=1 |
📝 Configuration of the ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
@Dylan-DPC so far all I can see there are Miri build failures, which are expected and allowed. |
@bors r+ rollup=never |
☀️ Test successful - checks-actions |
Tested on commit rust-lang/rust@2b443a8. Direct link to PR: <rust-lang/rust#100043> 💔 miri on windows: test-pass → build-fail (cc @RalfJung @oli-obk). 💔 miri on linux: test-pass → build-fail (cc @RalfJung @oli-obk).
adjust for earlier init checking in the core engine Miri side of rust-lang/rust#100043
Finished benchmarking commit (2b443a8): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
Some improvements, some regressions, does that count as them being canceled out so overall we are good?^^ The code became simpler than before so I don't quite understand why this would slow anything down. |
Looks like html5ever-0.26.0 has become noisy and the improvements here are making up for regressions seen in the last PR (and thus unlikely to be due to the changes here). The regressions in secondary benchmarks seem to be more real though. Looks like the most impacted query is Here's a run of cachegrind diff on one of the regressions:
Could it be more allocations happening in the validity visitor? |
remove an ineffective check in const_prop Based on rust-lang#100043, only the last two commits are new. ConstProp has a special check when reading from a local that prevents reading uninit locals. However, if that local flows into `force_allocation`, then no check fires and evaluation proceeds. So this check is not really effective at preventing accesses to uninit locals. With rust-lang#100043, `read_immediate` and friends always fail when reading uninit locals, so I don't see why ConstProp would need a separate check. Thus I propose we remove it. This is needed to be able to do rust-lang#100085.
Ah! Yes there is an unconditional |
Given the results of the fix PR being positive, I'm going to mark this as triaged. @rustbot label: +perf-regression-triaged |
interpret: fix unnecessary allocation in validation visitor Should fix the perf regression introduced by rust-lang#100043. r? `@oli-obk`
interpret: fix unnecessary allocation in validation visitor Should fix the perf regression introduced by rust-lang/rust#100043. r? `@oli-obk`
interpret: fix unnecessary allocation in validation visitor Should fix the perf regression introduced by rust-lang/rust#100043. r? `@oli-obk`
With Miri no longer supporting
-Zmiri-allow-uninit-numbers
, we no longer need to support storing uninit data in aScalar
. We anyway already only use this representation for types with initializedScalar
layout (and we have to, due to partial initialization), so let's get rid of theScalarMaybeUninit
type entirely.I tried to stage this into meaningful commits, but the one that changes
read_immediate
to always trigger UB on uninit is the largest chunk of the PR and I don't see how it could be subdivided.Fixes rust-lang/miri#2187
r? @oli-obk