JDK-6233316 : Temporary javac workaround for server compiler bug
Type:Bug
Component:tools
Sub-Component:javac
Affected Version:6
Priority:P1
Status:Resolved
Resolution:Fixed
OS:generic
CPU:generic
Submitted:2005-02-25
Updated:2010-04-02
Resolved:2005-03-04
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.
Javac fails randomly on server VM. Marking critical code volatile
appears to work around the problem.
###@###.### 2005-2-25 19:36:37 GMT
Comments
EVALUATION
This work around should be applied until the bug
is fixed in the server compiler.
###@###.### 2005-2-25 19:36:38 GMT
25-02-2005
SUGGESTED FIX
Index: src/share/classes/com/sun/tools/javac/parser/Scanner.java
================================================================
@@ -128,13 +128,13 @@
/** The input buffer, index of next chacter to be read,
* index of one past last character in buffer.
*/
- private char[] buf;
- private int bp;
- private int buflen;
+ private volatile char[] buf;
+ private volatile int bp;
+ private volatile int buflen;
/** The current character.
*/
- private char ch;
+ private volatile char ch;
/** The buffer index of the last converted unicode character
*/
###@###.### 2005-2-25 19:36:38 GMT