Access Rules BUG
Angelo Corsaro
corsaro@cse.wustl.edu
Tue Mar 25 06:44:00 GMT 2003
Hello All,
I've just found the bug exposed by the following test:
----------------------------------------------
public class Bug {
private Integer intValue;
void setIntValue(Integer value) {
this.intValue = value;
}
public static void main(String[] args) {
final Runnable logic = new Runnable() {
public void run() {
/*
* The compiler should complain here, but
* it doesn't. It compiles fine causing a
* segfault at runtime.
*/
setIntValue(new Integer(10));
}
};
logic.run();
}
}
----------------------------------------------
The bug seems to be present in both GCJ 3.2.1 and in the 3.3 branch.
The problem seems to be exposed only with anonymous classes.
Cheers,
Angelo
--
Angelo Corsaro
Department of Computer Science
Washington University
One Brookings Drive, Box 1045
St. Louis, MO 63130
http://www.cs.wustl.edu/~corsaro
More information about the Java
mailing list