Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checker: limit recursion in Checker.ensure_type_exists/2 to 40 levels (it is usually 4 or less) #21734

Conversation

spytheman
Copy link
Member

@spytheman spytheman commented Jun 25, 2024

Make the recursive method ensure_type_exists/2 a bit more robust, by terminating early, when the recursion depth exceeds a hard limit of 40 levels.

Without it, an unlimited recursion (which may be caused by various factors) will lead to a stack overflow, which can be harder to diagnose, than an explicit checker error message.

@spytheman spytheman merged commit 5f33946 into vlang:master Jun 26, 2024
76 checks passed
raw-bin pushed a commit to raw-bin/v that referenced this pull request Jul 2, 2024
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.

1 participant