Skip to content

Commit

Permalink
Make sure inputFlatNoNulls_ is initialized in ctor (facebookincubator…
Browse files Browse the repository at this point in the history
…#11140)

Summary:
Pull Request resolved: facebookincubator#11140

when `inputFlatNoNulls_` is not initialized, it could result in undefined behavior like one described in https://www.internalfb.com/diff/D63556283?dst_version_fbid=804905691596581&transaction_fbid=550949777494622

This diff initializes inputFlatNoNulls_ as false.

Differential Revision: D63673714
  • Loading branch information
Mingyu Zhang authored and facebook-github-bot committed Oct 1, 2024
1 parent f56f7bc commit c8fd98d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions velox/expression/EvalCtx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ EvalCtx::EvalCtx(core::ExecCtx* execCtx, ExprSet* exprSet, const RowVector* row)
EvalCtx::EvalCtx(core::ExecCtx* execCtx)
: execCtx_(execCtx), exprSet_(nullptr), row_(nullptr) {
VELOX_CHECK_NOT_NULL(execCtx);
inputFlatNoNulls_ = false;
}

void EvalCtx::saveAndReset(ContextSaver& saver, const SelectivityVector& rows) {
Expand Down

0 comments on commit c8fd98d

Please sign in to comment.