Are we calling macOS "open" with a wrong argument type? #71915
Labels
C-bug
Category: This is a bug.
O-macos
Operating system: macOS
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
In this line, we are calling
open64
(which on macOS isopen
renamed):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_t
instead, and on macOS these types do not seem identical -- the libc crate hasSeems 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.)The text was updated successfully, but these errors were encountered: