Michael Smith has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24890


Change subject: IMPALA-15379: Fix UBSan VLA-bound-0 aborts
......................................................................

IMPALA-15379: Fix UBSan VLA-bound-0 aborts

ExecNode::CodegenEvalConjuncts declared a C-style VLA
(llvm::Function* conjunct_fns[conjuncts.size()]) to hold codegen'd
conjunct functions. When a scan node has zero conjuncts (e.g. a
query with no WHERE clause), conjuncts.size() is 0, and a VLA with a
runtime bound of 0 is undefined behavior. UBSan's vla-bound check
flags this as fatal, aborting impalad mid-query (reproduced by
tests/query_test/test_nested_types.py::TestNestedCollectionsInSelectList::test_array_in_select_list).

Tuple::CodegenMaterializeExprs has a similar case when
slot_materialize_exprs is empty.

Replace the VLA with a std::vector, which has identical operator[]
usage at every call site but is well-defined for size 0.

Change-Id: I9d476f5adc47d2a9e368a8960fa4e7c3817f43fd
Assisted-by: Claude Sonnet 5 (GitHub Copilot)
---
M be/src/exec/exec-node.cc
M be/src/runtime/tuple.cc
2 files changed, 4 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/90/24890/1
--
To view, visit http://gerrit.cloudera.org:8080/24890
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d476f5adc47d2a9e368a8960fa4e7c3817f43fd
Gerrit-Change-Number: 24890
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith <[email protected]>

Reply via email to