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

Harden skip in Scanner #21607

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Harden skip in Scanner #21607

merged 1 commit into from
Sep 20, 2024

Commits on Sep 18, 2024

  1. Harden skip in Scanner

    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.
    odersky committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    b1235b9 View commit details
    Browse the repository at this point in the history