This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new a85b5eb9d04 [Bug](runtime-filter) fix bloom_filter_func use after free on get_build_bf_cardinality #47034 (#47050) a85b5eb9d04 is described below commit a85b5eb9d04b857a5a3a40769cf66b2bcc44f18a Author: Pxl <x...@selectdb.com> AuthorDate: Thu Jan 16 14:22:36 2025 +0800 [Bug](runtime-filter) fix bloom_filter_func use after free on get_build_bf_cardinality #47034 (#47050) pick from #47034 --- be/src/exprs/runtime_filter.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/be/src/exprs/runtime_filter.cpp b/be/src/exprs/runtime_filter.cpp index a4433ef2d45..f4a4cf469e4 100644 --- a/be/src/exprs/runtime_filter.cpp +++ b/be/src/exprs/runtime_filter.cpp @@ -371,11 +371,8 @@ public: } bool get_build_bf_cardinality() const { - if (_filter_type == RuntimeFilterType::BLOOM_FILTER || - _filter_type == RuntimeFilterType::IN_OR_BLOOM_FILTER) { - return _context->bloom_filter_func->get_build_bf_cardinality(); - } - return false; + return _context->bloom_filter_func && + _context->bloom_filter_func->get_build_bf_cardinality(); } void insert_to_bloom_filter(BloomFilterFuncBase* bloom_filter) const { @@ -1651,10 +1648,14 @@ void IRuntimeFilter::update_runtime_filter_type_to_profile() { std::string IRuntimeFilter::debug_string() const { return fmt::format( - "RuntimeFilter: (id = {}, type = {}, need_local_merge: {}, is_broadcast: {}, " - "build_bf_cardinality: {}, error_msg: {}", - _filter_id, to_string(_runtime_filter_type), _need_local_merge, _is_broadcast_join, - _wrapper->get_build_bf_cardinality(), _wrapper->_context->err_msg); + "RuntimeFilter: (id = {}, type = {}, is_broadcast: {}, ignored: {}, disabled: {}, " + "build_bf_cardinality: {}, dependency: {}, synced_size: {}, has_local_target: {}, " + "has_remote_target: {}, error_msg: [{}]", + _filter_id, to_string(_runtime_filter_type), _is_broadcast_join, + _wrapper->_context->ignored, _wrapper->_context->disabled, + _wrapper->get_build_bf_cardinality(), + _dependency ? _dependency->debug_string() : "none", _synced_size, _has_local_target, + _has_remote_target, _wrapper->_context->err_msg); } Status IRuntimeFilter::merge_from(const RuntimePredicateWrapper* wrapper) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org