-
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
thread 'rustc' panicked at 'Encountered invalid discriminant while decoding Option
.', ...compiler/rustc_serialize/src/serialize.rs:345:18
#2847
Comments
Yeah, so running |
well, this is not really a problem of stage x vs stage y since it's always this stage in my case, but the underlying issue (different host compilers) might be the same as this is also the case for different stages |
could miri compute a checksum of its own binary and save/check that in the std it prepares to know if it needs to rebuild? |
So to be clear, this is from running We have a similar issue inside rustc bootstrap itself, where But fundamentally this is not just a Miri issue, it also affects rustc: we hash the compiler channel and version into the sysroot to check for rebuilds (and rustc does that for its incremental cache), but for local builds that is just |
exactly 🙂 |
I think the exact same issue would arise if you did |
Closing as duplicate of rust-lang/rust#76720. |
I think this happens when miri tries to run with an outdated std.
I have a locally build toolchain with miri, and sometimes after reinstalling/updating the toolchain (x.py install), I think miri does not catch that it was updated and would have to recompile its std.
cargo miri run
will panic then:The text was updated successfully, but these errors were encountered: