This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new e15512d0910 branch-4.0: [fix](memtable) add check when memtable init
aggregate function to avoid core dump #57934 (#57969)
e15512d0910 is described below
commit e15512d0910346454d696490adc6d96fa06195b4
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Nov 13 10:48:01 2025 +0800
branch-4.0: [fix](memtable) add check when memtable init aggregate function
to avoid core dump #57934 (#57969)
Cherry-picked from #57934
Co-authored-by: hui lai <[email protected]>
---
be/src/olap/memtable.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/be/src/olap/memtable.cpp b/be/src/olap/memtable.cpp
index da442f2d897..7eac0aa720d 100644
--- a/be/src/olap/memtable.cpp
+++ b/be/src/olap/memtable.cpp
@@ -104,6 +104,10 @@ void MemTable::_init_columns_offset_by_slot_descs(const
std::vector<SlotDescript
}
void MemTable::_init_agg_functions(const vectorized::Block* block) {
+ if (_num_columns > _column_offset.size()) [[unlikely]] {
+ throw std::runtime_error(fmt::format("num_columns {} is greater than
block columns {}",
+ _num_columns,
_column_offset.size()));
+ }
for (auto cid = _tablet_schema->num_key_columns(); cid < _num_columns;
++cid) {
vectorized::AggregateFunctionPtr function;
if (_keys_type == KeysType::UNIQUE_KEYS && _enable_unique_key_mow) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]