You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should remove all FFI declarations within nix in favor of types defined in the libc crate. Much of this work has already been done recently, but there's still some left. And since we don't let any new PRs be merged until libc support has been added, we can resolve this problem relatively easily.
648: Fix `struct msghdr` types on non-Linux platforms. r=Susurrus a=kinetiknz
Type `struct msghdr` and `struct cmsghdr` types defined in `sys/socket/ffi.rs` match the Linux headers, but differ from the standard header (and other OSes): http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html
This PR fixes a memory corruption/unsafety issue on non-Linux machines when using `recvmsg` with certain parameters.
While fixing this, I wondered what the reason was for nix not using libc's definition of these structures.
Closes#748.
We should remove all FFI declarations within
nix
in favor of types defined in thelibc
crate. Much of this work has already been done recently, but there's still some left. And since we don't let any new PRs be merged untillibc
support has been added, we can resolve this problem relatively easily.Left to address:
src/sys/socket/mod.rs
(Replace socket FFI with libc versions #746, Fixstruct msghdr
types on non-Linux platforms. #648)src/sys/memfd.rs
(Migrate memfd constants to libc #794)src/fcntl.rs
(see Use upstream libc definitions for fcntl FFI #745)src/sched.rs
(see Use libc types for sched and syscall FFI #747)src/sys/quota.rs
(see Migrate quota module to libc FFI types #750)src/sys/ptrace.rs
(see Moved ptrace constants into enum types plus minor additions #749)src/sys/syscall.rs
(see Use libc types for sched and syscall FFI #747)src/errno.rs
(see More libc ffi #798, Fix nix for Dragonfly #684, Switch to libc definitons of errno constants #807)The text was updated successfully, but these errors were encountered: