Repository navigation
Make recursing too deep a fatal runtime error and make the limit larger #3695
Description
Activity
Hmm... limits on recursion depth make me cringe.
Why have stack limits at all if we can just keep growing the stack?
As a sanity check. Eating all your ram and having the machine lock up while it swaps and oom kills is no fun. Nobody means to recurse infinitely.
FWIW I tested infinite recursion on Go over the weekend and let the process grow to over 1GB before I killed it manually. Not sure if they just recurse forever or not.
Disregarding the risk of being off topic. Are there any plans implementing tail recursion?
@DonMartio - We're not sure yet; see #217.
gcc's
__morestackcallsabortif allocation failsNot critical for 0.6; removing milestone
- added a commit that references this issue
on Apr 26, 2013 - added a commit that references this issue
on Apr 27, 2013 Nominating for milestone 5, production-ready
accepted for production-ready milestone
+1 to eric holk's comment, basically.
Visiting for triage; nothing to add.
Is this bug still open after 149047e?
If so, I'm still not convinced it's a good idea. After all, you can make the machine grind to a halt swapping by allocating lots of memory from the heap, and yet we don't put arbitrary limits on the heap size.
Closing in favor of #11011 which outlines the strategy we should be taking and is a little more up-to-date.
- added a commit that references this issue
on Jun 29, 2024
What we are doing now leaks (#3555) and I don't know how to fix it yet, so we should not pretend we can enforce stack size limits safely.