interpret: use AllocRange in UninitByteAccess#98979
Merged
bors merged 1 commit intorust-lang:masterfrom Jul 7, 2022
Merged
Conversation
also use nice new format string syntax in interpret/error.rs
Collaborator
|
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
RalfJung
commented
Jul 6, 2022
| | | ||
| LL | std::intrinsics::raw_eq(&(1_u8, 2_u16), &(1_u8, 2_u16)) | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading 4 bytes of memory starting at alloc3, but 1 byte is uninitialized starting at alloc3+0x1, and this operation requires initialized memory | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at alloc3[0x0..0x4], but memory is uninitialized at [0x1..0x2], and this operation requires initialized memory |
Member
Author
There was a problem hiding this comment.
Here I wasn't quite sure if we want the second range to repeat the alloc3 or not? It will always be the same allocation as for the first range.
Contributor
There was a problem hiding this comment.
nope, no repeating is better. I even stumbled over memory being mentioned twice, but just using it isn't better either, so let's just do this.
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 27b7b3d has been approved by |
Member
Author
|
@bors rollup |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jul 7, 2022
interpret: use AllocRange in UninitByteAccess also use nice new format string syntax in `interpret/error.rs`, and use the `#` flag to add `0x` prefixes where applicable. r? `@oli-obk`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 7, 2022
…askrgr Rollup of 9 pull requests Successful merges: - rust-lang#97917 (Implement ExitCodeExt for Windows) - rust-lang#98844 (Reword comments and rename HIR visiting methods.) - rust-lang#98979 (interpret: use AllocRange in UninitByteAccess) - rust-lang#98986 (Fix missing word in comment) - rust-lang#98994 (replace process exit with more detailed exit in src/bootstrap/*.rs) - rust-lang#98995 (Add a test for rust-lang#80471) - rust-lang#99002 (suggest adding a derive for #[default] applied to variants) - rust-lang#99004 (Add a test for rust-lang#70408) - rust-lang#99017 (Replace boolean argument for print_where_clause with an enum to make code more clear) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
also use nice new format string syntax in
interpret/error.rs, and use the#flag to add0xprefixes where applicable.r? @oli-obk