Skip to content

CTFE validation: handle pointers in str#85332

Merged
bors merged 4 commits into
rust-lang:masterfrom
RalfJung:ptr-in-str
May 16, 2021
Merged

CTFE validation: handle pointers in str#85332
bors merged 4 commits into
rust-lang:masterfrom
RalfJung:ptr-in-str

Conversation

@RalfJung

@RalfJung RalfJung commented May 15, 2021

Copy link
Copy Markdown
Member

I also finally learned how I can match some NOTEs in a ui test without matching all of them, and applied that to some const tests in the 2nd commit where I added NOTE because I did not know what I was doing. I can separate this into its own PR if you prefer.

Fixes #83182
r? @oli-obk

@rust-highfive

Copy link
Copy Markdown
Contributor

Some changes occured to the CTFE / Miri engine

cc @rust-lang/miri

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 15, 2021
|
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
= note: the raw bytes of the constant (size: 16, align: 8) {
╾───────alloc3────────╼ 01 00 00 00 00 00 00 00 │ ╾──────╼........

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎉

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah it's quite nice. ;) Though in this case, the error is behind a ptr indirection, so you cannot see it here.

@oli-obk

oli-obk commented May 15, 2021

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented May 15, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit f1fdbe2 has been approved by oli-obk

@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 May 15, 2021
@rust-log-analyzer

This comment has been minimized.

@oli-obk

oli-obk commented May 15, 2021

Copy link
Copy Markdown
Contributor

@bors r-

you need to make the test emit output for each bitwidth

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 15, 2021
@RalfJung

Copy link
Copy Markdown
Member Author

Argh that's painful. :(

@RalfJung

Copy link
Copy Markdown
Member Author

@bors r=oli-obk

@bors

bors commented May 15, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 8af76cb has been approved by oli-obk

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 15, 2021
@oli-obk

oli-obk commented May 15, 2021

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented May 15, 2021

Copy link
Copy Markdown
Collaborator

💡 This pull request was already approved, no need to approve it again.

@bors

bors commented May 15, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 8af76cb has been approved by oli-obk

@rust-log-analyzer

This comment has been minimized.

@RalfJung

Copy link
Copy Markdown
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 15, 2021
@RalfJung

Copy link
Copy Markdown
Member Author

@bors r=oli-obk

@bors

bors commented May 15, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 70c1cf1 has been approved by oli-obk

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 15, 2021
@bors

bors commented May 16, 2021

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 70c1cf1 with merge 3f46b82...

@bors

bors commented May 16, 2021

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 3f46b82 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 16, 2021
@bors bors merged commit 3f46b82 into rust-lang:master May 16, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 16, 2021
@RalfJung RalfJung deleted the ptr-in-str branch May 17, 2021 08:41
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: compiler/rustc_mir/src/interpret/validity.rs:948:17: Unexpected error during validation: unable to turn pointer into raw bytes

6 participants