Michael Smith has submitted this change and it was merged. ( 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 in future Clang versions, aborting impalad mid-query (reproduced by TestNestedCollectionsInSelectList::test_array_in_select_list). Tuple::CodegenMaterializeExprs and TupleRowComparatorConfig::CodegenLexicalCompare have similar cases when inputs are empty. Replace VLAs with a std::vector. Change-Id: I9d476f5adc47d2a9e368a8960fa4e7c3817f43fd Assisted-by: Claude Sonnet 5 (GitHub Copilot) Reviewed-on: http://gerrit.cloudera.org:8080/24890 Reviewed-by: Jiyoung Yoo <[email protected]> Reviewed-by: Joe McDonnell <[email protected]> Reviewed-by: Michael Smith <[email protected]> Tested-by: Michael Smith <[email protected]> --- M be/src/exec/exec-node.cc M be/src/runtime/tuple.cc M be/src/util/tuple-row-compare.cc 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Jiyoung Yoo: Looks good to me, but someone else must approve Joe McDonnell: Looks good to me, but someone else must approve Michael Smith: Looks good to me, approved; Verified -- 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: merged Gerrit-Change-Id: I9d476f5adc47d2a9e368a8960fa4e7c3817f43fd Gerrit-Change-Number: 24890 Gerrit-PatchSet: 4 Gerrit-Owner: Michael Smith <[email protected]> Gerrit-Reviewer: Daniel Vanko <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jiyoung Yoo <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
