labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

Sorry about the delay.

In D87333#2293266 <https://reviews.llvm.org/D87333#2293266>, @clayborg wrote:

> I am fine with trying "localhost" and seeing if we run into any issues. 
> Hopefully slow DNS isn't a problem anymore on Macs. Everyone else ok?

Sounds good to me. I'm mainly hoping that with the use of socketpair(2), the 
DNS will not be on the critical path anymore.

In D87333#2274572 <https://reviews.llvm.org/D87333#2274572>, @rupprecht wrote:

> Many non-reproducers tests fail w/o the change to 
> `GDBRemoteCommunication::ConnectLocally`, so it's at least used outside of 
> that.

Well... it is used in a bunch of tests exercising the socket functionality, but 
these are just tests. The only production usage is in reproducers. Which makes 
total sense when you think about it -- why would anyone be creating a socket 
for communicating within the same process -- there are much simpler ways to do 
that.

In D87333#2291317 <https://reviews.llvm.org/D87333#2291317>, @rupprecht wrote:

> [1] IIUC, when connecting via hostname, attempting "localhost" will try both 
> AF_INET and AF_INET6, but there is no corresponding way to construct a raw 
> socket with automatic fallback to AF_INET6 if AF_INET does not work, so that 
> part is the same as before (try to create AF_INET and catch the error 
> manually)

The fully generic way to handle this would be to loop over 
getaddrinfo("localhost") and try to listen on each address that returns 
(multiple sockets). That is at least for the case when you don't know who is 
going to connect to you. For tests, it should be sufficient to pick a first 
address that works and use that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87333/new/

https://reviews.llvm.org/D87333

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to