Package-private access checking in GCJ 3.3

Ranjit Mathew rmathew@hotmail.com
Tue Jun 17 01:21:00 GMT 2003


> > 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/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /