@@ -136,7 +136,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
136
136
"incorrect number of arguments for syscall: got 0, expected at least 1"
137
137
) ;
138
138
}
139
- match this. read_scalar ( & args[ 0 ] ) ? . to_machine_usize ( this ) ? {
139
+ match this. read_machine_usize ( & args[ 0 ] ) ? {
140
140
// `libc::syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), GRND_NONBLOCK)`
141
141
// is called if a `HashMap` is created the regular way (e.g. HashMap<K, V>).
142
142
id if id == sys_getrandom => {
@@ -184,7 +184,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
184
184
let [ pid, cpusetsize, mask] =
185
185
this. check_shim ( abi, Abi :: C { unwind : false } , link_name, args) ?;
186
186
this. read_scalar ( pid) ?. to_i32 ( ) ?;
187
- this. read_scalar ( cpusetsize) ? . to_machine_usize ( this ) ?;
187
+ this. read_machine_usize ( cpusetsize) ?;
188
188
this. deref_operand ( mask) ?;
189
189
// FIXME: we just return an error; `num_cpus` then falls back to `sysconf`.
190
190
let einval = this. eval_libc ( "EINVAL" ) ;
@@ -216,7 +216,7 @@ fn getrandom<'tcx>(
216
216
dest : & PlaceTy < ' tcx , Provenance > ,
217
217
) -> InterpResult < ' tcx > {
218
218
let ptr = this. read_pointer ( ptr) ?;
219
- let len = this. read_scalar ( len) ? . to_machine_usize ( this ) ?;
219
+ let len = this. read_machine_usize ( len) ?;
220
220
221
221
// The only supported flags are GRND_RANDOM and GRND_NONBLOCK,
222
222
// neither of which have any effect on our current PRNG.
0 commit comments