[Lldb-commits] [PATCH] D133393: [test] Use localhost in place of 127.0.0.1 to run in ipv6-only environments.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 6 23:38:45 PDT 2022


labath added a comment.

I believe the reasons are still relevant. Basically the problem is that listening on `localhost:x` creates two sockets (one for 127.0.0.1, one for ::1), and there's no way to guarantee that we'll be able to grab the same port for both (one could be taken by some other application). Our listening code will succeed if it opens at least one socket, but then if we again try to connect using the `localhost` name, we may end up connecting to the wrong thing. I think the correct fix is to take the address (ip+port) that we've *actually* started listening on, and then pass *that* as the argument to the connect command, but I'm not sure if our current Socket APIs allow you to get that information.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133393



More information about the lldb-commits mailing list