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]

Re: Package-private access checking in GCJ 3.3


> > Ranjit> I have only "bubblestrapped" with this change and tested
> > Ranjit> against very simple testcases.
> >
> > Make sure you rebuild libgcj from scratch.  We may have library bugs
> > that we don't know of due to this compiler bug.
> 
> Yes, I realise that. I will try it tonight and let you
> know if I face any problems.

I tried building libgcj with this modification
and the very first class (java.lang.Class) caused
it to ICE - it ICEs consistently at line 284
of java/lang/Class.java (in 3.3) in method
desiredAssertionStatus( ) where it returns
the value from desiredAssertionStatus( ) (a 
package-private static final method) in
java/lang/VMClassLoader.

With GDB, I see that the DECL_CONTEXT of the
"member" is NULL for some reason, while "reference"
is not, in not_accessible_p( ) in parse.y. It is
not NULL for any of the previous calls to this
method though - the problem comes only for 
line 284 in Class.java mentioned above.

The problem is also repeatable exactly if I compile
java/lang/Class.java outside of the build tree.

My change looks innocuous enough to me and is the
only change in the whole 3.3 tree - if it
works for private and protected members, it should
also work for package-private members, no?

Unless of course we build the decl for a 
package-private member in a different manner...

Any insights?

I will take it up once again when I get back home
later tonight.

Ranjit.

PS: The -femit-class-files and -foutput-class-dir options
to jc1 do not appear in "jc1 --help".

-- 
Ranjit Mathew        Email: rmathew AT hotmail DOT com
Bangalore,           
INDIA.               Web: http://ranjitmathew.tripod.com/


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