This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 0b33824eef [fix][Vectorized] Fix nullptr deref in data sink (#11473)
0b33824eef is described below

commit 0b33824eef912d8ec6f1366d29a1f62c1c1e6bb0
Author: Amos Bird <[email protected]>
AuthorDate: Mon Aug 22 11:44:55 2022 +0800

    [fix][Vectorized] Fix nullptr deref in data sink (#11473)
    
    brpc cache may return nullptr.
---
 be/src/vec/sink/vdata_stream_sender.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/be/src/vec/sink/vdata_stream_sender.cpp 
b/be/src/vec/sink/vdata_stream_sender.cpp
index e137d3ca18..e5b6a5c721 100644
--- a/be/src/vec/sink/vdata_stream_sender.cpp
+++ b/be/src/vec/sink/vdata_stream_sender.cpp
@@ -69,6 +69,13 @@ Status VDataStreamSender::Channel::init(RuntimeState* state) 
{
         _brpc_stub = 
state->exec_env()->brpc_internal_client_cache()->get_client(_brpc_dest_addr);
     }
 
+    if (!_brpc_stub) {
+        std::string msg = fmt::format("Get rpc stub failed, dest_addr={}:{}",
+                                      _brpc_dest_addr.hostname, 
_brpc_dest_addr.port);
+        LOG(WARNING) << msg;
+        return Status::InternalError(msg);
+    }
+
     // In bucket shuffle join will set fragment_instance_id (-1, -1)
     // to build a camouflaged empty channel. the ip and port is '0.0.0.0:0"
     // so the empty channel not need call function close_internal()


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to