This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Access Rules BUG
- From: Angelo Corsaro <corsaro at cse dot wustl dot edu>
- To: GCJ Java <java at gcc dot gnu dot org>
- Date: 25 Mar 2003 00:43:00 -0600
- Subject: Access Rules BUG
- Organization: Washington University
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