United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6459421 : javac hangs

Details
Type:
Bug
Submit Date:
2006-08-11
Status:
Resolved
Updated Date:
2012-03-22
Project Name:
JDK
Resolved Date:
2006-08-23
Component:
tools
OS:
windows_xp
Sub-Component:
javac
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Relates:
Relates:
Relates:
Relates:

Sub Tasks

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

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.
                                     
2006-08-14
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();
                                     
2006-08-14



Hardware and Software, Engineered to Work Together