https://rethinkdb.com/blog/handling-stack-overflow-on-custom-stacks/

https://barrgroup.com/embedded-systems/how-to/prevent-detect-stack-overflow 

etc.
{
        if (!isString(arguments[0]))
            throw Exception("The only argument for function " + getName() + " must be constant String", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        return std::make_shared<DataTypeUInt8>();
    }
    [[clang::optnone]] void executeImpl(Block & columns, const ColumnNumbers & arguments, size_t result, size_t input_rows_count) const override
    {
        if (const ColumnConst * column = checkAndGetColumnConst<ColumnString>(columns[arguments[0]].column.get()))
        {
            String mode = column->getValue<String>();
            if (mode == "read nullptr c++")
            {
                volatile int x = *reinterpret_cast<const volatile int *>(0);
                (void)x;
            }
            else if (mode == "read nullptr asm")
            {
                __asm__ volatile ("movq $0, %rax");
                __asm__ volatile ("movq (%rax), %rax");
            }
            else if (mode == "illegal instruction")
            {
                __asm__ volatile ("ud2a");
            }
            else if (mode == "abort")
            {
                abort();