@@ -481,36 +481,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
481481 this. write_scalar ( res, dest) ?;
482482 }
483483
484- "uninit" => {
485- // Check fast path: we don't want to force an allocation in case the destination is a simple value,
486- // but we also do not want to create a new allocation with 0s and then copy that over.
487- // FIXME: We do not properly validate in case of ZSTs and when doing it in memory!
488- // However, this only affects direct calls of the intrinsic; calls to the stable
489- // functions wrapping them do get their validation.
490- // FIXME: should we check alignment for ZSTs?
491- if !dest. layout . is_zst ( ) {
492- match dest. layout . abi {
493- layout:: Abi :: Scalar ( ..) => {
494- let x = ScalarMaybeUndef :: Undef ;
495- this. write_immediate ( Immediate :: Scalar ( x) , dest) ?;
496- }
497- layout:: Abi :: ScalarPair ( ..) => {
498- let x = ScalarMaybeUndef :: Undef ;
499- this. write_immediate ( Immediate :: ScalarPair ( x, x) , dest) ?;
500- }
501- _ => {
502- // Do it in memory
503- let mplace = this. force_allocation ( dest) ?;
504- assert ! ( mplace. meta. is_none( ) ) ;
505- let ptr = mplace. ptr . to_ptr ( ) ?;
506- this. memory_mut ( )
507- . get_mut ( ptr. alloc_id ) ?
508- . mark_definedness ( ptr, dest. layout . size , false ) ;
509- }
510- }
511- }
512- }
513-
514484 "write_bytes" => {
515485 let ty = substs. type_at ( 0 ) ;
516486 let ty_layout = this. layout_of ( ty) ?;
0 commit comments