Skip to content

Fix initialization vulnerability in Scanner #3069

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

Merged
merged 1 commit into from
Sep 5, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Sep 5, 2017

When bootstrapping with -Yno-inline, Tokens failied to initialize
because the length maxToken in tokenString was still 0. Changing
a val to a def fixes that. This is a nice demonstration that the
initialization rules are non-intuitive - we get bitten by them ourselves!

When bootstrapping with -Yno-inline, Tokens failied to initialize
because the length `maxToken` in `tokenString` was still 0. Changing
a `val` to a `def` fixes that. This is a nice demonstration that the
initialization rules are non-intuitive - we get bitten by them ourselves!
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

LGTM, this explains the failure in #3063

@smarter smarter merged commit 1af3894 into scala:master Sep 5, 2017
@allanrenucci allanrenucci deleted the fix-noinline-bootstrap branch December 14, 2017 19:20
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