From 4e4a1abe9ed58110cdad41e856c8b3ef2ef8fa88 Mon Sep 17 00:00:00 2001 From: HeYuchen <377710264@qq.com> Date: Mon, 18 Jan 2021 13:42:10 +0800 Subject: [PATCH] fix(split): message header should not be empty (#725) --- src/runtime/rpc/rpc_message.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/rpc/rpc_message.cpp b/src/runtime/rpc/rpc_message.cpp index db19b21da0..0dd92b57df 100644 --- a/src/runtime/rpc/rpc_message.cpp +++ b/src/runtime/rpc/rpc_message.cpp @@ -181,7 +181,7 @@ message_ex *message_ex::copy_message_no_reply(const message_ex &old_msg) static_cast(dsn::tls_trans_malloc(sizeof(message_header))), [](char *c) { dsn::tls_trans_free(c); }); msg->header = reinterpret_cast(header_holder.get()); - msg->header = {}; // initialize to empty struct + memset(static_cast(msg->header), 0, sizeof(message_header)); msg->buffers.emplace_back(blob(std::move(header_holder), sizeof(message_header))); if (old_msg.buffers.size() == 1) {