Repository navigation
fix(cli): only a stack overflow prints the stack overflow message (#2120) - #2122
Merged
nicolas-abril merged 2 commits intoNov 12, 2026
Merged
Conversation
…ndlang#2120) book_err printed every RangeError as "the machine stack overflowed". JSC throws RangeError for more than a full stack (Out of memory, an invalid array length, a BigInt too big), so 2.0.40's FL.ground blowup (bendlang#2076) read as a deep recursion. Now only "Maximum call stack size exceeded" prints that message; any other RangeError prints its own, as "RangeError: Out of memory". Checked: 2.0.40 with this change prints "RangeError: Out of memory" on a program that bendlang#2107 fixed; bendlang#2093's deep.bend still prints the stack message; the 550 tests whose expected output has an error print the same as main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…book_err and io_run (bendlang#2120) The `/call stack/` test ran on every error that was not a Bend Err and matched anywhere in its text, so a JS effect's `Error("... call stack ...")` printed as a stack overflow. book_err now asks for a RangeError whose message starts with "Maximum call stack size exceeded". The JS IO runtime's catch in comp.ts had the same bendlang#2120 bug (every RangeError became "memory fault (machine stack overflow?)") and takes the same test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2120.
book_errinbend2/main.tsprinted everyRangeErroras "the machine stack overflowed". JSC also throwsRangeErrorfor things that are not a full stack (Out of memory, an invalid array length, a BigInt too big), so 2.0.40'sFL.groundblowup (#2076) read as a deep recursion, and raising the stack limit could not help. Now only "Maximum call stack size exceeded" prints the stack-overflow message. Any otherRangeErrorprints its own text, asRangeError: Out of memory.Checked
RangeError: Out of memorywhere it printed the stack-overflow message.Maximum call stack size exceededinterm_wnf).gates/repo.ts: 56/56.main.tsdrops to 13,034 ttok (main: 13,036): 3 lines added, 5 removed.