We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3432b91 commit 72664f7Copy full SHA for 72664f7
src/tools/miri/src/shims/unix/fs.rs
@@ -1130,8 +1130,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
1130
// Reject if isolation is enabled.
1131
if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op {
1132
this.reject_in_isolation("`readdir_r`", reject_with)?;
1133
- // Set error code as "EBADF" (bad fd)
1134
- return this.set_last_error_and_return_i32(LibcError("EBADF"));
+ // Return error code, do *not* set `errno`.
+ return interp_ok(this.eval_libc("EBADF"));
1135
}
1136
1137
let open_dir = this.machine.dirs.streams.get_mut(&dirp).ok_or_else(|| {
0 commit comments