<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/155983>155983</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            lldb-server crashes immedaitely after startup on macOS
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          xusheng6
      </td>
    </tr>
</table>

<pre>
    ```
/Users/xusheng/Downloads/LLVM-20.1.8-macOS-ARM64/bin/lldb-server g 0.0.0.0:31337 -- /bin/ls
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /Users/xusheng/Downloads/LLVM-20.1.8-macOS-ARM64/bin/lldb-server g 0.0.0.0:31337 -- /bin/ls
#0 0x000000010675202c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/Users/xusheng/Downloads/LLVM-20.1.8-macOS-ARM64/bin/lldb-server+0x101d1a02c)
#1 0x0000000106752434 SignalHandler(int) (/Users/xusheng/Downloads/LLVM-20.1.8-macOS-ARM64/bin/lldb-server+0x101d1a434)
#2 0x000000019b6a96a4 (/usr/lib/system/libsystem_platform.dylib+0x1804ad6a4)
#3 0x00000001058589c4 lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess() (/Users/xusheng/Downloads/LLVM-20.1.8-macOS-ARM64/bin/lldb-server+0x100e209c4)
#4 0x00000001057f4d28 main_gdbserver(int, char**) (/Users/xusheng/Downloads/LLVM-20.1.8-macOS-ARM64/bin/lldb-server+0x100dbcd28)
#5 0x00000001057fb874 main (/Users/xusheng/Downloads/LLVM-20.1.8-macOS-ARM64/bin/lldb-server+0x100dc3874)
#6 0x000000019b2ceb98 
zsh: trace trap /Users/xusheng/Downloads/LLVM-20.1.8-macOS-ARM64/bin/lldb-server g  -- /bin/l
```

I noticed this while working on the downstream binary ninja debugger: https://github.com/Vector35/debugger/issues/777. I found that the issue affects the LLVM build on the GitHub release as well. I only managed to test with LLVM 20.1.8, which is the latest release that has an macOS build of LLDB 
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy8VU1v2zgQ_TX0ZWCDor4POihJnRZwsUG922swImmJjUQaJBXH--sXpOI66WEPi2ZtwSap4cx7j8QbdE71WsqG5Dckv1vh7Adjm5fZDVL3xaoz4tyQgr4-tCVs-5eT1hG2fQ0ibHtnTno0KMLqbvf965rRTbKp1hPyP_br9tvXIiNs2ylN2HYcRbd20j5LCz3QTfyStE2TNC1hvYZrpCO0fdh9avefwM3dpDwgdHMPVh6N9eANDN4fHUkDKsK2vfLD3G24mWKd58vf-mjND8k9YVvl3CwDTEAtQGk-zkKCHyRwi26ADvmTt8jlhtB275E_gZinYyhBW7ohtH6wprc4Adp-nqT2oTz836oQllKgL3T5JLQoc0YZh0g6bUnaurNbBg9WaR-Z_Bl4EVZdgyyeHo3zVuJEWEHYLSjtCauBsOp3UiLshr4kNBEJUsYJqxcKya8UsjSDveo1jp9RizFsrD4cUZZmPxGxN4jqrsC6wOy19OxsSKE6wrbu7LyclukyfjyO6A_GThtxjjEhfUUzFAVe06dvCedVXtU8g4Dq8WjVM3q5HMvRGi6de-xF92jlZC7r93c33-L01kzTrBVHr4zeR0K73f1-idrhrPnwsOSI2D9KPSoZrfmVXvaOXnnIBKtgQqUDk8vO5UBvgQ9oCWvj82EARcdFVGABmP8CsKvKLAL8sPo8rcqrQMW768W47OoKCG3_dkNwkWg84ff4uw3lvYMEMG8tnbZfQBuvuBTgB-XgNKhRwsnYJ6V7MDoapDAnvXgFdEqjPYNW-geCkN3c99IGBv_ix98l98amOWHbnzve-HFZlhv4Agcz6wACfawZXwMeDpJ7F1cCb-hmNYoLrnvlP88dWDlKdBLQwUmOY0hm9HiGCTX2gZgBL52Hk_LDkmVRL9zF06D4AGqpMGKMu-SLWAZ0gBqi0JfqB9jt7m5gJZpU1GmNK9kkZV5keZrVxWpoWCU4pwlKwXmRdlXNEnpIeF1mZZ7XFFeqYZTltGI1LbMsLzZ51nVY5gmmFa85rUhG5YRq3ATH3hjbr6IeTZLndZWuRuzk6GLnZkzL06IWYSw0ctvEztfNvSMZHZXz7prGKz_K5u0Vid1POlDTJAUqL8cz4MFLC86j9fMxqB3pr2Y7Nv-9775if27YPwEAAP__MKKbYQ">