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> |
||
---|---|---|
.. | ||
Cache | ||
DataLakes | ||
Distributed | ||
examples | ||
FileLog | ||
fuzzers | ||
HDFS | ||
Hive | ||
Kafka | ||
LiveView | ||
MeiliSearch | ||
MergeTree | ||
MySQL | ||
NATS | ||
PostgreSQL | ||
RabbitMQ | ||
RocksDB | ||
S3Queue | ||
System | ||
tests | ||
WindowView | ||
AlterCommands.cpp | ||
AlterCommands.h | ||
buildQueryTreeForShard.cpp | ||
buildQueryTreeForShard.h | ||
checkAndGetLiteralArgument.cpp | ||
checkAndGetLiteralArgument.h | ||
CheckResults.h | ||
CMakeLists.txt | ||
ColumnDefault.cpp | ||
ColumnDefault.h | ||
ColumnDependency.h | ||
ColumnsDescription.cpp | ||
ColumnsDescription.h | ||
CompressionCodecSelector.h | ||
ConstraintsDescription.cpp | ||
ConstraintsDescription.h | ||
DataDestinationType.h | ||
ExecutableSettings.cpp | ||
ExecutableSettings.h | ||
ExternalDataSourceConfiguration.cpp | ||
ExternalDataSourceConfiguration.h | ||
extractKeyExpressionList.cpp | ||
extractKeyExpressionList.h | ||
extractTableFunctionArgumentsFromSelectQuery.cpp | ||
extractTableFunctionArgumentsFromSelectQuery.h | ||
Freeze.cpp | ||
Freeze.h | ||
getStructureOfRemoteTable.cpp | ||
getStructureOfRemoteTable.h | ||
getVirtualsForStorage.cpp | ||
getVirtualsForStorage.h | ||
IMessageProducer.cpp | ||
IMessageProducer.h | ||
IndicesDescription.cpp | ||
IndicesDescription.h | ||
IStorage_fwd.h | ||
IStorage.cpp | ||
IStorage.h | ||
IStorageCluster.cpp | ||
IStorageCluster.h | ||
KeyDescription.cpp | ||
KeyDescription.h | ||
KVStorageUtils.cpp | ||
KVStorageUtils.h | ||
LightweightDeleteDescription.cpp | ||
LightweightDeleteDescription.h | ||
MarkCache.h | ||
MemorySettings.cpp | ||
MemorySettings.h | ||
MessageQueueSink.cpp | ||
MessageQueueSink.h | ||
MutationCommands.cpp | ||
MutationCommands.h | ||
NamedCollectionsHelpers.cpp | ||
NamedCollectionsHelpers.h | ||
PartitionCommands.cpp | ||
PartitionCommands.h | ||
PartitionedSink.cpp | ||
PartitionedSink.h | ||
prepareReadingFromFormat.cpp | ||
prepareReadingFromFormat.h | ||
ProjectionsDescription.cpp | ||
ProjectionsDescription.h | ||
ReadFinalForExternalReplicaStorage.cpp | ||
ReadFinalForExternalReplicaStorage.h | ||
ReadInOrderOptimizer.cpp | ||
ReadInOrderOptimizer.h | ||
RedisCommon.cpp | ||
RedisCommon.h | ||
registerStorages.cpp | ||
registerStorages.h | ||
removeGroupingFunctionSpecializations.cpp | ||
removeGroupingFunctionSpecializations.h | ||
RenamingRestrictions.h | ||
SelectQueryDescription.cpp | ||
SelectQueryDescription.h | ||
SelectQueryInfo.cpp | ||
SelectQueryInfo.h | ||
SetSettings.cpp | ||
SetSettings.h | ||
StorageAzureBlob.cpp | ||
StorageAzureBlob.h | ||
StorageAzureBlobCluster.cpp | ||
StorageAzureBlobCluster.h | ||
StorageBuffer.cpp | ||
StorageBuffer.h | ||
StorageConfiguration.h | ||
StorageDictionary.cpp | ||
StorageDictionary.h | ||
StorageDistributed.cpp | ||
StorageDistributed.h | ||
StorageDummy.cpp | ||
StorageDummy.h | ||
StorageExecutable.cpp | ||
StorageExecutable.h | ||
StorageExternalDistributed.cpp | ||
StorageExternalDistributed.h | ||
StorageFactory.cpp | ||
StorageFactory.h | ||
StorageFile.cpp | ||
StorageFile.h | ||
StorageGenerateRandom.cpp | ||
StorageGenerateRandom.h | ||
StorageInMemoryMetadata.cpp | ||
StorageInMemoryMetadata.h | ||
StorageInput.cpp | ||
StorageInput.h | ||
StorageJoin.cpp | ||
StorageJoin.h | ||
StorageKeeperMap.cpp | ||
StorageKeeperMap.h | ||
StorageLog.cpp | ||
StorageLog.h | ||
StorageLogSettings.cpp | ||
StorageLogSettings.h | ||
StorageMaterializedMySQL.cpp | ||
StorageMaterializedMySQL.h | ||
StorageMaterializedView.cpp | ||
StorageMaterializedView.h | ||
StorageMemory.cpp | ||
StorageMemory.h | ||
StorageMerge.cpp | ||
StorageMerge.h | ||
StorageMergeTree.cpp | ||
StorageMergeTree.h | ||
StorageMongoDB.cpp | ||
StorageMongoDB.h | ||
StorageMongoDBSocketFactory.cpp | ||
StorageMongoDBSocketFactory.h | ||
StorageMySQL.cpp | ||
StorageMySQL.h | ||
StorageNull.cpp | ||
StorageNull.h | ||
StoragePostgreSQL.cpp | ||
StoragePostgreSQL.h | ||
StorageProxy.h | ||
StorageRedis.cpp | ||
StorageRedis.h | ||
StorageReplicatedMergeTree.cpp | ||
StorageReplicatedMergeTree.h | ||
StorageS3.cpp | ||
StorageS3.h | ||
StorageS3Cluster.cpp | ||
StorageS3Cluster.h | ||
StorageS3Settings.cpp | ||
StorageS3Settings.h | ||
StorageSet.cpp | ||
StorageSet.h | ||
StorageSnapshot.cpp | ||
StorageSnapshot.h | ||
StorageSQLite.cpp | ||
StorageSQLite.h | ||
StorageStripeLog.cpp | ||
StorageStripeLog.h | ||
StorageTableFunction.h | ||
StorageURL.cpp | ||
StorageURL.h | ||
StorageURLCluster.cpp | ||
StorageURLCluster.h | ||
StorageValues.cpp | ||
StorageValues.h | ||
StorageView.cpp | ||
StorageView.h | ||
StorageXDBC.cpp | ||
StorageXDBC.h | ||
TableLockHolder.h | ||
transformQueryForExternalDatabase.cpp | ||
transformQueryForExternalDatabase.h | ||
transformQueryForExternalDatabaseAnalyzer.cpp | ||
transformQueryForExternalDatabaseAnalyzer.h | ||
TTLDescription.cpp | ||
TTLDescription.h | ||
TTLMode.h | ||
UVLoop.h | ||
VirtualColumnUtils.cpp | ||
VirtualColumnUtils.h |