On Sun, 21 Sep 2003 13:12:34 -0600 (MDT)
Timothy Stack <[EMAIL PROTECTED]> wrote:

> > 
> > The attached program causes java.lang.IllegalAccessError
> > when run with kaffe (ChangeLog head: 2003-09-13  Dalibor Topic
> > <[EMAIL PROTECTED]>).
> > 
> > When run with JDK
> 
> Did you run it with '-verify' on?  I get something like:
> 
> 516 irontown:tmp8/katest> /usr/local/jdk1.3.1/bin/java -verify a.TestA
> Exception in thread "main" java.lang.IllegalAccessError: try to access 
> class b/TestBB from class a/TestA
>         at a.TestA.main(TestA.java:8)
> 
> > or kaffe (ChangeLog head: 2003-08-27  Jim Pick
> > <[EMAIL PROTECTED]>), no such error occus.
> [test case cut...]
> 
> Okie, I've had a look and I think its a problem with kjc and not the VM.  
> In particular the code generated by kjc for the call to foo() is wrong (i 
> think):
> 
>   invokevirtual b/TestBB/foo()I
> 
> Notice that its making the call on TestBB (package-private class) and not
> TestB (public class).  Code generated by jikes/javac generates the correct 
> call to TestB/foo().

Speaking about kjc - is the project still alive?
I mean at the moment it looks like more and more
people start using kaffe and we're thus running
into several bugs in kjc that can be triggered by
pretty usual java programs (could've been spotted
earlier). 

As for the runtime checking stuff: there seems to
be another bug related to inner classes:

[EMAIL PROTECTED]:/tmp/access-test$ cat a/test.java 
package a;
public class test
{
        protected static class inner
        {
                public inner (){}
        }
}
[EMAIL PROTECTED]:/tmp/access-test$ cat b/test1.java 
package b;
import a.test;
public class test1 extends test
{
        public void bar ()
        {
                new inner ();
        }

        public static void main (String[] args)
        {
                new test1().bar();
        }
}

Looks like access to members of inherited inner
classes is denied (test case was compiled with
jikes 1.18).

Regards,
Helmer

_______________________________________________
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to