mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 03:12:43 +00:00
1e2b0c8dc4
Usually functions are validated before index analysis, however it is not the case for parallel replicas, and it requires additional checks before interpreting function arguments. <details> <summary>stack trace</summary> ``` ==172==WARNING: MemorySanitizer: use-of-uninitialized-value 0 0x55cf82aedd6c in DB::ASTFunction* typeid_cast<DB::ASTFunction*, DB::IAST>(DB::IAST*) build_docker/./src/Common/typeid_cast.h:42:73 1 0x55cf82aedd6c in DB::TypePromotion<DB::IAST>::CastHelper<DB::ASTFunction, false, false>::value(DB::IAST*) build_docker/./src/Common/TypePromotion.h:38:43 2 0x55cf82aedd6c in std::__1::invoke_result<decltype(&CastHelper<DB::ASTFunction, false>::value), DB::TypePromotion<DB::IAST>::CastHelper<DB::ASTFunction, false, std::is_reference_v<DB::ASTFunction>>, DB::IAST*>::type DB::TypePromotion<DB::IAST>::as<DB::ASTFunction>() build_docker/./src/> 3 0x55cf82aedd6c in DB::MergeTreeIndexConditionSet::operatorFromAST(std::__1::shared_ptr<DB::IAST>&) build_docker/./src/Storages/MergeTree/MergeTreeIndexSet.cpp:602:25 4 0x55cf82ae5bc1 in DB::MergeTreeIndexConditionSet::traverseAST(std::__1::shared_ptr<DB::IAST>&) const build_docker/./src/Storages/MergeTree/MergeTreeIndexSet.cpp:547:9 5 0x55cf82ae5de6 in DB::MergeTreeIndexConditionSet::traverseAST(std::__1::shared_ptr<DB::IAST>&) const build_docker/./src/Storages/MergeTree/MergeTreeIndexSet.cpp:552:13 6 0x55cf82ae06db in DB::MergeTreeIndexConditionSet::MergeTreeIndexConditionSet() build_docker/.> ... 12 0x55cf82aef09c in DB::MergeTreeIndexSet::createIndexCondition() const build_docker/./src/Storages/MergeTree/MergeTreeIndexSet.cpp:703:12 13 0x55cf84951cd4 in DB::buildIndexes() 14 0x55cf84955ed3 in DB::ReadFromMergeTree::selectRangesToReadImpl() 15 0x55cf8494caef in DB::ReadFromMergeTree::selectRangesToRead() 16 0x55cf82a409a9 in DB::MergeTreeDataSelectExecutor::estimateNumMarksToRead() 17 0x55cf827f728d in DB::MergeTreeData::canUseParallelReplicasBasedOnPKAnalysis() 18 0x55cf827f627e in DB::MergeTreeData::getQueryProcessingStage() 19 0x55cf7f2f4969 in DB::InterpreterSelectQuery::getSampleBlockImpl() build_docker/./src/Interpreters/InterpreterSelectQuery.cpp:937:31 20 0x55cf7f2daa00 in DB::InterpreterSelectQuery::InterpreterSelectQuery() 24 0x55cf7f520b98 in DB::InterpreterSelectWithUnionQuery::buildCurrentChildInterpreter() 25 0x55cf7f51b6cd in DB::InterpreterSelectWithUnionQuery::InterpreterSelectWithUnionQuery() 27 0x55cf7f1d4ea9 in DB::InterpreterFactory::get(std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context>, DB::SelectQueryOptions const&) build_docker/./src/Interpreters/InterpreterFactory.cpp:162:16 28 0x55cf8012e485 in DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) build_docker/./src/Interpreters/executeQuery.cpp:1032:31 29 0x55cf80121bc1 in DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) build_docker/./src/Interpreters/executeQuery.cpp:1229:30 30 0x55cf8389295f in DB::TCPHandler::runImpl() build_docker/./src/Server/TCPHandler.cpp:424:24 31 0x55cf838d7dfb in DB::TCPHandler::run() build_docker/./src/Server/TCPHandler.cpp:2050:9 ``` </details> CI: https://s3.amazonaws.com/clickhouse-test-reports/53214/d99b10c340909ed4ee2e6edf0921e8a2f8561b0d/fuzzer_astfuzzermsan/report.html Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com> |
||
---|---|---|
.. | ||
examples | ||
tests | ||
ActiveDataPartSet.cpp | ||
ActiveDataPartSet.h | ||
AllMergeSelector.cpp | ||
AllMergeSelector.h | ||
AlterConversions.cpp | ||
AlterConversions.h | ||
ApproximateNearestNeighborIndexesCommon.cpp | ||
ApproximateNearestNeighborIndexesCommon.h | ||
AsyncBlockIDsCache.cpp | ||
AsyncBlockIDsCache.h | ||
BackgroundJobsAssignee.cpp | ||
BackgroundJobsAssignee.h | ||
BackgroundProcessList.h | ||
BoolMask.cpp | ||
BoolMask.h | ||
checkDataPart.cpp | ||
checkDataPart.h | ||
CMakeLists.txt | ||
ColumnSizeEstimator.h | ||
DataPartsExchange.cpp | ||
DataPartsExchange.h | ||
DataPartStorageOnDiskBase.cpp | ||
DataPartStorageOnDiskBase.h | ||
DataPartStorageOnDiskFull.cpp | ||
DataPartStorageOnDiskFull.h | ||
DropPartsRanges.cpp | ||
DropPartsRanges.h | ||
EphemeralLockInZooKeeper.cpp | ||
EphemeralLockInZooKeeper.h | ||
extractZkPathFromCreateQuery.cpp | ||
extractZkPathFromCreateQuery.h | ||
FutureMergedMutatedPart.cpp | ||
FutureMergedMutatedPart.h | ||
GinIndexStore.cpp | ||
GinIndexStore.h | ||
IDataPartStorage.h | ||
IExecutableTask.h | ||
IMergedBlockOutputStream.cpp | ||
IMergedBlockOutputStream.h | ||
IMergeTreeDataPart.cpp | ||
IMergeTreeDataPart.h | ||
IMergeTreeDataPartInfoForReader.h | ||
IMergeTreeDataPartWriter.cpp | ||
IMergeTreeDataPartWriter.h | ||
IMergeTreeReader.cpp | ||
IMergeTreeReader.h | ||
IMergeTreeReadPool.h | ||
IntersectionsIndexes.h | ||
IPartMetadataManager.cpp | ||
IPartMetadataManager.h | ||
KeyCondition.cpp | ||
KeyCondition.h | ||
LeaderElection.h | ||
LevelMergeSelector.cpp | ||
LevelMergeSelector.h | ||
LoadedMergeTreeDataPartInfoForReader.h | ||
localBackup.cpp | ||
localBackup.h | ||
MarkRange.cpp | ||
MarkRange.h | ||
MergeAlgorithm.h | ||
MergedBlockOutputStream.cpp | ||
MergedBlockOutputStream.h | ||
MergedColumnOnlyOutputStream.cpp | ||
MergedColumnOnlyOutputStream.h | ||
MergeFromLogEntryTask.cpp | ||
MergeFromLogEntryTask.h | ||
MergeList.cpp | ||
MergeList.h | ||
MergeMutateSelectedEntry.h | ||
MergePlainMergeTreeTask.cpp | ||
MergePlainMergeTreeTask.h | ||
MergeProgress.h | ||
MergeSelector.h | ||
MergeTask.cpp | ||
MergeTask.h | ||
MergeTreeBackgroundExecutor.cpp | ||
MergeTreeBackgroundExecutor.h | ||
MergeTreeBaseSelectProcessor.cpp | ||
MergeTreeBaseSelectProcessor.h | ||
MergeTreeBlockReadUtils.cpp | ||
MergeTreeBlockReadUtils.h | ||
MergeTreeData.cpp | ||
MergeTreeData.h | ||
MergeTreeDataFormatVersion.h | ||
MergeTreeDataMergerMutator.cpp | ||
MergeTreeDataMergerMutator.h | ||
MergeTreeDataPartBuilder.cpp | ||
MergeTreeDataPartBuilder.h | ||
MergeTreeDataPartChecksum.cpp | ||
MergeTreeDataPartChecksum.h | ||
MergeTreeDataPartCompact.cpp | ||
MergeTreeDataPartCompact.h | ||
MergeTreeDataPartInMemory.cpp | ||
MergeTreeDataPartInMemory.h | ||
MergeTreeDataPartState.h | ||
MergeTreeDataPartTTLInfo.cpp | ||
MergeTreeDataPartTTLInfo.h | ||
MergeTreeDataPartType.h | ||
MergeTreeDataPartUUID.cpp | ||
MergeTreeDataPartUUID.h | ||
MergeTreeDataPartWide.cpp | ||
MergeTreeDataPartWide.h | ||
MergeTreeDataPartWriterCompact.cpp | ||
MergeTreeDataPartWriterCompact.h | ||
MergeTreeDataPartWriterInMemory.cpp | ||
MergeTreeDataPartWriterInMemory.h | ||
MergeTreeDataPartWriterOnDisk.cpp | ||
MergeTreeDataPartWriterOnDisk.h | ||
MergeTreeDataPartWriterWide.cpp | ||
MergeTreeDataPartWriterWide.h | ||
MergeTreeDataSelectExecutor.cpp | ||
MergeTreeDataSelectExecutor.h | ||
MergeTreeDataWriter.cpp | ||
MergeTreeDataWriter.h | ||
MergeTreeDeduplicationLog.cpp | ||
MergeTreeDeduplicationLog.h | ||
MergeTreeIndexAggregatorBloomFilter.cpp | ||
MergeTreeIndexAggregatorBloomFilter.h | ||
MergeTreeIndexAnnoy.cpp | ||
MergeTreeIndexAnnoy.h | ||
MergeTreeIndexBloomFilter.cpp | ||
MergeTreeIndexBloomFilter.h | ||
MergeTreeIndexConditionBloomFilter.cpp | ||
MergeTreeIndexConditionBloomFilter.h | ||
MergeTreeIndexFullText.cpp | ||
MergeTreeIndexFullText.h | ||
MergeTreeIndexGranularity.cpp | ||
MergeTreeIndexGranularity.h | ||
MergeTreeIndexGranularityInfo.cpp | ||
MergeTreeIndexGranularityInfo.h | ||
MergeTreeIndexGranuleBloomFilter.cpp | ||
MergeTreeIndexGranuleBloomFilter.h | ||
MergeTreeIndexHypothesis.cpp | ||
MergeTreeIndexHypothesis.h | ||
MergeTreeIndexHypothesisMergedCondition.cpp | ||
MergeTreeIndexHypothesisMergedCondition.h | ||
MergeTreeIndexInverted.cpp | ||
MergeTreeIndexInverted.h | ||
MergeTreeIndexMinMax.cpp | ||
MergeTreeIndexMinMax.h | ||
MergeTreeIndexReader.cpp | ||
MergeTreeIndexReader.h | ||
MergeTreeIndexSet.cpp | ||
MergeTreeIndexSet.h | ||
MergeTreeIndexUtils.cpp | ||
MergeTreeIndexUtils.h | ||
MergeTreeIndices.cpp | ||
MergeTreeIndices.h | ||
MergeTreeInOrderSelectProcessor.cpp | ||
MergeTreeInOrderSelectProcessor.h | ||
MergeTreeIOSettings.h | ||
MergeTreeMarksLoader.cpp | ||
MergeTreeMarksLoader.h | ||
MergeTreeMetadataCache.cpp | ||
MergeTreeMetadataCache.h | ||
MergeTreeMutationEntry.cpp | ||
MergeTreeMutationEntry.h | ||
MergeTreeMutationStatus.cpp | ||
MergeTreeMutationStatus.h | ||
MergeTreePartInfo.cpp | ||
MergeTreePartInfo.h | ||
MergeTreePartition.cpp | ||
MergeTreePartition.h | ||
MergeTreePartsMover.cpp | ||
MergeTreePartsMover.h | ||
MergeTreePrefetchedReadPool.cpp | ||
MergeTreePrefetchedReadPool.h | ||
MergeTreeRangeReader.cpp | ||
MergeTreeRangeReader.h | ||
MergeTreeReaderCompact.cpp | ||
MergeTreeReaderCompact.h | ||
MergeTreeReaderInMemory.cpp | ||
MergeTreeReaderInMemory.h | ||
MergeTreeReaderStream.cpp | ||
MergeTreeReaderStream.h | ||
MergeTreeReaderWide.cpp | ||
MergeTreeReaderWide.h | ||
MergeTreeReadPool.cpp | ||
MergeTreeReadPool.h | ||
MergeTreeReverseSelectProcessor.cpp | ||
MergeTreeReverseSelectProcessor.h | ||
MergeTreeSelectProcessor.cpp | ||
MergeTreeSelectProcessor.h | ||
MergeTreeSequentialSource.cpp | ||
MergeTreeSequentialSource.h | ||
MergeTreeSettings.cpp | ||
MergeTreeSettings.h | ||
MergeTreeSink.cpp | ||
MergeTreeSink.h | ||
MergeTreeSource.cpp | ||
MergeTreeSource.h | ||
MergeTreeSplitPrewhereIntoReadSteps.cpp | ||
MergeTreeThreadSelectProcessor.cpp | ||
MergeTreeThreadSelectProcessor.h | ||
MergeTreeWhereOptimizer.cpp | ||
MergeTreeWhereOptimizer.h | ||
MergeTreeWriteAheadLog.cpp | ||
MergeTreeWriteAheadLog.h | ||
MergeType.cpp | ||
MergeType.h | ||
MovesList.cpp | ||
MovesList.h | ||
MutateFromLogEntryTask.cpp | ||
MutateFromLogEntryTask.h | ||
MutatePlainMergeTreeTask.cpp | ||
MutatePlainMergeTreeTask.h | ||
MutateTask.cpp | ||
MutateTask.h | ||
ParallelReplicasReadingCoordinator.cpp | ||
ParallelReplicasReadingCoordinator.h | ||
PartitionPruner.cpp | ||
PartitionPruner.h | ||
PartMetadataManagerOrdinary.cpp | ||
PartMetadataManagerOrdinary.h | ||
PartMetadataManagerWithCache.cpp | ||
PartMetadataManagerWithCache.h | ||
PartMovesBetweenShardsOrchestrator.cpp | ||
PartMovesBetweenShardsOrchestrator.h | ||
PinnedPartUUIDs.cpp | ||
PinnedPartUUIDs.h | ||
RangesInDataPart.cpp | ||
RangesInDataPart.h | ||
registerStorageMergeTree.cpp | ||
ReplicatedFetchList.cpp | ||
ReplicatedFetchList.h | ||
ReplicatedMergeMutateTaskBase.cpp | ||
ReplicatedMergeMutateTaskBase.h | ||
ReplicatedMergeTreeAddress.cpp | ||
ReplicatedMergeTreeAddress.h | ||
ReplicatedMergeTreeAltersSequence.cpp | ||
ReplicatedMergeTreeAltersSequence.h | ||
ReplicatedMergeTreeAttachThread.cpp | ||
ReplicatedMergeTreeAttachThread.h | ||
ReplicatedMergeTreeCleanupThread.cpp | ||
ReplicatedMergeTreeCleanupThread.h | ||
ReplicatedMergeTreeLogEntry.cpp | ||
ReplicatedMergeTreeLogEntry.h | ||
ReplicatedMergeTreeMergeStrategyPicker.cpp | ||
ReplicatedMergeTreeMergeStrategyPicker.h | ||
ReplicatedMergeTreeMutationEntry.cpp | ||
ReplicatedMergeTreeMutationEntry.h | ||
ReplicatedMergeTreePartCheckThread.cpp | ||
ReplicatedMergeTreePartCheckThread.h | ||
ReplicatedMergeTreePartHeader.cpp | ||
ReplicatedMergeTreePartHeader.h | ||
ReplicatedMergeTreeQueue.cpp | ||
ReplicatedMergeTreeQueue.h | ||
ReplicatedMergeTreeQuorumAddedParts.h | ||
ReplicatedMergeTreeQuorumEntry.h | ||
ReplicatedMergeTreeRestartingThread.cpp | ||
ReplicatedMergeTreeRestartingThread.h | ||
ReplicatedMergeTreeSink.cpp | ||
ReplicatedMergeTreeSink.h | ||
ReplicatedMergeTreeTableMetadata.cpp | ||
ReplicatedMergeTreeTableMetadata.h | ||
ReplicatedTableStatus.h | ||
RequestResponse.cpp | ||
RequestResponse.h | ||
RPNBuilder.cpp | ||
RPNBuilder.h | ||
SimpleMergeSelector.cpp | ||
SimpleMergeSelector.h | ||
StorageFromMergeTreeDataPart.h | ||
TemporaryParts.cpp | ||
TemporaryParts.h | ||
TTLMergeSelector.cpp | ||
TTLMergeSelector.h | ||
ZeroCopyLock.cpp | ||
ZeroCopyLock.h | ||
ZooKeeperRetries.h |