Skip to content

Commit

Permalink
do not set the file type to an error code
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Oct 26, 2024
1 parent 3f763c7 commit 4a34e27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tools/miri/src/shims/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
}
}
Expand Down

0 comments on commit 4a34e27

Please sign in to comment.