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
run MIRI on below rust playground, it does not report undefined behavior for the codes reference to unitialized value
// example from rust-std docslet m = MaybeUninit::<UnsafeCell<i32>>::uninit();unsafe{UnsafeCell::raw_get(m.as_ptr()).write(5);}let uc = unsafe{ m.assume_init()};assert_eq!(uc.into_inner(),5);// reference to unitiailized value due to `&*m.as_ptr()`let m = MaybeUninit::<UnsafeCell<i32>>::uninit();unsafe{UnsafeCell::get(&*m.as_ptr()).write(5);}let uc = unsafe{ m.assume_init()};assert_eq!(uc.into_inner(),5);
The text was updated successfully, but these errors were encountered:
run MIRI on below rust playground, it does not report undefined behavior for the codes reference to unitialized value
The text was updated successfully, but these errors were encountered: