You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnmain(){letmut x = [0u32;2];let ptr:*mutu8 = x.as_mut_ptr().cast::<u8>();unsafe{*(ptr.add(1).cast::<u32>()) = 42;}}
run with RUST_BACKTRACE=1 ~/.cargo/bin/cargo miri run seems to not print any backtrace disregarding what the panic output suggests:
Preparing a sysroot for Miri (target: x86_64-unknown-linux-gnu)... done
WARNING: Ignoring `RUSTC_WRAPPER` environment variable, Miri does not support wrapping.
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri runner target/miri/x86_64-unknown-linux-gnu/debug/f`
thread 'main' panicked at 'misaligned pointer dereference: address must be a multiple of 0x4 but is 0x278b1', src/main.rs:5:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace