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

Backport "Harden skip in Scanner" to LTS #22136

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

WojciechMazur
Copy link
Contributor

Backports #21607 to the 3.3.5.

PR submitted by the release tooling.

@WojciechMazur WojciechMazur force-pushed the backport-lts-3.3-21611 branch from cc4f5c1 to 8c22acb Compare December 3, 2024 22:01
I sometimes see a rogue java process at 100% even after I closed down sbt and vscode.
With jstack I got the following stack trace:

    java.lang.Thread.State: RUNNABLE

	at dotty.tools.dotc.parsing.Scanners$Scanner.handleNewLine(Scanners.scala:613)

	at dotty.tools.dotc.parsing.Scanners$Scanner.nextToken(Scanners.scala:396)

	at dotty.tools.dotc.parsing.Scanners$Scanner.skip(Scanners.scala:312)

	at dotty.tools.dotc.parsing.Parsers$Parser.skip(Parsers.scala:280)

	at dotty.tools.dotc.parsing.Parsers$Parser.recur$2(Parsers.scala:376)

	at dotty.tools.dotc.parsing.Parsers$Parser.statSepOrEnd(Parsers.scala:380)

It could be that the loop in skip gives two alternate offsets that would not bump the progress counter.
I changed the loop so that it catches more looping conditions.

[Cherry-picked b1235b9]
@WojciechMazur WojciechMazur force-pushed the backport-lts-3.3-21607 branch from af72f8a to 67b2cec Compare December 3, 2024 22:01
Base automatically changed from backport-lts-3.3-21611 to lts-3.3 December 4, 2024 17:22
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to backport-lts-3.3-21857.

Reference

@WojciechMazur WojciechMazur merged commit 64c2968 into lts-3.3 Dec 4, 2024
19 checks passed
@WojciechMazur WojciechMazur deleted the backport-lts-3.3-21607 branch December 4, 2024 17:22
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