https://s3.amazonaws.com/clickhouse-test-reports/33889/3a252cd3a0966f5bf882e2b302999e123b9301d2/fuzzer_astfuzzerdebug,actions//report.html

```
2022.01.22 00:39:21.673579 [ 472 ] {} <Fatal> BaseDaemon: ########################################
2022.01.22 00:39:21.675012 [ 472 ] {} <Fatal> BaseDaemon: (version 22.2.1.3000, build id: 6D91CE62E3960D39) (from thread 234) (query_id: 36a47e41-72ec-41e4-8064-dcf017b3c51e) Received signal Aborted (6)
2022.01.22 00:39:21.675815 [ 472 ] {} <Fatal> BaseDaemon: 
2022.01.22 00:39:21.676500 [ 472 ] {} <Fatal> BaseDaemon: Stack trace: 0x7fdf417d218b 0x7fdf417b1859 0x24fe8d3b 0x24ff86a5 0x29207359 0x29207b68 0x2944b0b4 0x29447b9a 0x2944697c 0x7fdf41987609 0x7fdf418ae293
2022.01.22 00:39:21.677194 [ 472 ] {} <Fatal> BaseDaemon: 4. raise @ 0x7fdf417d218b in ?
2022.01.22 00:39:21.677892 [ 472 ] {} <Fatal> BaseDaemon: 5. abort @ 0x7fdf417b1859 in ?
2022.01.22 00:39:22.034545 [ 472 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:0: DB::TCPHandler::runImpl() @ 0x24fe8d3b in /workspace/clickhouse
2022.01.22 00:39:22.394230 [ 472 ] {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:1909: DB::TCPHandler::run() @ 0x24ff86a5 in /workspace/clickhouse
2022.01.22 00:39:22.464246 [ 472 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerConnection.cpp:43: Poco::Net::TCPServerConnection::start() @ 0x29207359 in /workspace/clickhouse
2022.01.22 00:39:22.549113 [ 472 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerDispatcher.cpp:115: Poco::Net::TCPServerDispatcher::run() @ 0x29207b68 in /workspace/clickhouse
2022.01.22 00:39:22.639127 [ 472 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/ThreadPool.cpp:199: Poco::PooledThread::run() @ 0x2944b0b4 in /workspace/clickhouse
2022.01.22 00:39:22.728469 [ 472 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread.cpp:56: Poco::(anonymous namespace)::RunnableHolder::run() @ 0x29447b9a in /workspace/clickhouse
2022.01.22 00:39:22.816303 [ 472 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345: Poco::ThreadImpl::runnableEntry(void*) @ 0x2944697c in /workspace/clickhouse
2022.01.22 00:39:22.816642 [ 472 ] {} <Fatal> BaseDaemon: 13. ? @ 0x7fdf41987609 in ?
2022.01.22 00:39:22.816963 [ 472 ] {} <Fatal> BaseDaemon: 14. clone @ 0x7fdf418ae293 in ?
2022.01.22 00:39:24.001222 [ 472 ] {} <Fatal> BaseDaemon: Calculated checksum of the binary: 168AE79E3DB1C247FB5A72EB06D98BFF. There is no information about the reference checksum.
2022.01.22 00:39:25.834255 [ 473 ] {} <Fatal> BaseDaemon: ########################################
2022.01.22 00:39:25.834438 [ 473 ] {} <Fatal> BaseDaemon: (version 22.2.1.3000, build id: 6D91CE62E3960D39) (from thread 236) (query_id: 149206c3-071f-4ec2-9fb0-dfc8ed0e5d29) Received signal Aborted (6)
2022.01.22 00:39:25.834608 [ 473 ] {} <Fatal> BaseDaemon: 
2022.01.22 00:39:25.834763 [ 473 ] {} <Fatal> BaseDaemon: Stack trace: 0x7fdf417d218b 0x7fdf417b1859 0x24fe8d3b 0x24ff86a5 0x29207359 0x29207b68 0x2944b0b4 0x29447b9a 0x2944697c 0x7fdf41987609 0x7fdf418ae293
2022.01.22 00:39:25.834895 [ 473 ] {} <Fatal> BaseDaemon: 4. raise @ 0x7fdf417d218b in ?
2022.01.22 00:39:25.835035 [ 473 ] {} <Fatal> BaseDaemon: 5. abort @ 0x7fdf417b1859 in ?
2022.01.22 00:39:26.160350 [ 473 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:0: DB::TCPHandler::runImpl() @ 0x24fe8d3b in /workspace/clickhouse
2022.01.22 00:39:26.518700 [ 473 ] {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../src/Server/TCPHandler.cpp:1909: DB::TCPHandler::run() @ 0x24ff86a5 in /workspace/clickhouse
2022.01.22 00:39:26.590074 [ 473 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerConnection.cpp:43: Poco::Net::TCPServerConnection::start() @ 0x29207359 in /workspace/clickhouse
2022.01.22 00:39:26.674713 [ 473 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../contrib/poco/Net/src/TCPServerDispatcher.cpp:115: Poco::Net::TCPServerDispatcher::run() @ 0x29207b68 in /workspace/clickhouse
2022.01.22 00:39:26.764319 [ 473 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/ThreadPool.cpp:199: Poco::PooledThread::run() @ 0x2944b0b4 in /workspace/clickhouse
2022.01.22 00:39:26.853097 [ 473 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread.cpp:56: Poco::(anonymous namespace)::RunnableHolder::run() @ 0x29447b9a in /workspace/clickhouse
2022.01.22 00:39:26.940903 [ 473 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../contrib/poco/Foundation/src/Thread_POSIX.cpp:345: Poco::ThreadImpl::runnableEntry(void*) @ 0x2944697c in /workspace/clickhouse
2022.01.22 00:39:26.941206 [ 473 ] {} <Fatal> BaseDaemon: 13. ? @ 0x7fdf41987609 in ?
2022.01.22 00:39:26.941477 [ 473 ] {} <Fatal> BaseDaemon: 14. clone @ 0x7fdf418ae293 in ?
2022.01.22 00:39:28.123745 [ 473 ] {} <Fatal> BaseDaemon: Calculated checksum of the binary: 168AE79E3DB1C247FB5A72EB06D98BFF. There is no information about the reference checksum.

```

```
2022.01.22 00:39:13.611975 [ 234 ] {36a47e41-72ec-41e4-8064-dcf017b3c51e} <Debug> executeQuery: (from [::ffff:127.0.0.1]:40278) CREATE FUNCTION `02181_invalid_lambda` AS lambda(plus(x_doubled))
2022.01.22 00:39:13.612150 [ 234 ] {36a47e41-72ec-41e4-8064-dcf017b3c51e} <Trace> ContextAccess (default): Access granted: CREATE FUNCTION ON *.*
2022.01.22 00:39:14.409588 [ 234 ] {36a47e41-72ec-41e4-8064-dcf017b3c51e} <Error> executeQuery: std::exception. Code: 1001, type: std::out_of_range, e.what() = vector (version 22.2.1.3000) (from [::ffff:127.0.0.1]:40278) (in query: CREATE FUNCTION `02181_invalid_lambda` AS lambda(plus(x_doubled))), Stack trace (when copying this message, always include the lines below):
2022.01.22 00:39:21.675012 [ 472 ] {} <Fatal> BaseDaemon: (version 22.2.1.3000, build id: 6D91CE62E3960D39) (from thread 234) (query_id: 36a47e41-72ec-41e4-8064-dcf017b3c51e) Received signal Aborted (6)
```

```
2022.01.22 00:39:25.832595 [ 236 ] {149206c3-071f-4ec2-9fb0-dfc8ed0e5d29} <Debug> executeQuery: (from [::ffff:127.0.0.1]:40280) CREATE FUNCTION `02181_invalid_lambda` AS lambda(lambda(x))
2022.01.22 00:39:25.832794 [ 236 ] {149206c3-071f-4ec2-9fb0-dfc8ed0e5d29} <Trace> ContextAccess (default): Access granted: CREATE FUNCTION ON *.*
2022.01.22 00:39:25.833269 [ 236 ] {149206c3-071f-4ec2-9fb0-dfc8ed0e5d29} <Error> executeQuery: std::exception. Code: 1001, type: std::out_of_range, e.what() = vector (version 22.2.1.3000) (from [::ffff:127.0.0.1]:40280) (in query: CREATE FUNCTION `02181_invalid_lambda` AS lambda(lambda(x))), Stack trace (when copying this message, always include the lines below):
2022.01.22 00:39:25.834438 [ 473 ] {} <Fatal> BaseDaemon: (version 22.2.1.3000, build id: 6D91CE62E3960D39) (from thread 236) (query_id: 149206c3-071f-4ec2-9fb0-dfc8ed0e5d29) Received signal Aborted (6)
```
if (!lambda_function_expression_list.empty())
        tuple_function_arguments = lambda_function_expression_list[0]->as<ASTFunction>();
    if (!tuple_function_arguments || !tuple_function_arguments->arguments)
        throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Lambda must have arguments");
    std::unordered_set<String> arguments;
    for (const auto & argument : tuple_function_arguments->arguments->children)
    {
        const auto * argument_identifier = argument->as<ASTIdentifier>();
        if (!argument_identifier)
            throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Lambda argument must be identifier");
        const auto & argument_name = argument_identifier->name();
        auto [_, inserted] = arguments.insert(argument_name);
        if (!inserted)
            throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Identifier {} already used as function parameter", argument_name);
    }
    ASTPtr function_body = lambda_function_expression_list.at(1);
    validateFunctionRecursiveness(function_body, name);
}
void InterpreterCreateFunctionQuery::validateFunctionRecursiveness(ASTPtr node, const String & function_to_create)
{
    for (const auto & child : node->children)
    {
        auto function_name_opt = tryGetFunctionName(child);
        if (function_name_opt && function_name_opt.value() == function_to_create)
            throw Exception(ErrorCodes::CANNOT_CREATE_RECURSIVE_FUNCTION, "You cannot create recursive function");
        validateFunctionRecursiveness(child, function_to_create);
    }
}
}