```sql
SELECT bar(-1, -9223372036854775808, nan)

Query id: c54d8992-f48c-44d8-b845-bde3b681ced4


Received exception from server (version 21.1.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Too large size (9223372036854775840) passed to allocator. It indicates an error.: While processing bar(-1, -9223372036854775808, nan). 

0 rows in set. Elapsed: 0.020 sec. 
```
```
2021.01.14 18:58:16.766365 [ 66 ] {f20828a7-8f87-47c0-89ba-42ba358e121f} <Fatal> : Logical error: 'Too large size (9223372036854775840) passed to allocator. It indicates an error.'.
2021.01.14 18:58:16.766898 [ 62 ] {} <Trace> BaseDaemon: Received signal 6
2021.01.14 18:58:16.767313 [ 150 ] {} <Fatal> BaseDaemon: ########################################
2021.01.14 18:58:16.767527 [ 150 ] {} <Fatal> BaseDaemon: (version 21.1.1.5679, build id: 90D27D0446ED4181B315CB990FC2166587A57DF6) (from thread 66) (query_id: f20828a7-8f87-47c0-89ba-42ba358e121f) Received signal Aborted (6)
2021.01.14 18:58:16.767672 [ 150 ] {} <Fatal> BaseDaemon: 
2021.01.14 18:58:16.767846 [ 150 ] {} <Fatal> BaseDaemon: Stack trace: 0x7f3d1e3f2fb7 0x7f3d1e3f4921 0x107454d6 0x10745581 0x107beb1f 0x107be7f0 0x107cec3b 0x107ceac5 0x107caf56 0x1669dd1d 0x12913048 0x12911e2e 0x12916b73 0x12916786 0x12916a3b 0x12917c2b 0x196dc0c8 0x196dbb4a 0x19ef5963 0x19efc990 0x19ef8d06 0x19ef5cc7 0x19ef9619 0x19ef5d33 0x19ed6089 0x19ecabb3 0x19ecee32 0x19ed2349
2021.01.14 18:58:16.768181 [ 150 ] {} <Fatal> BaseDaemon: 4. /build/glibc-S9d2JN/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51: raise @ 0x3efb7 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so
2021.01.14 18:58:16.768411 [ 150 ] {} <Fatal> BaseDaemon: 5. /build/glibc-S9d2JN/glibc-2.27/stdlib/abort.c:81: abort @ 0x40921 in /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.27.so
2021.01.14 18:58:16.768656 [ 150 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:50: DB::handle_error_code(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x107454d6 in /workspace/clickhouse
2021.01.14 18:58:16.768878 [ 150 ] {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:56: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x10745581 in /workspace/clickhouse
2021.01.14 18:58:16.769272 [ 150 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Common/Exception.h:38: DB::Exception::Exception<unsigned long&>(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long&) @ 0x107beb1f in /workspace/clickhouse
2021.01.14 18:58:16.769629 [ 150 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Common/Allocator.h:257: Allocator<false, false>::checkSize(unsigned long) @ 0x107be7f0 in /workspace/clickhouse
2021.01.14 18:58:16.770566 [ 150 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Common/Allocator.h:115: Allocator<false, false>::realloc(void*, unsigned long, unsigned long, unsigned long) @ 0x107cec3b in /workspace/clickhouse
2021.01.14 18:58:16.771491 [ 150 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Common/PODArray.h:152: void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::realloc<>(unsigned long) @ 0x107ceac5 in /workspace/clickhouse
2021.01.14 18:58:16.772154 [ 150 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../src/Common/PODArray.h:237: void DB::PODArrayBase<1ul, 4096ul, Allocator<false, false>, 15ul, 16ul>::resize<>(unsigned long) @ 0x107caf56 in /workspace/clickhouse
2021.01.14 18:58:16.786974 [ 150 ] {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../src/Functions/bar.cpp:114: DB::(anonymous namespace)::FunctionBar::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x1669dd1d in /workspace/clickhouse
2021.01.14 18:58:16.793410 [ 150 ] {} <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../src/Functions/IFunctionImpl.h:203: DB::IFunction::executeImplDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x12913048 in /workspace/clickhouse
2021.01.14 18:58:16.799668 [ 150 ] {} <Fatal> BaseDaemon: 15. ./obj-x86_64-linux-gnu/../src/Functions/IFunctionAdaptors.h:158: DB::DefaultExecutable::executeDryRun(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x12911e2e in /workspace/clickhouse
2021.01.14 18:58:16.805664 [ 150 ] {} <Fatal> BaseDaemon: 16. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:291: DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12916b73 in /workspace/clickhouse
2021.01.14 18:58:16.811839 [ 150 ] {} <Fatal> BaseDaemon: 17. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:240: DB::ExecutableFunctionAdaptor::defaultImplementationForConstantArguments(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12916786 in /workspace/clickhouse
2021.01.14 18:58:16.817896 [ 150 ] {} <Fatal> BaseDaemon: 18. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:283: DB::ExecutableFunctionAdaptor::executeWithoutLowCardinalityColumns(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12916a3b in /workspace/clickhouse
2021.01.14 18:58:16.824081 [ 150 ] {} <Fatal> BaseDaemon: 19. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:448: DB::ExecutableFunctionAdaptor::execute(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x12917c2b in /workspace/clickhouse
2021.01.14 18:58:16.858075 [ 150 ] {} <Fatal> BaseDaemon: 20. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsDAG.cpp:211: DB::ActionsDAG::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<DB::ActionsDAG::Node*, std::__1::allocator<DB::ActionsDAG::Node*> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool) @ 0x196dc0c8 in /workspace/clickhouse
2021.01.14 18:58:16.891714 [ 150 ] {} <Fatal> BaseDaemon: 21. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsDAG.cpp:165: DB::ActionsDAG::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, 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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, DB::Context const&) @ 0x196dbb4a in /workspace/clickhouse
2021.01.14 18:58:16.927658 [ 150 ] {} <Fatal> BaseDaemon: 22. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:501: DB::ScopeStack::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, 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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x19ef5963 in /workspace/clickhouse
2021.01.14 18:58:16.964270 [ 150 ] {} <Fatal> BaseDaemon: 23. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.h:155: DB::ActionsMatcher::Data::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, 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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x19efc990 in /workspace/clickhouse
2021.01.14 18:58:17.001472 [ 150 ] {} <Fatal> BaseDaemon: 24. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:975: DB::ActionsMatcher::visit(DB::ASTFunction const&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x19ef8d06 in /workspace/clickhouse
2021.01.14 18:58:17.037798 [ 150 ] {} <Fatal> BaseDaemon: 25. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:546: DB::ActionsMatcher::visit(std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x19ef5cc7 in /workspace/clickhouse
2021.01.14 18:58:17.073545 [ 150 ] {} <Fatal> BaseDaemon: 26. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:655: DB::ActionsMatcher::visit(DB::ASTExpressionList&, std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x19ef9619 in /workspace/clickhouse
2021.01.14 18:58:17.109876 [ 150 ] {} <Fatal> BaseDaemon: 27. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:550: DB::ActionsMatcher::visit(std::__1::shared_ptr<DB::IAST> const&, DB::ActionsMatcher::Data&) @ 0x19ef5d33 in /workspace/clickhouse
2021.01.14 18:58:17.146239 [ 150 ] {} <Fatal> BaseDaemon: 28. ./obj-x86_64-linux-gnu/../src/Interpreters/InDepthNodeVisitor.h:34: DB::InDepthNodeVisitor<DB::ActionsMatcher, true, std::__1::shared_ptr<DB::IAST> const>::visit(std::__1::shared_ptr<DB::IAST> const&) @ 0x19ed6089 in /workspace/clickhouse
2021.01.14 18:58:17.182295 [ 150 ] {} <Fatal> BaseDaemon: 29. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:410: DB::ExpressionAnalyzer::getRootActions(std::__1::shared_ptr<DB::IAST> const&, bool, std::__1::shared_ptr<DB::ActionsDAG>&, bool) @ 0x19ecabb3 in /workspace/clickhouse
2021.01.14 18:58:17.218434 [ 150 ] {} <Fatal> BaseDaemon: 30. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:1024: DB::SelectQueryExpressionAnalyzer::appendSelect(DB::ExpressionActionsChain&, bool) @ 0x19ecee32 in /workspace/clickhouse
2021.01.14 18:58:17.254495 [ 150 ] {} <Fatal> BaseDaemon: 31. ./obj-x86_64-linux-gnu/../src/Interpreters/ExpressionAnalyzer.cpp:1408: DB::ExpressionAnalysisResult::ExpressionAnalysisResult(DB::SelectQueryExpressionAnalyzer&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, bool, bool, bool, std::__1::shared_ptr<DB::FilterInfo> const&, DB::Block const&) @ 0x19ed2349 in /workspace/clickhouse
```

https://clickhouse-test-reports.s3.yandex.net/19007/e2a2ab6f67b6935ea5bb7de6ac57fe32a0598992/functional_stateless_tests_(debug).html#fail1
{
        return ceil(width - 1.0 / 8) * UNICODE_BAR_CHAR_SIZE;
    }
    void render(double width, char * dst)
    {
        size_t floor_width = floor(width);
        for (size_t i = 0; i < floor_width; ++i)
        {
            memcpy(dst, "█", UNICODE_BAR_CHAR_SIZE);
            dst += UNICODE_BAR_CHAR_SIZE;
        }
        size_t remainder = floor((width - floor_width) * 8);
        if (remainder)
        {
            memcpy(dst, &"▏▎▍▌▋▋▊▉"[(remainder - 1) * UNICODE_BAR_CHAR_SIZE], UNICODE_BAR_CHAR_SIZE);
            dst += UNICODE_BAR_CHAR_SIZE;
        }
        *dst = 0;
    }
    std::string render(double width)
    {
        std::string res(getWidthInBytes(width), '\0');
        render(width, res.data());
        return res;
    }
}