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

read_via_copy: don't prematurely optimize away the read #115531

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Sep 4, 2023

Always do the read to ensure consistent UB error messages in const-eval/Miri.

r? @scottmcm

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 4, 2023
@rustbot
Copy link
Collaborator

rustbot commented Sep 4, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@RalfJung
Copy link
Member Author

RalfJung commented Sep 4, 2023

Something is broken with CI, everything fails with Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_9df9ab2c-c8c6-4350-906b-1888c557ad16/584cf8e8-7843-48e0-9221-d6f46700efee.tar.gz. return code: 2..
@bors treeclosed=100

@rust-log-analyzer

This comment has been minimized.


const BAD_BAD_ARRAY: [Bar; 1] = unsafe { MaybeUninit { uninit: () }.init };
//~^ ERROR evaluation of constant value failed
//~| constructing invalid value


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hyper-nit: extra blank lines in here

@scottmcm
Copy link
Member

scottmcm commented Sep 4, 2023

FYI @WaffleLapkin, who sortof-suggested removing the assignment in #109035 (comment)

But this PR is a good answer for why it shouldn't be removed, so the change LGTM.

@bors r+

@bors
Copy link
Contributor

bors commented Sep 4, 2023

📌 Commit 7093903 has been approved by scottmcm

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2023
@bors
Copy link
Contributor

bors commented Sep 4, 2023

⌛ Testing commit 7093903 with merge ac542f7fbb011f3811c032e3b3faa0642161a126...

@bors
Copy link
Contributor

bors commented Sep 4, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 4, 2023
@ehuss
Copy link
Contributor

ehuss commented Sep 4, 2023

@bors retry

GitHub checkout failed

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2023
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v3' (SHA:f43a0e5ff2bd294095638e18286ca9a3d1956744)
##[error]Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_ac181360-3d12-41f2-ada0-882bd3bf1425/81eb450d-8849-429c-b079-ddc42e08edbe.tar.gz. return code: 2.

@bors
Copy link
Contributor

bors commented Sep 5, 2023

⌛ Testing commit 7093903 with merge c505b8b95e28731a9e5fac10c2dd2c959e6b80d3...

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v3' (SHA:f43a0e5ff2bd294095638e18286ca9a3d1956744)
##[error]Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_9ee4439e-16af-43a6-bebb-8597a7a8a9b7/d0aadeff-c388-45be-8505-7094c7881131.tar.gz. return code: 2.

@bors
Copy link
Contributor

bors commented Sep 5, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 5, 2023
@ehuss
Copy link
Contributor

ehuss commented Sep 5, 2023

@bors retry

GitHub checkout issue

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 5, 2023
@bors
Copy link
Contributor

bors commented Sep 5, 2023

⌛ Testing commit 7093903 with merge 626a6ab...

@bors
Copy link
Contributor

bors commented Sep 5, 2023

☀️ Test successful - checks-actions
Approved by: scottmcm
Pushing 626a6ab to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 5, 2023
@bors bors merged commit 626a6ab into rust-lang:master Sep 5, 2023
12 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Sep 5, 2023
@RalfJung RalfJung deleted the read_via_copy branch September 5, 2023 06:13
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (626a6ab): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-0.7%, -0.7%] 5
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.7% [-0.7%, -0.7%] 5

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results

This 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.

mean range count
Regressions ❌
(primary)
1.1% [0.8%, 1.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) 1.1% [0.8%, 1.3%] 2

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 628.296s -> 627.535s (-0.12%)
Artifact size: 316.10 MiB -> 316.30 MiB (0.06%)

@WaffleLapkin
Copy link
Member

FYI @WaffleLapkin, who sortof-suggested removing the assignment in #109035 (comment)

Oops 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants