https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103153

            Bug ID: 103153
           Summary: The recursive call in C++ leads to crashes of GCC.
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xiaxm at smail dot nju.edu.cn
  Target Milestone: ---

The following code can be well compiled, however when execute it, GCC crashes
with segmentation fault.

========================
#include <iostream>
#include <exception>
int main(){
   try{
       throw -1;
   }
   catch(int e){
       main();
   }
   return 0;
}
========================

Segmentation fault (core dumped)

gcc version 9.3.0 on Ubuntu 20.04

Reply via email to