C++ stack size

Hello. Recently I tried to solve one problem using DFS on a graph with 10^5 vertices and encountered with Runtime Error (SIGSEGV). After hours of trying to figure out mistake in my code, my friend supposed that, probably, problem is with size of C++ stack. Then I changed it to 256 MB and got AC.

So, the suggestion is: why not to change g++ compilation line and set stack size to at least 256 MB? Most online judges have it by default, so the thought that codechef don’t have it never occured to me. So, I think, that debugging that SIGEGV error is really hard because noone will not even think about small stack size for g++.

Use DFS without recursion. See.

Are you kidding me? Of course, I can avoid recursion, I could even implement recursion stack by myself, but how it’s related to competitive programming?
When I select g++ compiler, I expect by default that it’s OK with deep recursion, because almost every OJ have stack size for g++ set to 256 Mb.
I could understand lack of this setup for Visual C++ compiler, because I can simply add one #pragma line to change stack size.

But for g++ I should use some non-obvious code (and it’s even platform-dependent, I doubt if there exists some Windows solution), so what’s point in this useless obstacle?