[Lldb-commits] [lldb] [lldb] Optimized lldb-server memory usage (PR #100666)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 25 18:25:38 PDT 2024


================
@@ -1145,7 +1145,8 @@ Status GDBRemoteCommunication::StartDebugserverProcess(
       if (socket_pipe.CanWrite())
         socket_pipe.CloseWriteFileDescriptor();
       if (socket_pipe.CanRead()) {
-        char port_cstr[PATH_MAX] = {0};
+        // The port number may be "1024\0".."65535\0".
+        char port_cstr[6] = {0};
         port_cstr[0] = '\0';
----------------
bulbazord wrote:

Do we still need this line? Seems redundant since the array is initialized to this value anyway.

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


More information about the lldb-commits mailing list