Skip to content

MemorySanitizer: use-of-uninitialized-value FileCacheKey #52012

@qoega

Description

@qoega

https://s3.amazonaws.com/clickhouse-test-reports/0/41b8fa9a60a8d8f4d7c0aac6cd53e953a45c5313/stress_test__msan_.html

==1758==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x558958d3d641 in impl::unhexDigit(char) build_docker/./base/base/../base/hex.h:116:16
    #1 0x558958d3d641 in impl::HexConversionUInt<unsigned long, void>::unhex(char const*) build_docker/./base/base/../base/hex.h:162:28
    #2 0x558958d3d641 in impl::HexConversionUInt<wide::integer<128ul, unsigned int>, void>::unhex(char const*) build_docker/./base/base/../base/hex.h:171:28
    #3 0x55895ddd1a98 in wide::integer<128ul, unsigned int> unhexUInt<wide::integer<128ul, unsigned int>>(char const*) build_docker/./base/base/../base/hex.h:266:12
    #4 0x55895ddd1a98 in DB::FileCacheKey::fromKeyString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_docker/./src/Interpreters/Cache/FileCacheKey.cpp:33:25
    #5 0x55895d148876 in DB::InterpreterSystemQuery::execute() build_docker/./src/Interpreters/InterpreterSystemQuery.cpp:379:32
    #6 0x55895dcd1ad1 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:746:40
    #7 0x55895dcc5941 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:1168:30
    #8 0x5589611a3697 in DB::TCPHandler::runImpl() build_docker/./src/Server/TCPHandler.cpp:421:24
    #9 0x5589611e295e in DB::TCPHandler::run() build_docker/./src/Server/TCPHandler.cpp:2057:9
    #10 0x55896bb3243f in Poco::Net::TCPServerConnection::start() build_docker/./base/poco/Net/src/TCPServerConnection.cpp:43:3
    #11 0x55896bb332a1 in Poco::Net::TCPServerDispatcher::run() build_docker/./base/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #12 0x55896c0a7545 in Poco::PooledThread::run() build_docker/./base/poco/Foundation/src/ThreadPool.cpp:188:14
    #13 0x55896c0a436d in Poco::(anonymous namespace)::RunnableHolder::run() build_docker/./base/poco/Foundation/src/Thread.cpp:45:11
    #14 0x55896c0a12d1 in Poco::ThreadImpl::runnableEntry(void*) build_docker/./base/poco/Foundation/src/Thread_POSIX.cpp:335:27
    #15 0x7ff32a0d6b42  (/lib/x86_64-linux-gnu/libc.so.6+0x94b42) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)
    #16 0x7ff32a1689ff  (/lib/x86_64-linux-gnu/libc.so.6+0x1269ff) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)

  Uninitialized value was stored to memory at
    #0 0x558958d3d63a in std::__1::basic_string_view<char, std::__1::char_traits<char>>::operator[][abi:v15000](unsigned long) const build_docker/./contrib/llvm-project/libcxx/include/string_view:387:83
    #1 0x558958d3d63a in impl::unhexDigit(char) build_docker/./base/base/../base/hex.h:116:16
    #2 0x558958d3d63a in impl::HexConversionUInt<unsigned long, void>::unhex(char const*) build_docker/./base/base/../base/hex.h:162:28
    #3 0x558958d3d63a in impl::HexConversionUInt<wide::integer<128ul, unsigned int>, void>::unhex(char const*) build_docker/./base/base/../base/hex.h:171:28
    #4 0x55895ddd1a98 in wide::integer<128ul, unsigned int> unhexUInt<wide::integer<128ul, unsigned int>>(char const*) build_docker/./base/base/../base/hex.h:266:12
    #5 0x55895ddd1a98 in DB::FileCacheKey::fromKeyString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_docker/./src/Interpreters/Cache/FileCacheKey.cpp:33:25
    #6 0x55895d148876 in DB::InterpreterSystemQuery::execute() build_docker/./src/Interpreters/InterpreterSystemQuery.cpp:379:32
    #7 0x55895dcd1ad1 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:746:40
    #8 0x55895dcc5941 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:1168:30
    #9 0x5589611a3697 in DB::TCPHandler::runImpl() build_docker/./src/Server/TCPHandler.cpp:421:24
    #10 0x5589611e295e in DB::TCPHandler::run() build_docker/./src/Server/TCPHandler.cpp:2057:9
    #11 0x55896bb3243f in Poco::Net::TCPServerConnection::start() build_docker/./base/poco/Net/src/TCPServerConnection.cpp:43:3
    #12 0x55896bb332a1 in Poco::Net::TCPServerDispatcher::run() build_docker/./base/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #13 0x55896c0a7545 in Poco::PooledThread::run() build_docker/./base/poco/Foundation/src/ThreadPool.cpp:188:14
    #14 0x55896c0a436d in Poco::(anonymous namespace)::RunnableHolder::run() build_docker/./base/poco/Foundation/src/Thread.cpp:45:11
    #15 0x55896c0a12d1 in Poco::ThreadImpl::runnableEntry(void*) build_docker/./base/poco/Foundation/src/Thread_POSIX.cpp:335:27
    #16 0x7ff32a0d6b42  (/lib/x86_64-linux-gnu/libc.so.6+0x94b42) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)

  Uninitialized value was stored to memory at
    #0 0x55892baf5ada in __msan_memcpy (/usr/bin/clickhouse+0xf6c5ada) (BuildId: d9ca2586616e61bde10996b0d42bb80c50a3c15e)
    #1 0x558962b50526 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_docker/./contrib/llvm-project/libcxx/include/string:2013:26
    #2 0x558962b50526 in DB::ASTSystemQuery::ASTSystemQuery(DB::ASTSystemQuery const&) build_docker/./src/Parsers/ASTSystemQuery.h:13:7
    #3 0x558962b4ebc4 in DB::ASTSystemQuery* std::__1::construct_at[abi:v15000]<DB::ASTSystemQuery, DB::ASTSystemQuery const&, DB::ASTSystemQuery*>(DB::ASTSystemQuery*, DB::ASTSystemQuery const&) build_docker/./contrib/llvm-project/libcxx/include/__memory/construct_at.h:35:48
    #4 0x558962b4ebc4 in void std::__1::allocator_traits<std::__1::allocator<DB::ASTSystemQuery>>::construct[abi:v15000]<DB::ASTSystemQuery, DB::ASTSystemQuery const&, void, void>(std::__1::allocator<DB::ASTSystemQuery>&, DB::ASTSystemQuery*, DB::ASTSystemQuery const&) build_docker/./contrib/llvm-project/libcxx/include/__memory/allocator_traits.h:298:9
    #5 0x558962b4ebc4 in std::__1::__shared_ptr_emplace<DB::ASTSystemQuery, std::__1::allocator<DB::ASTSystemQuery>>::__shared_ptr_emplace[abi:v15000]<DB::ASTSystemQuery const&>(std::__1::allocator<DB::ASTSystemQuery>, DB::ASTSystemQuery const&) build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:292:9
    #6 0x558962b4ebc4 in std::__1::shared_ptr<DB::ASTSystemQuery> std::__1::allocate_shared[abi:v15000]<DB::ASTSystemQuery, std::__1::allocator<DB::ASTSystemQuery>, DB::ASTSystemQuery const&, void>(std::__1::allocator<DB::ASTSystemQuery> const&, DB::ASTSystemQuery const&) build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:953:55
    #7 0x558962b4d35e in std::__1::shared_ptr<DB::ASTSystemQuery> std::__1::make_shared[abi:v15000]<DB::ASTSystemQuery, DB::ASTSystemQuery const&, void>(DB::ASTSystemQuery const&) build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:962:12
    #8 0x558962b4d35e in DB::ASTSystemQuery::clone() const build_docker/./src/Parsers/ASTSystemQuery.h:125:20
    #9 0x55895d1435b6 in DB::InterpreterSystemQuery::InterpreterSystemQuery(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::Context>) build_docker/./src/Interpreters/InterpreterSystemQuery.cpp:235:63
    #10 0x55895cdda3cc in std::__1::__unique_if<DB::InterpreterSystemQuery>::__unique_single std::__1::make_unique[abi:v15000]<DB::InterpreterSystemQuery, std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context>&>(std::__1::shared_ptr<DB::IAST>&, std::__1::shared_ptr<DB::Context>&) build_docker/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:714:32
    #11 0x55895cdd61ac 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:287:16
    #12 0x55895dccf6f4 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:692:31
    #13 0x55895dcc5941 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:1168:30
    #14 0x5589611a3697 in DB::TCPHandler::runImpl() build_docker/./src/Server/TCPHandler.cpp:421:24
    #15 0x5589611e295e in DB::TCPHandler::run() build_docker/./src/Server/TCPHandler.cpp:2057:9
    #16 0x55896bb3243f in Poco::Net::TCPServerConnection::start() build_docker/./base/poco/Net/src/TCPServerConnection.cpp:43:3
    #17 0x55896bb332a1 in Poco::Net::TCPServerDispatcher::run() build_docker/./base/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #18 0x55896c0a7545 in Poco::PooledThread::run() build_docker/./base/poco/Foundation/src/ThreadPool.cpp:188:14
    #19 0x55896c0a436d in Poco::(anonymous namespace)::RunnableHolder::run() build_docker/./base/poco/Foundation/src/Thread.cpp:45:11
    #20 0x55896c0a12d1 in Poco::ThreadImpl::runnableEntry(void*) build_docker/./base/poco/Foundation/src/Thread_POSIX.cpp:335:27
    #21 0x7ff32a0d6b42  (/lib/x86_64-linux-gnu/libc.so.6+0x94b42) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)

  Uninitialized value was stored to memory at
    #0 0x55892baf5ada in __msan_memcpy (/usr/bin/clickhouse+0xf6c5ada) (BuildId: d9ca2586616e61bde10996b0d42bb80c50a3c15e)
    #1 0x55892bbba165 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::operator=(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) CastOverloadResolver.cpp
    #2 0x558962d13f7c in DB::ParserSystemQuery::parseImpl(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&) build_docker/./src/Parsers/ParserSystemQuery.cpp:412:38
    #3 0x558962c4b1d4 in DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0::operator()() const build_docker/./src/Parsers/IParserBase.cpp:13:20
    #4 0x558962c4b1d4 in bool DB::IParserBase::wrapParseImpl<DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0>(DB::IParser::Pos&, DB::IParserBase::IncreaseDepthTag, DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0 const&) build_docker/./src/Parsers/IParserBase.h:31:20
    #5 0x558962c4b1d4 in DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&) build_docker/./src/Parsers/IParserBase.cpp:11:12
    #6 0x558962cb7f1c in DB::ParserQuery::parseImpl(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&) build_docker/./src/Parsers/ParserQuery.cpp:69:21
    #7 0x558962c4b1d4 in DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0::operator()() const build_docker/./src/Parsers/IParserBase.cpp:13:20
    #8 0x558962c4b1d4 in bool DB::IParserBase::wrapParseImpl<DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0>(DB::IParser::Pos&, DB::IParserBase::IncreaseDepthTag, DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0 const&) build_docker/./src/Parsers/IParserBase.h:31:20
    #9 0x558962c4b1d4 in DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&) build_docker/./src/Parsers/IParserBase.cpp:11:12
    #10 0x558962d7a2d6 in DB::tryParseQuery(DB::IParser&, char const*&, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool, unsigned long, unsigned long, bool) build_docker/./src/Parsers/parseQuery.cpp:262:35
    #11 0x558962d7e69a in DB::parseQueryAndMovePosition(DB::IParser&, char const*&, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool, unsigned long, unsigned long) build_docker/./src/Parsers/parseQuery.cpp:358:18
    #12 0x558962d7e9ef in DB::parseQuery(DB::IParser&, char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned long, unsigned long) build_docker/./src/Parsers/parseQuery.cpp:375:12
    #13 0x55895dcc7984 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:386:19
    #14 0x55895dcc5941 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:1168:30
    #15 0x5589611a3697 in DB::TCPHandler::runImpl() build_docker/./src/Server/TCPHandler.cpp:421:24
    #16 0x5589611e295e in DB::TCPHandler::run() build_docker/./src/Server/TCPHandler.cpp:2057:9
    #17 0x55896bb3243f in Poco::Net::TCPServerConnection::start() build_docker/./base/poco/Net/src/TCPServerConnection.cpp:43:3
    #18 0x55896bb332a1 in Poco::Net::TCPServerDispatcher::run() build_docker/./base/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #19 0x55896c0a7545 in Poco::PooledThread::run() build_docker/./base/poco/Foundation/src/ThreadPool.cpp:188:14
    #20 0x55896c0a436d in Poco::(anonymous namespace)::RunnableHolder::run() build_docker/./base/poco/Foundation/src/Thread.cpp:45:11
    #21 0x55896c0a12d1 in Poco::ThreadImpl::runnableEntry(void*) build_docker/./base/poco/Foundation/src/Thread_POSIX.cpp:335:27
    #22 0x7ff32a0d6b42  (/lib/x86_64-linux-gnu/libc.so.6+0x94b42) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)

  Uninitialized value was stored to memory at
    #0 0x55892baf5ada in __msan_memcpy (/usr/bin/clickhouse+0xf6c5ada) (BuildId: d9ca2586616e61bde10996b0d42bb80c50a3c15e)
    #1 0x558962ab5671 in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_docker/./contrib/llvm-project/libcxx/include/string:2013:26
    #2 0x558962ab5671 in DB::ASTIdentifier::ASTIdentifier(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::IAST>&&) build_docker/./src/Parsers/ASTIdentifier.cpp:19:7
    #3 0x5589577badb4 in void std::__1::allocator_traits<std::__1::allocator<DB::ASTIdentifier>>::construct[abi:v15000]<DB::ASTIdentifier, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, void, void>(std::__1::allocator<DB::ASTIdentifier>&, DB::ASTIdentifier*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&&) (/usr/bin/clickhouse+0x3b38adb4) (BuildId: d9ca2586616e61bde10996b0d42bb80c50a3c15e)
    #4 0x5589577bac19 in std::__1::shared_ptr<DB::ASTIdentifier> std::__1::allocate_shared[abi:v15000]<DB::ASTIdentifier, std::__1::allocator<DB::ASTIdentifier>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, void>(std::__1::allocator<DB::ASTIdentifier> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&&) ParserJSONPathMemberAccess.cpp
    #5 0x558962b8b3ae in std::__1::shared_ptr<DB::ASTIdentifier> std::__1::make_shared[abi:v15000]<DB::ASTIdentifier, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, void>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&&) build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:962:12
    #6 0x558962b8b3ae in DB::ParserIdentifier::parseImpl(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&) build_docker/./src/Parsers/ExpressionElementParsers.cpp:193:16
    #7 0x558962c4b1d4 in DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0::operator()() const build_docker/./src/Parsers/IParserBase.cpp:13:20
    #8 0x558962c4b1d4 in bool DB::IParserBase::wrapParseImpl<DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0>(DB::IParser::Pos&, DB::IParserBase::IncreaseDepthTag, DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0 const&) build_docker/./src/Parsers/IParserBase.h:31:20
    #9 0x558962c4b1d4 in DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&) build_docker/./src/Parsers/IParserBase.cpp:11:12
    #10 0x558962d13e25 in DB::ParserSystemQuery::parseImpl(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&) build_docker/./src/Parsers/ParserSystemQuery.cpp:410:86
    #11 0x558962c4b1d4 in DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0::operator()() const build_docker/./src/Parsers/IParserBase.cpp:13:20
    #12 0x558962c4b1d4 in bool DB::IParserBase::wrapParseImpl<DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0>(DB::IParser::Pos&, DB::IParserBase::IncreaseDepthTag, DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0 const&) build_docker/./src/Parsers/IParserBase.h:31:20
    #13 0x558962c4b1d4 in DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&) build_docker/./src/Parsers/IParserBase.cpp:11:12
    #14 0x558962cb7f1c in DB::ParserQuery::parseImpl(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&) build_docker/./src/Parsers/ParserQuery.cpp:69:21
    #15 0x558962c4b1d4 in DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0::operator()() const build_docker/./src/Parsers/IParserBase.cpp:13:20
    #16 0x558962c4b1d4 in bool DB::IParserBase::wrapParseImpl<DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0>(DB::IParser::Pos&, DB::IParserBase::IncreaseDepthTag, DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&)::$_0 const&) build_docker/./src/Parsers/IParserBase.h:31:20
    #17 0x558962c4b1d4 in DB::IParserBase::parse(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&) build_docker/./src/Parsers/IParserBase.cpp:11:12
    #18 0x558962d7a2d6 in DB::tryParseQuery(DB::IParser&, char const*&, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool, unsigned long, unsigned long, bool) build_docker/./src/Parsers/parseQuery.cpp:262:35
    #19 0x558962d7e69a in DB::parseQueryAndMovePosition(DB::IParser&, char const*&, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool, unsigned long, unsigned long) build_docker/./src/Parsers/parseQuery.cpp:358:18
    #20 0x558962d7e9ef in DB::parseQuery(DB::IParser&, char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned long, unsigned long) build_docker/./src/Parsers/parseQuery.cpp:375:12
    #21 0x55895dcc7984 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:386:19
    #22 0x55895dcc5941 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:1168:30
    #23 0x5589611a3697 in DB::TCPHandler::runImpl() build_docker/./src/Server/TCPHandler.cpp:421:24
    #24 0x5589611e295e in DB::TCPHandler::run() build_docker/./src/Server/TCPHandler.cpp:2057:9
    #25 0x55896bb3243f in Poco::Net::TCPServerConnection::start() build_docker/./base/poco/Net/src/TCPServerConnection.cpp:43:3
    #26 0x55896bb332a1 in Poco::Net::TCPServerDispatcher::run() build_docker/./base/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #27 0x55896c0a7545 in Poco::PooledThread::run() build_docker/./base/poco/Foundation/src/ThreadPool.cpp:188:14

  Uninitialized value was created by an allocation of 'ref.tmp33' in the stack frame
    #0 0x558962b89d31 in DB::ParserIdentifier::parseImpl(DB::IParser::Pos&, std::__1::shared_ptr<DB::IAST>&, DB::Expected&) build_docker/./src/Parsers/ExpressionElementParsers.cpp:193:48

SUMMARY: MemorySanitizer: use-of-uninitialized-value build_docker/./base/base/../base/hex.h:116:16 in impl::unhexDigit(char)
Exiting
Uninitialized bytes in __interceptor_write at offset 0 inside [0x7fec79751630, 392)
==1758==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x558944119ec5 in DB::WriteBufferFromFileDescriptorDiscardOnFailure::nextImpl() build_docker/./src/IO/WriteBufferFromFileDescriptorDiscardOnFailure.cpp:16:23
    #1 0x5589447cf711 in DB::WriteBuffer::next() build_docker/./src/IO/WriteBuffer.h:49:13
    #2 0x5589447c9658 in sanitizerDeathCallback() build_docker/./src/Daemon/BaseDaemon.cpp:526:9
    #3 0x55892badc275 in __sanitizer::Die() crtstuff.c
    #4 0x55892baf0d62 in __msan_warning_with_origin_noreturn (/usr/bin/clickhouse+0xf6c0d62) (BuildId: d9ca2586616e61bde10996b0d42bb80c50a3c15e)
    #5 0x558958d3d641 in impl::unhexDigit(char) build_docker/./base/base/../base/hex.h:116:16
    #6 0x558958d3d641 in impl::HexConversionUInt<unsigned long, void>::unhex(char const*) build_docker/./base/base/../base/hex.h:162:28
    #7 0x558958d3d641 in impl::HexConversionUInt<wide::integer<128ul, unsigned int>, void>::unhex(char const*) build_docker/./base/base/../base/hex.h:171:28
    #8 0x55895ddd1a98 in wide::integer<128ul, unsigned int> unhexUInt<wide::integer<128ul, unsigned int>>(char const*) build_docker/./base/base/../base/hex.h:266:12
    #9 0x55895ddd1a98 in DB::FileCacheKey::fromKeyString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_docker/./src/Interpreters/Cache/FileCacheKey.cpp:33:25
    #10 0x55895d148876 in DB::InterpreterSystemQuery::execute() build_docker/./src/Interpreters/InterpreterSystemQuery.cpp:379:32
    #11 0x55895dcd1ad1 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:746:40
    #12 0x55895dcc5941 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:1168:30
    #13 0x5589611a3697 in DB::TCPHandler::runImpl() build_docker/./src/Server/TCPHandler.cpp:421:24
    #14 0x5589611e295e in DB::TCPHandler::run() build_docker/./src/Server/TCPHandler.cpp:2057:9
    #15 0x55896bb3243f in Poco::Net::TCPServerConnection::start() build_docker/./base/poco/Net/src/TCPServerConnection.cpp:43:3
    #16 0x55896bb332a1 in Poco::Net::TCPServerDispatcher::run() build_docker/./base/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #17 0x55896c0a7545 in Poco::PooledThread::run() build_docker/./base/poco/Foundation/src/ThreadPool.cpp:188:14
    #18 0x55896c0a436d in Poco::(anonymous namespace)::RunnableHolder::run() build_docker/./base/poco/Foundation/src/Thread.cpp:45:11
    #19 0x55896c0a12d1 in Poco::ThreadImpl::runnableEntry(void*) build_docker/./base/poco/Foundation/src/Thread_POSIX.cpp:335:27
    #20 0x7ff32a0d6b42  (/lib/x86_64-linux-gnu/libc.so.6+0x94b42) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)
    #21 0x7ff32a1689ff  (/lib/x86_64-linux-gnu/libc.so.6+0x1269ff) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)

  Uninitialized value was stored to memory at
    #0 0x55892baf5ada in __msan_memcpy (/usr/bin/clickhouse+0xf6c5ada) (BuildId: d9ca2586616e61bde10996b0d42bb80c50a3c15e)
    #1 0x55892bbe2503 in DB::WriteBuffer::write(char const*, unsigned long) (/usr/bin/clickhouse+0xf7b2503) (BuildId: d9ca2586616e61bde10996b0d42bb80c50a3c15e)
    #2 0x5589447cf656 in void DB::writePODBinary<int>(int const&, DB::WriteBuffer&) build_docker/./src/IO/WriteHelpers.h:88:9
    #3 0x5589447cf656 in void DB::writeBinary<int>(int const&, DB::WriteBuffer&) build_docker/./src/IO/WriteHelpers.h:865:59
    #4 0x5589447c9605 in sanitizerDeathCallback() build_docker/./src/Daemon/BaseDaemon.cpp:521:5
    #5 0x55892badc275 in __sanitizer::Die() crtstuff.c
    #6 0x558958d3d641 in impl::unhexDigit(char) build_docker/./base/base/../base/hex.h:116:16
    #7 0x558958d3d641 in impl::HexConversionUInt<unsigned long, void>::unhex(char const*) build_docker/./base/base/../base/hex.h:162:28
    #8 0x558958d3d641 in impl::HexConversionUInt<wide::integer<128ul, unsigned int>, void>::unhex(char const*) build_docker/./base/base/../base/hex.h:171:28
    #9 0x55895ddd1a98 in wide::integer<128ul, unsigned int> unhexUInt<wide::integer<128ul, unsigned int>>(char const*) build_docker/./base/base/../base/hex.h:266:12
    #10 0x55895ddd1a98 in DB::FileCacheKey::fromKeyString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_docker/./src/Interpreters/Cache/FileCacheKey.cpp:33:25
    #11 0x55895d148876 in DB::InterpreterSystemQuery::execute() build_docker/./src/Interpreters/InterpreterSystemQuery.cpp:379:32
    #12 0x55895dcd1ad1 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:746:40
    #13 0x55895dcc5941 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:1168:30
    #14 0x5589611a3697 in DB::TCPHandler::runImpl() build_docker/./src/Server/TCPHandler.cpp:421:24
    #15 0x5589611e295e in DB::TCPHandler::run() build_docker/./src/Server/TCPHandler.cpp:2057:9
    #16 0x55896bb3243f in Poco::Net::TCPServerConnection::start() build_docker/./base/poco/Net/src/TCPServerConnection.cpp:43:3
    #17 0x55896bb332a1 in Poco::Net::TCPServerDispatcher::run() build_docker/./base/poco/Net/src/TCPServerDispatcher.cpp:115:20
    #18 0x55896c0a7545 in Poco::PooledThread::run() build_docker/./base/poco/Foundation/src/ThreadPool.cpp:188:14
    #19 0x55896c0a436d in Poco::(anonymous namespace)::RunnableHolder::run() build_docker/./base/poco/Foundation/src/Thread.cpp:45:11
    #20 0x55896c0a12d1 in Poco::ThreadImpl::runnableEntry(void*) build_docker/./base/poco/Foundation/src/Thread_POSIX.cpp:335:27
    #21 0x7ff32a0d6b42  (/lib/x86_64-linux-gnu/libc.so.6+0x94b42) (BuildId: 69389d485a9793dbe873f0ea2c93e02efaa9aa3d)

  Uninitialized value was created by an allocation of 'ref.tmp4' in the stack frame
    #0 0x558958928bda in DB::SLRUCachePolicy<StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>, DB::IAccessStorage, std::__1::hash<StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>>, DB::EqualWeightFunction<DB::IAccessStorage>>::set(StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag> const&, std::__1::shared_ptr<DB::IAccessStorage> const&, std::__1::lock_guard<std::__1::mutex>&) build_docker/./src/Common/SLRUCachePolicy.h:128:13

SUMMARY: MemorySanitizer: use-of-uninitialized-value build_docker/./src/IO/WriteBufferFromFileDescriptorDiscardOnFailure.cpp:16:23 in DB::WriteBufferFromFileDescriptorDiscardOnFailure::nextImpl()

Metadata

Metadata

Labels

fuzzProblem found by one of the fuzzers

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions