-
Notifications
You must be signed in to change notification settings - Fork 353
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
Miri misses UB in place expressions when there are "_" patterns #2360
Comments
rust-lang/rust#102256 preserves these place expressions in MIR, which is a step towards fixing this.
Would anything go wrong if we spec'ed them all to be evaluating the place expression and then discarding it (i.e., not actually doing a read, never producing a value)? |
Can't be sure without trying, but I experimented for a bit and wasn't able to come up with any problems. |
Now that rust-lang/rust#104844 landed, this is actually fixed, we just need tests. |
Actually only the @cjgillot is that expected? EDIT: Oh I see, rust-lang/rust#103208 seems to be taking care of this. |
rust-lang/rust#103208 landed. Due to rust-lang/reference#1387, the original example is not UB any more, but similar things are, so this will be fixed after adding a test. |
make sure we catch UB in match place even with _ pattern Fixes #2360
make sure we catch UB in match place even with _ pattern Fixes #2360
make sure we catch UB in match place even with _ pattern Fixes rust-lang/miri#2360
The following example should both be UB, but Miri finds neither of it:(this got fixed by rust-lang/rust#104844)This is blocked on rust-lang/rust#99180.Here's another variant: (that is not fixed yet, will be fixed by rust-lang/rust#103208)
The text was updated successfully, but these errors were encountered: