Use raw syscall numbers
This commit is contained in:
parent
dddeda7f7d
commit
808b149671
2 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,6 @@ shell-escape = "0.1.4"
|
|||
rustc-workspace-hack = "1.0.0"
|
||||
hex = "0.3.2"
|
||||
rand = "0.6.5"
|
||||
libc = "0.2.51"
|
||||
|
||||
[build-dependencies]
|
||||
vergen = "3"
|
||||
|
|
|
|||
|
|
@ -217,7 +217,8 @@ pub trait EvalContextExt<'a, 'mir, 'tcx: 'a + 'mir>: crate::MiriEvalContextExt<'
|
|||
// `libc::syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), GRND_NONBLOCK)`
|
||||
// is called if a `HashMap` is created the regular way.
|
||||
match this.read_scalar(args[0])?.to_usize(this)? as i64 {
|
||||
libc::SYS_getrandom => {
|
||||
// SYS_getrandom on x86_64 and x86 respectively
|
||||
318 | 355 => {
|
||||
match this.machine.rng.as_ref() {
|
||||
Some(rng) => {
|
||||
let ptr = this.read_scalar(args[1])?.to_ptr()?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue