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

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 26 00:56:01 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';
----------------
slydiman wrote:

Updated. Thanks.

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


More information about the lldb-commits mailing list