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): Addressed infinite loop in compiler #3992

Merged
merged 4 commits into from
Jul 15, 2021

Conversation

DV8FromTheWorld
Copy link
Contributor

The generateCodeFrame function had the chance to infinite loop on windows machines due to how newline sequence lengths were being treated.
Newline sequence lengths were assumed to be a single character long which is not true on windows machines.

closes #3987

The generateCodeFrame function had the chance to infinite loop on windows machines due to how newline sequence lengths were being treated.
Newline sequence lengths were assumed to be a single character long which is not true on windows machines.

closes 3987
Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

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

can you add a test case?

DV8FromTheWorld and others added 3 commits June 23, 2021 09:21
Fixed comment styling

Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
There were additional places that we needed to take line ending sequences into account to ensure that we placed  the ^^^s exactly where they should be.
Unix and Windows should now produce identical results.

Additionally, code was modified to handle source that is passed in that does not have a trailing newline character before the end of the source content.
@DV8FromTheWorld
Copy link
Contributor Author

Should be good to go 👍

@DV8FromTheWorld
Copy link
Contributor Author

Bump

@yyx990803 yyx990803 merged commit e00aa56 into vuejs:master Jul 15, 2021
@DV8FromTheWorld DV8FromTheWorld deleted the bug/compiler-infinite-loop branch July 15, 2021 20:40
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.

@vue/shared generateCodeFrame can infinite loop, breaking a build process.
3 participants