Author: George Hu Date: 2022-09-20T12:17:32-07:00 New Revision: 3ae633766b57717522644ef44c5602a9a6402ee6
URL: https://github.com/llvm/llvm-project/commit/3ae633766b57717522644ef44c5602a9a6402ee6 DIFF: https://github.com/llvm/llvm-project/commit/3ae633766b57717522644ef44c5602a9a6402ee6.diff LOG: [LLDB]Initialize accept_socket with nullptr Fix high impact issue of illegal access of memory. Initialize accept_socket with nullptr. Differential Revision: https://reviews.llvm.org/D134293 Added: Modified: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index 745e3363ef74a..b67cd7efd8846 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -1233,7 +1233,7 @@ GDBRemoteCommunication::ConnectLocally(GDBRemoteCommunication &client, listen_socket.Listen("localhost:0", backlog).ToError()) return error; - Socket *accept_socket; + Socket *accept_socket = nullptr; std::future<Status> accept_status = std::async( std::launch::async, [&] { return listen_socket.Accept(accept_socket); }); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits