JDK-6459421 : javac hangs
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-08-11
  • Updated: 2012-03-22
  • Resolved: 2006-08-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b97Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
Many JCK test fails:
lang/LEX/lex015/lex01591m42/lex01591m42.html
lang/LEX/lex015/lex01591m42_1/lex01591m42_1.html
lang/LEX/lex015/lex01591m42_2/lex01591m42_2.html
lang/LEX/lex015/lex01591m43_1/lex01591m43_1.html
lang/LEX/lex015/lex01591m43_2/lex01591m43_2.html
lang/LEX/lex015/lex01591m44_1/lex01591m44_1.html
lang/LEX/lex015/lex01591m44_2/lex01591m44_2.html
lang/LEX/lex015/lex01591m45_1/lex01591m45_1.html
lang/LEX/lex015/lex01591m45_2/lex01591m45_2.html
lang/LEX/lex015/lex01591m46_1/lex01591m46_1.html
lang/LEX/lex015/lex01591m46_2/lex01591m46_2.html
lang/LEX/lex015/lex01591m47_1/lex01591m47_1.html
lang/LEX/lex015/lex01591m47_2/lex01591m47_2.html
lang/LEX/lex015/lex01591m48_1/lex01591m48_1.html
lang/LEX/lex015/lex01591m48_2/lex01591m48_2.html
lang/LEX/lex015/lex01591m49_1/lex01591m49_1.html
lang/LEX/lex015/lex01591m49_2/lex01591m49_2.html
lang/LEX/lex015/lex01591m50_1/lex01591m50_1.html
lang/LEX/lex015/lex01591m50_2/lex01591m50_2.html
lang/LEX/lex015/lex01591m51/lex01591m51.html
lang/LEX/lex015/lex01591m42/lex01591m42.html
lang/LEX/lex015/lex01591ma2/lex01591ma2.html
lang/STMT/stmt034/stmt03407/stmt03407.html
lang/STMT/stmt034/stmt03408/stmt03408.html 

These hangs javac b94.
Some of them are checked on earlier builds. Problem occured in b91.

Simple example:
Test.java
public interface Test {
    void m() {
       int case;
    }
}

Compiling it with JDK b90 we get:
Test.java:3: not a statement
       int case;
       ^
Test.java:3: ';' expected
       int case;
          ^
2 errors

Compiling it with JDK b91 we get 
Test.java:3: not a statement
       int case;
       ^
Test.java:3: ';' expected
       int case;
          ^
Test.java:3: orphaned case
       int case;
           ^
and javac hangs.

Comments
EVALUATION While provoked by the Retouche parser changes, the bug looks like (older) bad code, which has lain dormant until now. The problem is in the error recovery code after an orphaned 'case' or 'default' has been found. The error recovery code used to be blockStatements(); It should be switchBlockStatementGroups();
14-08-2006

EVALUATION Initial investigation reveals it is not advancing forward in the syntax error recovery code, so javac loops trying to parse a bad construct. The immediate cause of this error seems to be that a line "skip();" (c. line 281) was removed in b91, as part of the Retouche parser changes. The correct fix is still under investigation.
14-08-2006