From 896f558f2b8e0bd29cc08f5af5e0edfe07783042 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 17 Jul 2022 21:50:10 -0400 Subject: [PATCH] with isolation we want to be fully deterministic --- src/shims/unix/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shims/unix/fs.rs b/src/shims/unix/fs.rs index 3fdf82ebc6a..1420279247f 100644 --- a/src/shims/unix/fs.rs +++ b/src/shims/unix/fs.rs @@ -1694,7 +1694,7 @@ fn readlink( fn isatty(&mut self, miri_fd: &OpTy<'tcx, Tag>) -> InterpResult<'tcx, i32> { let this = self.eval_context_mut(); #[cfg(unix)] - { + if matches!(this.machine.isolated_op, IsolatedOp::Allow) { let miri_fd = this.read_scalar(miri_fd)?.to_i32()?; if let Some(host_fd) = this.machine.file_handler.handles.get(&miri_fd).and_then(|fd| fd.as_unix_host_fd()) @@ -1714,7 +1714,7 @@ fn isatty(&mut self, miri_fd: &OpTy<'tcx, Tag>) -> InterpResult<'tcx, i32> { } } // We are attemping to use a Unix interface on a non-Unix platform, or we are on a Unix - // platform and the passed file descriptor is not open. + // platform and the passed file descriptor is not open, or isolation is enabled // FIXME: It should be possible to emulate this at least on Windows by using // GetConsoleMode. let enotty = this.eval_libc("ENOTTY")?;