https://s3.amazonaws.com/clickhouse-test-reports/24258/9a505476a5c53dfbcc308139679fad5d47904b34/fuzzer_astfuzzerasan,actions//report.html

```
2022.03.22 00:50:00.054438 [ 208 ] {af2da264-7f7e-408a-a32b-09a3aceea34a} <Debug> executeQuery: (from [::ffff:127.0.0.1]:34518) SELECT 65536 AND 2147483647, throwIf((((1048575 AND throwIf((0. AND NULL) AND (((65536 AND 257) AND (1.1754943508222875e-38 AND 1024) AND -2147483649) AND NULL) AND (10 AND NULL)) AND (((65536 AND 257) AND (1.1754943508222875e-38 AND 1024) AND -1) AND NULL) AND 65535) AND -1) AND NULL) AND (NULL AND NULL), NULL < number) FROM numbers(1024)
2022.03.22 00:50:00.054823 [ 208 ] {af2da264-7f7e-408a-a32b-09a3aceea34a} <Trace> ContextAccess (default): Access granted: CREATE TEMPORARY TABLE ON *.*
2022.03.22 00:50:00.057259 [ 208 ] {af2da264-7f7e-408a-a32b-09a3aceea34a} <Trace> InterpreterSelectQuery: FetchColumns -> Complete
2022.03.22 00:50:01.440449 [ 455 ] {} <Fatal> BaseDaemon: (version 22.4.1.1, build id: E27D1D37997A9FB5) (from thread 431) (query_id: af2da264-7f7e-408a-a32b-09a3aceea34a) (query: SELECT 65536 AND 2147483647, throwIf((((1048575 AND throwIf((0. AND NULL) AND (((65536 AND 257) AND (1.1754943508222875e-38 AND 1024) AND -2147483649) AND NULL) AND (10 AND NULL)) AND (((65536 AND 257) AND (1.1754943508222875e-38 AND 1024) AND -1) AND NULL) AND 65535) AND -1) AND NULL) AND (NULL AND NULL), NULL < number) FROM numbers(1024)) Received signal Unknown signal (-3)



=================================================================
==106==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000f877e0 at pc 0x00002abc93b3 bp 0x7fd97f2ff8f0 sp 0x7fd97f2ff8e8
READ of size 1 at 0x603000f877e0 thread T222 (QueryPipelineEx)
    #0 0x2abc93b2 in unsigned long DB::extractMaskNumericImpl<false, true, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul> >(DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul>&, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, char8_t, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul> const*, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul>*) obj-x86_64-linux-gnu/../src/Columns/MaskOperations.cpp:104:29
    #1 0x2abc6655 in bool DB::extractMaskNumeric<false, char8_t>(DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul>&, COW<DB::IColumn>::immutable_ptr<DB::IColumn> const&, char8_t, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul> const*, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul>*, DB::MaskInfo&) obj-x86_64-linux-gnu/../src/Columns/MaskOperations.cpp:140:22
    #2 0x2abc6655 in DB::MaskInfo DB::extractMaskImpl<false>(DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul>&, COW<DB::IColumn>::immutable_ptr<DB::IColumn> const&, char8_t, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul> const*, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul>*) obj-x86_64-linux-gnu/../src/Columns/MaskOperations.cpp:200:11
    #3 0x2abc627b in DB::MaskInfo DB::extractMaskImpl<false>(DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul>&, COW<DB::IColumn>::immutable_ptr<DB::IColumn> const&, char8_t, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul> const*, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul>*) obj-x86_64-linux-gnu/../src/Columns/MaskOperations.cpp:195:16
    #4 0x14af1477 in DB::FunctionsLogicalDetail::FunctionAnyArityLogical<DB::FunctionsLogicalDetail::AndImpl, DB::NameAnd>::executeShortCircuit(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&) const (/workspace/clickhouse+0x14af1477)
    #5 0x14aeb284 in DB::FunctionsLogicalDetail::FunctionAnyArityLogical<DB::FunctionsLogicalDetail::AndImpl, DB::NameAnd>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x14aeb284)
    #6 0x12218a8b in DB::FunctionToExecutableFunctionAdaptor::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x12218a8b)
    #7 0x277cfc82 in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:216:15
    #8 0x277d0ba4 in DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:264:22
    #9 0x277d494e in DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:334:16
    #10 0x28a98289 in DB::executeAction(DB::ExpressionActions::Action const&, DB::(anonymous namespace)::ExecutionContext&, bool) obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:602:60
    #11 0x28a98289 in DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool) const obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:719:13
    #12 0x2c7d35da in DB::ExpressionTransform::transform(DB::Chunk&) obj-x86_64-linux-gnu/../src/Processors/Transforms/ExpressionTransform.cpp:23:17
    #13 0x1fdaa8fd in DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) obj-x86_64-linux-gnu/../src/Processors/ISimpleTransform.h:37:9
    #14 0x2c2888d7 in DB::ISimpleTransform::work() obj-x86_64-linux-gnu/../src/Processors/ISimpleTransform.cpp:89:9
    #15 0x2c2ea6e5 in DB::executeJob(DB::IProcessor*) obj-x86_64-linux-gnu/../src/Processors/Executors/ExecutionThreadContext.cpp:45:20
    #16 0x2c2ea6e5 in DB::ExecutionThreadContext::executeTask() obj-x86_64-linux-gnu/../src/Processors/Executors/ExecutionThreadContext.cpp:63:9
    #17 0x2c2cafc6 in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:213:26
    #18 0x2c2c94ee in DB::PipelineExecutor::executeSingleThread(unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:178:5
    #19 0x2c2c94ee in DB::PipelineExecutor::executeImpl(unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:324:9
    #20 0x2c2c87af in DB::PipelineExecutor::execute(unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:84:9
    #21 0x2c2f400c in DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:78:24
    #22 0x2c2f400c in DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0::operator()() const obj-x86_64-linux-gnu/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:105:13
    #23 0x2c2f400c in decltype(std::__1::forward<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&) obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3682:1
    #24 0x2c2f400c in decltype(auto) std::__1::__apply_tuple_impl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) obj-x86_64-linux-gnu/../contrib/libcxx/include/tuple:1415:1
    #25 0x2c2f400c in decltype(auto) std::__1::apply<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&) obj-x86_64-linux-gnu/../contrib/libcxx/include/tuple:1424:1
    #26 0x2c2f400c in ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()::operator()() obj-x86_64-linux-gnu/../src/Common/ThreadPool.h:188:13
    #27 0x2c2f400c in decltype(std::__1::forward<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&) obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676:1
    #28 0x2c2f400c in void std::__1::__invoke_void_return_wrapper<void>::__call<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&) obj-x86_64-linux-gnu/../contrib/libcxx/include/__functional_base:348:9
    #29 0x2c2f400c in std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>::operator()() obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:1608:12
    #30 0x2c2f400c in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2089:16
    #31 0xbf8a106 in std::__1::__function::__policy_func<void ()>::operator()() const obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2221:16
    #32 0xbf8a106 in std::__1::function<void ()>::operator()() const obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2560:12
    #33 0xbf8a106 in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:277:17
    #34 0xbf92696 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()::operator()() const obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:142:73
    #35 0xbf92696 in decltype(std::__1::forward<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()>(void&&) obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676:1
    #36 0xbf92696 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()>&, std::__1::__tuple_indices<>) obj-x86_64-linux-gnu/../contrib/libcxx/include/thread:280:5
    #37 0xbf92696 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()> >(void*) obj-x86_64-linux-gnu/../contrib/libcxx/include/thread:291:5
    #38 0x7fdad75b4608 in start_thread /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477:8
    #39 0x7fdad74d9162 in __clone /build/glibc-sMfBJT/glibc-2.31/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95

0x603000f877e0 is located 0 bytes to the right of 32-byte region [0x603000f877c0,0x603000f877e0)
allocated by thread T222 (QueryPipelineEx) here:
    #0 0xbd665dd in malloc (/workspace/clickhouse+0xbd665dd)
    #1 0xbeaa80a in Allocator<false, false>::allocNoTrack(unsigned long, unsigned long) obj-x86_64-linux-gnu/../src/Common/Allocator.h:227:27
    #2 0x2a7a2681 in Allocator<false, false>::alloc(unsigned long, unsigned long) obj-x86_64-linux-gnu/../src/Common/Allocator.h:96:16
    #3 0x2a7a2681 in void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::alloc<>(unsigned long) obj-x86_64-linux-gnu/../src/Common/PODArray.h:128:65
    #4 0x2a7a2681 in DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::alloc_for_num_elements(unsigned long) obj-x86_64-linux-gnu/../src/Common/PODArray.h:122:9
    #5 0x2a7a2681 in DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul>::PODArray(unsigned long, char8_t const&) obj-x86_64-linux-gnu/../src/Common/PODArray.h:346:15
    #6 0x2a7a2681 in DB::ColumnVector<char8_t>::ColumnVector(unsigned long, char8_t) obj-x86_64-linux-gnu/../src/Columns/ColumnVector.h:132:55
    #7 0x2a7a2681 in COW<DB::IColumn>::mutable_ptr<DB::ColumnVector<char8_t> > COWHelper<DB::ColumnVectorHelper, DB::ColumnVector<char8_t> >::create<unsigned long, int>(unsigned long&&, int&&) obj-x86_64-linux-gnu/../src/Common/COW.h:284:71
    #8 0x2a7a2681 in DB::makeNullable(COW<DB::IColumn>::immutable_ptr<DB::IColumn> const&) obj-x86_64-linux-gnu/../src/Columns/ColumnNullable.cpp:720:43
    #9 0x277ef4eb in DB::wrapInNullable(COW<DB::IColumn>::immutable_ptr<DB::IColumn> const&, std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) obj-x86_64-linux-gnu/../src/Functions/FunctionHelpers.cpp:293:16
    #10 0x277d032e in DB::IExecutableFunction::defaultImplementationForNulls(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:197:16
    #11 0x277cfb86 in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:209:20
    #12 0x277d0ba4 in DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:264:22
    #13 0x277d494e in DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:334:16
    #14 0x12217e36 in DB::IFunctionBase::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const (/workspace/clickhouse+0x12217e36)
    #15 0x2a72ed36 in DB::ColumnFunction::reduce() const obj-x86_64-linux-gnu/../src/Columns/ColumnFunction.cpp:269:28
    #16 0x2abba79c in DB::maskedExecute(DB::ColumnWithTypeAndName&, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, DB::MaskInfo const&) obj-x86_64-linux-gnu/../src/Columns/MaskOperations.cpp:279:35
    #17 0x14af14ed in DB::FunctionsLogicalDetail::FunctionAnyArityLogical<DB::FunctionsLogicalDetail::AndImpl, DB::NameAnd>::executeShortCircuit(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> >&, std::__1::shared_ptr<DB::IDataType const> const&) const (/workspace/clickhouse+0x14af14ed)
    #18 0x14aeb284 in DB::FunctionsLogicalDetail::FunctionAnyArityLogical<DB::FunctionsLogicalDetail::AndImpl, DB::NameAnd>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x14aeb284)
    #19 0x12218a8b in DB::FunctionToExecutableFunctionAdaptor::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/workspace/clickhouse+0x12218a8b)
    #20 0x277cfc82 in DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:216:15
    #21 0x277d0ba4 in DB::IExecutableFunction::executeWithoutSparseColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:264:22
    #22 0x277d494e in DB::IExecutableFunction::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:334:16
    #23 0x28a98289 in DB::executeAction(DB::ExpressionActions::Action const&, DB::(anonymous namespace)::ExecutionContext&, bool) obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:602:60
    #24 0x28a98289 in DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool) const obj-x86_64-linux-gnu/../src/Interpreters/ExpressionActions.cpp:719:13
    #25 0x2c7d35da in DB::ExpressionTransform::transform(DB::Chunk&) obj-x86_64-linux-gnu/../src/Processors/Transforms/ExpressionTransform.cpp:23:17
    #26 0x1fdaa8fd in DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) obj-x86_64-linux-gnu/../src/Processors/ISimpleTransform.h:37:9
    #27 0x2c2888d7 in DB::ISimpleTransform::work() obj-x86_64-linux-gnu/../src/Processors/ISimpleTransform.cpp:89:9
    #28 0x2c2ea6e5 in DB::executeJob(DB::IProcessor*) obj-x86_64-linux-gnu/../src/Processors/Executors/ExecutionThreadContext.cpp:45:20
    #29 0x2c2ea6e5 in DB::ExecutionThreadContext::executeTask() obj-x86_64-linux-gnu/../src/Processors/Executors/ExecutionThreadContext.cpp:63:9
    #30 0x2c2cafc6 in DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:213:26
    #31 0x2c2c94ee in DB::PipelineExecutor::executeSingleThread(unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:178:5
    #32 0x2c2c94ee in DB::PipelineExecutor::executeImpl(unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:324:9
    #33 0x2c2c87af in DB::PipelineExecutor::execute(unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PipelineExecutor.cpp:84:9
    #34 0x2c2f400c in DB::threadFunction(DB::PullingAsyncPipelineExecutor::Data&, std::__1::shared_ptr<DB::ThreadGroupStatus>, unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:78:24
    #35 0x2c2f400c in DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0::operator()() const obj-x86_64-linux-gnu/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:105:13
    #36 0x2c2f400c in decltype(std::__1::forward<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(fp)()) std::__1::__invoke_constexpr<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&) obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3682:1
    #37 0x2c2f400c in decltype(auto) std::__1::__apply_tuple_impl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) obj-x86_64-linux-gnu/../contrib/libcxx/include/tuple:1415:1
    #38 0x2c2f400c in decltype(auto) std::__1::apply<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&, std::__1::tuple<>&) obj-x86_64-linux-gnu/../contrib/libcxx/include/tuple:1424:1
    #39 0x2c2f400c in ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()::operator()() obj-x86_64-linux-gnu/../src/Common/ThreadPool.h:188:13
    #40 0x2c2f400c in decltype(std::__1::forward<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(fp)()) std::__1::__invoke<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&) obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676:1
    #41 0x2c2f400c in void std::__1::__invoke_void_return_wrapper<void>::__call<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&>(ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'()&) obj-x86_64-linux-gnu/../contrib/libcxx/include/__functional_base:348:9
    #42 0x2c2f400c in std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>::operator()() obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:1608:12
    #43 0x2c2f400c in void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()> >(std::__1::__function::__policy_storage const*) obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2089:16
    #44 0xbf8a106 in std::__1::__function::__policy_func<void ()>::operator()() const obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2221:16
    #45 0xbf8a106 in std::__1::function<void ()>::operator()() const obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2560:12
    #46 0xbf8a106 in ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:277:17
    #47 0xbf92696 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()::operator()() const obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:142:73
    #48 0xbf92696 in decltype(std::__1::forward<void>(fp)()) std::__1::__invoke<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()>(void&&) obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676:1
    #49 0xbf92696 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()>&, std::__1::__tuple_indices<>) obj-x86_64-linux-gnu/../contrib/libcxx/include/thread:280:5
    #50 0xbf92696 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'()> >(void*) obj-x86_64-linux-gnu/../contrib/libcxx/include/thread:291:5
    #51 0x7fdad75b4608 in start_thread /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477:8

Thread T222 (QueryPipelineEx) created by T3 (TCPHandler) here:
    #0 0xbd50c9c in pthread_create (/workspace/clickhouse+0xbd50c9c)
    #1 0xbf91676 in std::__1::__libcpp_thread_create(unsigned long*, void* (*)(void*), void*) obj-x86_64-linux-gnu/../contrib/libcxx/include/__threading_support:509:10
    #2 0xbf91676 in std::__1::thread::thread<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda0'(), void>(void&&) obj-x86_64-linux-gnu/../contrib/libcxx/include/thread:307:16
    #3 0xbf869d9 in void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>) obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:142:35
    #4 0xbf883fc in ThreadPoolImpl<std::__1::thread>::scheduleOrThrow(std::__1::function<void ()>, int, unsigned long) obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:174:5
    #5 0x2c2f05cf in ThreadFromGlobalPool::ThreadFromGlobalPool<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&) obj-x86_64-linux-gnu/../src/Common/ThreadPool.h:169:38
    #6 0x2c2f05cf in DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:108:24
    #7 0x2c2f195a in DB::PullingAsyncPipelineExecutor::pull(DB::Block&, unsigned long) obj-x86_64-linux-gnu/../src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:145:10
    #8 0x2c1d81b3 in DB::TCPHandler::processOrdinaryQueryWithProcessors() obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:679:25
    #9 0x2c1c7183 in DB::TCPHandler::runImpl() obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:345:17
    #10 0x2c1eef9f in DB::TCPHandler::run() obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:1767:9
    #11 0x2e95ab4e in Poco::Net::TCPServerConnection::start() obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerConnection.cpp:43:3
    #12 0x2e95b8c0 in Poco::Net::TCPServerDispatcher::run() obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #13 0x2ee2d205 in Poco::PooledThread::run() obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/ThreadPool.cpp:199:14
    #14 0x2ee264b9 in Poco::ThreadImpl::runnableEntry(void*) obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345:27
    #15 0x7fdad75b4608 in start_thread /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477:8

Thread T3 (TCPHandler) created by T0 here:
    #0 0xbd50c9c in pthread_create (/workspace/clickhouse+0xbd50c9c)
    #1 0x2ee25769 in Poco::ThreadImpl::startImpl(Poco::SharedPtr<Poco::Runnable, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::Runnable> >) obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread_POSIX.cpp:202:6
    #2 0x2ee287fd in Poco::Thread::start(Poco::Runnable&) obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread.cpp:128:2
    #3 0x2ee2dbf9 in Poco::PooledThread::start() obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/ThreadPool.cpp:85:10
    #4 0x2ee2dbf9 in Poco::ThreadPool::ThreadPool(int, int, int, int) obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/ThreadPool.cpp:252:12
    #5 0xbdad938 in DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) obj-x86_64-linux-gnu/../programs/server/Server.cpp:572:22
    #6 0x2e9937da in Poco::Util::Application::run() obj-x86_64-linux-gnu/../contrib/poco/Util/src/Application.cpp:334:8
    #7 0xbda6c98 in DB::Server::run() obj-x86_64-linux-gnu/../programs/server/Server.cpp:452:25
    #8 0x2e9d6f5d in Poco::Util::ServerApplication::run(int, char**) obj-x86_64-linux-gnu/../contrib/poco/Util/src/ServerApplication.cpp:611:9
    #9 0xbda03fd in mainEntryClickHouseServer(int, char**) obj-x86_64-linux-gnu/../programs/server/Server.cpp:183:20
    #10 0xbd9bf88 in main obj-x86_64-linux-gnu/../programs/main.cpp:378:12
    #11 0x7fdad73de0b2 in __libc_start_main /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16

SUMMARY: AddressSanitizer: heap-buffer-overflow obj-x86_64-linux-gnu/../src/Columns/MaskOperations.cpp:104:29 in unsigned long DB::extractMaskNumericImpl<false, true, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul> >(DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul>&, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul> const&, char8_t, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul> const*, DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 15ul, 16ul>*)
Shadow bytes around the buggy address:
  0x0c06801e8ea0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c06801e8eb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c06801e8ec0: fa fa fa fa fa fa fa fa 00 00 00 00 fa fa fa fa
  0x0c06801e8ed0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c06801e8ee0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c06801e8ef0: fa fa fd fd fd fa fa fa 00 00 00 00[fa]fa fa fa
  0x0c06801e8f00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
--
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==106==ABORTING

```
{
    const auto * column_function = checkAndGetShortCircuitArgument(column.column);
    if (!column_function)
        return;
    if (!empty)
        column = column_function->reduce();
    else
        column.column = column_function->getResultType()->createColumn();
}
int checkShortCircuitArguments(const ColumnsWithTypeAndName & arguments)
{
    int last_short_circuit_argument_index = -1;
    for (size_t i = 0; i != arguments.size(); ++i)
    {
        if (checkAndGetShortCircuitArgument(arguments[i].column))
            last_short_circuit_argument_index = i;
    }
    return last_short_circuit_argument_index;
}
void copyMask(const PaddedPODArray<UInt8> & from, PaddedPODArray<UInt8> & to)
{
    if (from.size() != to.size())
        throw Exception("Cannot copy mask, because source and destination have different size", ErrorCodes::LOGICAL_ERROR);
    if (from.empty())
        return;
    memcpy(to.data(), from.data(), from.size() * sizeof(*from.data()));
}
}