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

fix(compiler): Prevent stack overflows when compiling long blocks #1534

Merged
merged 3 commits into from
Dec 6, 2022

Conversation

ospencer
Copy link
Member

@ospencer ospencer commented Dec 6, 2022

Fixes #1530

@ospencer ospencer requested a review from a team December 6, 2022 22:30
@ospencer ospencer self-assigned this Dec 6, 2022
Copy link
Member

@peblair peblair left a comment

Choose a reason for hiding this comment

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

One comment, but this otherwise looks great. Thanks for the fix!

@@ -153,7 +153,15 @@ let next_state = (~is_root_file=false, {cstate_desc, cstate_filename} as cs) =>
};
Well_formedness.check_well_formedness(p);
WellFormed(p);
| WellFormed(p) => TypeChecked(Typemod.type_implementation(p))
| WellFormed(p) =>
if (is_root_file) {
Copy link
Member

Choose a reason for hiding this comment

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

I would vote to make this a separate phase (which no-ops for non-root files).

Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

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

lgtm

@ospencer ospencer merged commit dc6d699 into main Dec 6, 2022
@ospencer ospencer deleted the oscar/compile-tree branch December 6, 2022 23:31
@github-actions github-actions bot mentioned this pull request Dec 6, 2022
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.

JS compiler stack overflows with deep dependency chains
4 participants