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 0a9ea7e commit dffac0d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion 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 dffac0d

Please sign in to comment.