In this line, we are calling open64 (which on macOS is open renamed):
|
let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode as c_int) })?; |
As third argument, we are passing something of type
c_int. However, according to
this document, the type should be
mode_t instead, and on macOS these types do not seem identical -- the libc crate has
src/unix/bsd/apple/mod.rs
10:pub type mode_t = u16;
Seems like we are using the wrong argument type here?
(open is variadic so the compiler cannot check this. But Miri complained when I started to check argument sizes.)
In this line, we are calling
open64(which on macOS isopenrenamed):rust/src/libstd/sys/unix/fs.rs
Line 706 in de27cd7
As third argument, we are passing something of type
c_int. However, according to this document, the type should bemode_tinstead, and on macOS these types do not seem identical -- the libc crate hasSeems like we are using the wrong argument type here?
(
openis variadic so the compiler cannot check this. But Miri complained when I started to check argument sizes.)