#include #include __attribute__((noinline)) void foo(int x) { char buf[x]; fgets(buf, x, stdin); void *env[5]; struct __jmp_buf_tag *penv = (struct __jmp_buf_tag *)env; if (!setjmp(penv)) longjmp(penv, 1); } int main() { foo(256); printf("end main\n"); }