Subject: Re: bug#59426: 29.0.50; [tree-sitter] Some functions exceed maximum recursion limit

From: Mattias Engdegård <[email-masked]>
Date: Mon, 21 Nov 2022 19:20:45 +0100

> And don't forget that GC is also highly recursive and eats up a lot of stack space.

Not any more.

---

If tree-sitter really needs a deep stack whose size depend on the input file and grammar in an unbounded way, then it shouldn't use the C stack; that would be an unnecessary restriction on the files that could be edited. A dynamically allocated stack could still have a limit, but it would be decoupled from the C stack size.