Skip to content

Commit 4a34e27

Browse files
committed
do not set the file type to an error code
1 parent 3f763c7 commit 4a34e27

File tree

1 file changed

+4
-1
lines changed
  • src/tools/miri/src/shims/unix

1 file changed

+4
-1
lines changed

src/tools/miri/src/shims/unix/fs.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,10 @@ trait EvalContextExtPrivate<'tcx>: crate::MiriInterpCxExt<'tcx> {
339339
_ => interp_ok(this.eval_libc("DT_UNKNOWN").to_u8()?.into()),
340340
}
341341
}
342-
Err(e) => this.io_error_to_errnum(e)?.to_i32(),
342+
Err(_) => {
343+
// Fallback on error
344+
interp_ok(this.eval_libc("DT_UNKNOWN").to_u8()?.into())
345+
}
343346
}
344347
}
345348
}

0 commit comments

Comments
 (0)