https://clickhouse-test-reports.s3.yandex.net/24249/de4fad63e9896aa9a9c981613bc1d0da89ba16ad/fuzzer_ubsan/report.html#fail1
```
Error on processing query 'SELECT substring((9223372036854775807, -2147483648), substring(substring(65535, x, toFixedString(materialize(NULL), NULL)), substring(1048575, substring(substring(toFixedString(materialize(NULL), NULL)), substring(NULL, x, toFixedString(materialize(NULL), NULL))), toFixedString(materialize(NULL), NULL)))), x IN (NULL), substring(x = 1, substring(-2147483647, x, toFixedString(materialize(NULL), x IN (3.4028234663852886e38, 0.), NULL)), NULL), x FROM `01154_test` WHERE x = 2147483648': Code: 32, e.displayText() = DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000, Stack trace (when copying this message, always include the lines below):

0. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/exception:133: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1e1c7672 in /workspace/clickhouse
1. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:57: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xf49c55e in /workspace/clickhouse
2. ./obj-x86_64-linux-gnu/../src/IO/VarInt.h:0: DB::throwReadAfterEOF() @ 0xf4b67fb in /workspace/clickhouse
3. ./obj-x86_64-linux-gnu/../src/IO/VarInt.h:133: void DB::readVarUIntImpl<false>(unsigned long&, DB::ReadBuffer&) @ 0xf4eba6f in /workspace/clickhouse
4. ./obj-x86_64-linux-gnu/../src/Client/Connection.cpp:788: DB::Connection::receivePacket() @ 0x1d0182f9 in /workspace/clickhouse
5. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:1985: DB::Client::receiveAndProcessPacket(bool) @ 0xf5cea06 in /workspace/clickhouse
6. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::receiveResult() @ 0xf5d4892 in /workspace/clickhouse
7. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::processOrdinaryQuery() @ 0xf5be41f in /workspace/clickhouse
8. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::processParsedSingleQuery() @ 0xf5ba05e in /workspace/clickhouse
9. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::processWithFuzzing(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xf5b3313 in /workspace/clickhouse
10. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::processMultiQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0xf5b62f4 in /workspace/clickhouse
11. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::nonInteractive()::'lambda'(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const @ 0xf5db171 in /workspace/clickhouse
12. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::nonInteractive() @ 0xf5a6b0f in /workspace/clickhouse
13. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:723: DB::Client::mainImpl() @ 0xf59f1e8 in /workspace/clickhouse
14. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: DB::Client::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&) @ 0xf59825b in /workspace/clickhouse
15. ./obj-x86_64-linux-gnu/../contrib/poco/Util/src/Application.cpp:0: Poco::Util::Application::run() @ 0x1e147b0a in /workspace/clickhouse
16. ./obj-x86_64-linux-gnu/../programs/client/Client.cpp:0: mainEntryClickHouseClient(int, char**) @ 0xf58b584 in /workspace/clickhouse
17. ./obj-x86_64-linux-gnu/../programs/main.cpp:0: main @ 0xf48ee04 in /workspace/clickhouse
18. __libc_start_main @ 0x270b3 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
19. _start @ 0xf46ceee in /workspace/clickhouse
 (version 21.6.1.6879)
Code: 210. DB::NetException: Connection refused (localhost:9000)
```
#pragma once
#include "throwError.h"
#include <cmath>
#include <cfloat>
#include <cassert>
#include <limits>
namespace wide
{
template <typename T>
struct IsWideInteger
{
    static const constexpr bool value = false;
};
template <size_t Bits, typename Signed>
struct IsWideInteger<wide::integer<Bits, Signed>>
{
    static const constexpr bool value = true;
};
template <typename T>
static constexpr bool ArithmeticConcept() noexcept