This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Access Rules BUG


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]