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
[libc] Enable socket entrypoints in overlay mode (llvm#195035)
This is slightly tricky in that many of these functions depend on types
(struct sockaddrs, msghdr, ...) and we cannot overlay types. However,
this works because these functions are simple syscall wrappers which
simply forward the data to the kernel -- so it's really the kernel
that's defining these structures.
This approach is compatible with libraries which implement these
functions the same way, this includes at least glibc (on all
architectures) and musl (on 32-bit architectures). 64-bit musl repacks
the [c]msghdr structures to zero out padding fields, and overlaying that
can lead to subtle bugs. However, I believe that overlaying musl is not
a very interesting use case, so I'm leaving that as a TODO. If someone
is interested in doing that, they can either exclude these entrypoints
from the overlay or implement the musl-compatible repacking code.
0 commit comments