@@ -101,7 +101,7 @@ pub fn create_ecx<'a, 'mir: 'a, 'tcx: 'mir>(
101
101
102
102
// Return value (in static memory so that it does not count as leak)
103
103
let ret = ecx. layout_of ( start_mir. return_ty ( ) ) ?;
104
- let ret_ptr = ecx. allocate ( ret, MiriMemoryKind :: MutStatic . into ( ) ) ? ;
104
+ let ret_ptr = ecx. allocate ( ret, MiriMemoryKind :: MutStatic . into ( ) ) ;
105
105
106
106
// Push our stack frame
107
107
ecx. push_stack_frame (
@@ -125,7 +125,7 @@ pub fn create_ecx<'a, 'mir: 'a, 'tcx: 'mir>(
125
125
ecx. write_scalar ( argc, dest) ?;
126
126
// Store argc for macOS _NSGetArgc
127
127
{
128
- let argc_place = ecx. allocate ( dest. layout , MiriMemoryKind :: Env . into ( ) ) ? ;
128
+ let argc_place = ecx. allocate ( dest. layout , MiriMemoryKind :: Env . into ( ) ) ;
129
129
ecx. write_scalar ( argc, argc_place. into ( ) ) ?;
130
130
ecx. machine . argc = Some ( argc_place. ptr . to_ptr ( ) ?) ;
131
131
}
@@ -136,14 +136,14 @@ pub fn create_ecx<'a, 'mir: 'a, 'tcx: 'mir>(
136
136
let dest = ecx. eval_place ( & mir:: Place :: Local ( args. next ( ) . unwrap ( ) ) ) ?;
137
137
let cmd = ecx. memory_mut ( ) . allocate_static_bytes ( CMD . as_bytes ( ) ) . with_default_tag ( ) ;
138
138
let raw_str_layout = ecx. layout_of ( ecx. tcx . mk_imm_ptr ( ecx. tcx . types . u8 ) ) ?;
139
- let cmd_place = ecx. allocate ( raw_str_layout, MiriMemoryKind :: Env . into ( ) ) ? ;
139
+ let cmd_place = ecx. allocate ( raw_str_layout, MiriMemoryKind :: Env . into ( ) ) ;
140
140
ecx. write_scalar ( Scalar :: Ptr ( cmd) , cmd_place. into ( ) ) ?;
141
141
ecx. memory_mut ( ) . mark_immutable ( cmd_place. to_ptr ( ) ?. alloc_id ) ?;
142
142
// Store argv for macOS _NSGetArgv
143
143
{
144
144
let argv = cmd_place. ptr ;
145
145
ecx. write_scalar ( argv, dest) ?;
146
- let argv_place = ecx. allocate ( dest. layout , MiriMemoryKind :: Env . into ( ) ) ? ;
146
+ let argv_place = ecx. allocate ( dest. layout , MiriMemoryKind :: Env . into ( ) ) ;
147
147
ecx. write_scalar ( argv, argv_place. into ( ) ) ?;
148
148
ecx. machine . argv = Some ( argv_place. ptr . to_ptr ( ) ?) ;
149
149
}
@@ -155,7 +155,7 @@ pub fn create_ecx<'a, 'mir: 'a, 'tcx: 'mir>(
155
155
Size :: from_bytes ( cmd_utf16. len ( ) as u64 * 2 ) ,
156
156
Align :: from_bytes ( 2 ) . unwrap ( ) ,
157
157
MiriMemoryKind :: Env . into ( ) ,
158
- ) ? . with_default_tag ( ) ;
158
+ ) . with_default_tag ( ) ;
159
159
ecx. machine . cmd_line = Some ( cmd_ptr) ;
160
160
// store the UTF-16 string
161
161
let char_size = Size :: from_bytes ( 2 ) ;
@@ -516,13 +516,13 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for Evaluator<'tcx> {
516
516
ecx : & mut EvalContext < ' a , ' mir , ' tcx , Self > ,
517
517
ptr : Pointer ,
518
518
kind : MemoryKind < Self :: MemoryKinds > ,
519
- ) -> EvalResult < ' tcx , Pointer < Borrow > > {
519
+ ) -> Pointer < Borrow > {
520
520
if !ecx. machine . validate {
521
521
// No tracking
522
- Ok ( ptr. with_default_tag ( ) )
522
+ ptr. with_default_tag ( )
523
523
} else {
524
524
let tag = ecx. tag_new_allocation ( ptr. alloc_id , kind) ;
525
- Ok ( Pointer :: new_with_tag ( ptr. alloc_id , ptr. offset , tag) )
525
+ Pointer :: new_with_tag ( ptr. alloc_id , ptr. offset , tag)
526
526
}
527
527
}
528
528
0 commit comments