Commit 67b2cec
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.
[Cherry-picked b1235b9]1 parent 8c22acb commit 67b2cec
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
| 309 | + | |
309 | 310 | | |
310 | | - | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
313 | 317 | | |
314 | 318 | | |
315 | 319 | | |
| |||
0 commit comments