15.02.2017 19:00, berni пишет:
I'm not sure if this is considered a bug:

import std.stdio;
import std.string;

int c = 0;

void main()
{

   try {
       write(++c," ");
       stdout.flush();
       int[100000] tmp;
       throw new Exception(format("%s",tmp));
   } finally
   {
       main();
   }
}

Output:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Segmentation fault
No, you recursively call main() and get segfault (due to stack overflow) as expected
If you downsize tmp array then you get segfault later
  • A bug? berni via Digitalmars-d-learn
    • Re: A bug? drug via Digitalmars-d-learn

Reply via email to