diff options
| author | Ralf Jung <post@ralfj.de> | 2024-10-26 09:09:14 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-10-26 09:10:11 +0200 |
| commit | 4a34e2784b4eb0bb2c0c3740141937c88c4e4cfd (patch) | |
| tree | e74d7c011abbeee759e957123acc03a80cc46f70 | |
| parent | 3f763c776eaeb0f2c088ec1fec6284d16e66564f (diff) | |
| download | rust-4a34e2784b4eb0bb2c0c3740141937c88c4e4cfd.tar.gz rust-4a34e2784b4eb0bb2c0c3740141937c88c4e4cfd.zip | |
do not set the file type to an error code
| -rw-r--r-- | src/tools/miri/src/shims/unix/fs.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/miri/src/shims/unix/fs.rs b/src/tools/miri/src/shims/unix/fs.rs index e88f62ffbb2..eed6a7b04ff 100644 --- a/src/tools/miri/src/shims/unix/fs.rs +++ b/src/tools/miri/src/shims/unix/fs.rs @@ -339,7 +339,10 @@ trait EvalContextExtPrivate<'tcx>: crate::MiriInterpCxExt<'tcx> { _ => interp_ok(this.eval_libc("DT_UNKNOWN").to_u8()?.into()), } } - Err(e) => this.io_error_to_errnum(e)?.to_i32(), + Err(_) => { + // Fallback on error + interp_ok(this.eval_libc("DT_UNKNOWN").to_u8()?.into()) + } } } } |
