From ba6d8065861bb9704560e04820303da0658235e6 Mon Sep 17 00:00:00 2001 From: Mryange <2319153948@qq.com> Date: Fri, 7 Jun 2024 15:10:51 +0800 Subject: [PATCH] pod --- be/src/vec/common/pod_array.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/be/src/vec/common/pod_array.h b/be/src/vec/common/pod_array.h index 9a00e295cb34fa..d4324c91f75e4f 100644 --- a/be/src/vec/common/pod_array.h +++ b/be/src/vec/common/pod_array.h @@ -445,7 +445,8 @@ class PODArray : public PODArrayBase void emplace_back(Args&&... args) { - if (UNLIKELY(this->c_end + sizeof(T) > this->c_end_of_storage)) { + if (UNLIKELY(this->c_end == nullptr || + (this->c_end + sizeof(T) > this->c_end_of_storage))) { this->reserve_for_next_size(); }