Skip to content

interpret: fix alignment handling for Repeat expressions #114296

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

RalfJung
Copy link
Member

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2023

r? @jackh726

(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 31, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2023

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@oli-obk
Copy link
Contributor

oli-obk commented Jul 31, 2023

Is there some context that motivated this change?

@RalfJung
Copy link
Member Author

It fixes a bug. :) The new testcase src/tools/miri/tests/pass/align_repeat_into_packed_field.rs is currently accidentally UB but that should be allowed.

@RalfJung RalfJung force-pushed the interpret-repeat-align branch from 641125e to b169ee7 Compare July 31, 2023 17:22
@oli-obk
Copy link
Contributor

oli-obk commented Aug 1, 2023

yea, I was just wondering if there was any discussion that made you realize that, but it seems to just be careful code reading 😆

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 1, 2023

📌 Commit b169ee7 has been approved by oli-obk

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 Aug 1, 2023
@RalfJung
Copy link
Member Author

RalfJung commented Aug 1, 2023

The full story is that I did some research for rust-lang/opsem-team#11, then I found #54547 which led me to #56927 and #57053 and reading that PR I realized I should double-check what Miri does and then found the problem in Repeat handling. :)

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 1, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#100455 (Implement RefUnwindSafe for Backtrace)
 - rust-lang#113428 (coverage: Replace `ExpressionOperandId` with enum `Operand`)
 - rust-lang#114283 (Use parking lot's rwlock even without parallel-rustc)
 - rust-lang#114288 (Improve diagnostic for wrong borrow on binary operations)
 - rust-lang#114296 (interpret: fix alignment handling for Repeat expressions)
 - rust-lang#114306 ([rustc_data_structures][perf] Simplify base_n::push_str.)
 - rust-lang#114320 (Cover statements for stable_mir)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fa33d6e into rust-lang:master Aug 1, 2023
@rustbot rustbot added this to the 1.73.0 milestone Aug 1, 2023
@RalfJung RalfJung deleted the interpret-repeat-align branch August 2, 2023 19:15
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
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.

5 participants