Skip to content

Commit 393216d

Browse files
committed
Add a better error message than syscall 318 not found
1 parent 8b81f54 commit 393216d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

miri/fn_call.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,13 @@ impl<'a, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'tcx, super::Evaluator>
126126
}
127127

128128
"syscall" => {
129+
// TODO: read `syscall` ids like `sysconf` ids and
130+
// figure out some way to actually process some of them
131+
//
132+
// libc::syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), GRND_NONBLOCK)
133+
// is called if a `HashMap` is created the regular way.
129134
match self.value_to_primval(args[0], usize)?.to_u64()? {
135+
318 |
130136
511 => return Err(EvalError::Unimplemented("miri does not support random number generators".to_owned())),
131137
id => return Err(EvalError::Unimplemented(format!("miri does not support syscall id {}", id))),
132138
}

0 commit comments

Comments
 (0)