mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 05:57:03 +03:00
Fix the wrong EmulateByNameResult::NotSupported in syscall shim
This commit is contained in:
@@ -185,7 +185,7 @@ fn emulate_foreign_item_by_name(
|
||||
}
|
||||
id => {
|
||||
this.handle_unsupported(format!("can't execute syscall with ID {}", id))?;
|
||||
return Ok(EmulateByNameResult::NotSupported);
|
||||
return Ok(EmulateByNameResult::AlreadyJumped);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// ignore-windows: No libc on Windows
|
||||
// ignore-macos: `syscall` is not supported on macOS
|
||||
// compile-flags: -Zmiri-panic-on-unsupported
|
||||
#![feature(rustc_private)]
|
||||
|
||||
extern crate libc;
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
libc::syscall(0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
thread 'main' panicked at 'unsupported Miri functionality: can't execute syscall with ID 0', $DIR/unsupported_syscall.rs:10:9
|
||||
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
||||
Reference in New Issue
Block a user