www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16333] New: show stack overflow as error message instead of


          Issue ID: 16333
           Summary: show stack overflow as error message instead of
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

Is there any way that we can show the user that a stack overflow has happened?
Just a SEGFAULT is quite difficult to debug.
Consider this simple program:

void endless()

void main()

All it will print is:

segmentation fault (core dumped)  ./main

while it is quite easy to see what's going wrong here, in a more complex
application it isn't. At least it took me a couple of hours to realize that my
program doesn't do semi-random segfaults (given special input data), but
deterministic stack overflows.

Even C++ throws a StackOverflow Error.

Jul 28 2016