Why does the following program segfault?
int main() { main(); }
Even though it is a recursion that does not end and is therefore invalid by
It leads to stack overflow that is diagnosed as segfault on your system.