Skip to content

Conversation

@abgruszecki
Copy link
Contributor

Since the length of the chain of RecursionOverflows is proportional to stack size, it's best to build recursions in a loop to avoid a potential stack overflow.

See #5862 (comment).

Copy link
Contributor

@Blaisorblade Blaisorblade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It's not clear whether this is needed, but this code is more clearly stack-safe.

@Blaisorblade Blaisorblade merged commit 4c4d5a1 into scala:master Mar 4, 2019
@Blaisorblade Blaisorblade deleted the improve-recursion-detection branch March 4, 2019 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants