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

Safe Transmute: Fix ICE (due to UnevaluatedConst) #113677

Merged

Conversation

bryangarza
Copy link
Contributor

This patch updates the code that looks at the Assume type when evaluating if transmutation is possible. An ICE was being triggered in the case that the Assume parameter contained an unevaluated const (in this test case, due to a function with missing parameter names).

Fixes #110892

@rustbot
Copy link
Collaborator

rustbot commented Jul 13, 2023

r? @davidtwco

(rustbot has picked a reviewer for you, use r? to override)

@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 Jul 13, 2023
Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

r=me after following @lqd's suggestion.

This patch updates the code that looks at the `Assume` type when evaluating if
transmutation is possible. An ICE was being triggered in the case that the
`Assume` parameter contained an unevaluated const (in this test case, due to a
function with missing parameter names).

Fixes rust-lang#110892
@bryangarza bryangarza force-pushed the unevaluated-const-ice_issue-110892 branch from 7540c4f to ef50e20 Compare July 17, 2023 16:43
@bryangarza
Copy link
Contributor Author

@rustbot ready

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jul 18, 2023

📌 Commit ef50e20 has been approved by davidtwco

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 Jul 18, 2023
@bors
Copy link
Contributor

bors commented Jul 18, 2023

⌛ Testing commit ef50e20 with merge c44324a...

@bors
Copy link
Contributor

bors commented Jul 18, 2023

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing c44324a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 18, 2023
@bors bors merged commit c44324a into rust-lang:master Jul 18, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Jul 18, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c44324a): 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
Improvements ✅
(secondary)
-0.7% [-0.8%, -0.6%] 4
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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)
3.5% [3.5%, 3.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-2.8%, -2.7%] 2
All ❌✅ (primary) 3.5% [3.5%, 3.5%] 1

Cycles

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

Binary size

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

Bootstrap: 658.53s -> 657.045s (-0.23%)

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.

ICE: expected ConstKind::Value, got Unevaluated(UnevaluatedConst...
6 participants