Skip to content

Conversation

satabin
Copy link
Member

@satabin satabin commented Sep 25, 2025

The recursive call is sadly not in tail position, so it does use stack when comparing sibling fields. This change suspends the recursive call within an Eval, which turns it into a stack safe version.

Without the change, the two added tests fail with a StackOverflow.

The recursive call is sadly not in tail position, so it does use stack
when comparing sibling fields. This change suspends the recursive call
within an `Eval`, which turns it into a stack safe version.

Without the change, the two added tests fail with a `StackOverflow`.
@satabin satabin added the bug label Sep 25, 2025
@satabin satabin enabled auto-merge September 25, 2025 15:17
@satabin satabin requested a review from ybasket September 26, 2025 06:38
@satabin satabin merged commit 99f8ff0 into main Sep 26, 2025
31 of 49 checks passed
@satabin satabin deleted the port-stack-overflow-fix branch September 26, 2025 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants