[all-commits] [llvm/llvm-project] 4a8161: [llvm-jitlink] Fix use of getaddrinfo(3) when conn...

Stefan Gränitz via All-commits all-commits at lists.llvm.org
Mon Mar 22 03:21:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a8161fe40cce8503229d2835a38a38a30477b41
      https://github.com/llvm/llvm-project/commit/4a8161fe40cce8503229d2835a38a38a30477b41
  Author: Stefan Gränitz <stefan.graenitz at gmail.com>
  Date:   2021-03-22 (Mon, 22 Mar 2021)

  Changed paths:
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp

  Log Message:
  -----------
  [llvm-jitlink] Fix use of getaddrinfo(3) when connecting remote executor via TCP socket

Since llvm-jitlink moved from gethostbyname to getaddrinfo in D95477, it seems to no longer connect to llvm-jitlink-executor via TCP. I can reproduce this behavior on both, Debian 10 and macOS 10.15.7:

```
> llvm-jitlink-executor listen=localhost:10819
--
> llvm-jitlink --oop-executor-connect=localhost:10819 /path/to/obj.o
Failed to resolve localhost:10819
```

Reviewed By: rzurob

Differential Revision: https://reviews.llvm.org/D98579


  Commit: f21cc55fb8a2ac10523f1c6cdf5af1feda106ea5
      https://github.com/llvm/llvm-project/commit/f21cc55fb8a2ac10523f1c6cdf5af1feda106ea5
  Author: Stefan Gränitz <stefan.graenitz at gmail.com>
  Date:   2021-03-22 (Mon, 22 Mar 2021)

  Changed paths:
    M llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp

  Log Message:
  -----------
  [llvm-jitlink] Add diagnostic output and port executor to getaddrinfo(3) as well

Add diagnostic output for TCP connections on both sides, llvm-jitlink and llvm-jitlink-executor.
Port the executor to use getaddrinfo(3) as well. This makes the code more symmetric and seems to be the recommended way for implementing the server side.

Reviewed By: rzurob

Differential Revision: https://reviews.llvm.org/D98581


Compare: https://github.com/llvm/llvm-project/compare/20d93267e184...f21cc55fb8a2


More information about the All-commits mailing list