News for hackers. Stuff that matters.
Re:Regex Parser in C Using Continuation Passing by Peaker on Wednesday December 20, 2017 @02:11PM (#15972725)
gcc supports auto-generating stack overflow checks.

You can implement your own handler for a stack overflow, allowing allocation of additional stack space which can be chained to the original stack. This is how some language runtimes handle [or used to handle] segmented stacks that grow on demand.

Re:Regex Parser in C Using Continuation Passing by burntsushi on Saturday December 23, 2017 @08:21AM (#15994049)
> gcc supports auto-generating stack overflow checks.

I don't know what that means. I don't see how auto-generated code would fix my problem. The regex parser should return an error to the caller if the regex exceeds some limit.

Dynamically growing the stack sounds like a cute hack. I doubt I'd consider it superior to just using the heap though.

Re:Regex Parser in C Using Continuation Passing by Peaker on Sunday December 24, 2017 @11:53AM (#16000229)
You can use that to make stack overflow a (relatively) graceful error instead of a segfault.