-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-macosOperating system: macOSOperating system: macOST-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
In this line, we are calling open64
(which on macOS is open
renamed):
rust/src/libstd/sys/unix/fs.rs
Line 706 in de27cd7
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.)
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-macosOperating system: macOSOperating system: macOST-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.