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

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

etc.
}
            else if (mode == "std::terminate")
            {
                std::terminate();
            }
            else if (mode == "use after free")
            {
                int * x_ptr;
                {
                    auto x = std::make_unique<int>();
                    x_ptr = x.get();
                }
                *x_ptr = 1;
                (void)x_ptr;
            }
            else if (mode == "use after scope")
            {
                volatile int * x_ptr;
                [&]{
                    volatile int x = 0;
                    x_ptr = &x;
                    (void)x;
                }();
                [&]{
                    volatile int y = 1;
                    *x_ptr = 2;
                    (void)y;
                }();
                (void)x_ptr;
            }