-
Notifications
You must be signed in to change notification settings - Fork 359
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
ICE: "dyn call index points at something that is not a method" #2432
Comments
There is a future compat lint being emitted for the exact pattern on which miri crashes. |
Yes, I saw this show up earlier as UB (what rust says), but I think the crash might be new, otherwise I would have probably reported it already :D |
This is a consequence of rust-lang/rust#99420 doing stricter checking. So yes the crash is new. Looks like the compiler is generating invalid MIR here, and finally we actually catch it doing that. I don't think this is a Miri bug. What is rustc doing to ensure that this "does not segfault"? Looks like the vtable is bogus! |
Even stranger is the fact that this test shouldn't even run, it triggers a |
We could fix the ICE by raising a UB error instead. rust-lang/rust#50781 is the soundness bug tracking that UB can be caused in safe code. |
…li-obk don't ICE on invalid dyn calls Due to rust-lang#50781 this is actually reachable. Fixes rust-lang/miri#2432 r? `@oli-obk`
add test for dyn call issue Tests for #2432
code from rustc
./src/test/ui/issues/issue-50781.rs
cargo miri run
miri 0.1.0 (963f08b 2022-07-22)
The text was updated successfully, but these errors were encountered: