[llvm] [llvm][Support] Add UNIX socket support (PR #73603)

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 06:18:00 PST 2023


nico wrote:

> I considered that a bit, but we already depend on stuff like shell32 and COM, and just linking to winsock doesn't really do anything, you have to actually call WSAStartup before it sets up anything.

It does show up in `dumpbin /dependents` output, which is super weird for a compiler. And now, if you have a compile farm, an attacker might be able to send you source code that can just call dormant winsock functions to do network access. (Granted, previously they could LoadLibrary() it, and you should have a sandbox, but it's still bad for a compiler to have a dep on winsock.) And for the other deps, we at least delayload them.

https://github.com/llvm/llvm-project/pull/67562 also looks like something that should be in a separate binary, not in clang itself.

https://github.com/llvm/llvm-project/pull/73603


More information about the llvm-commits mailing list