magic reflection access checks
twisti at complang.tuwien.ac.at
Tue Aug 21 16:18:00 PDT 2007
On Tue, 2007-08-21 at 16:05 -0700, Tom Rodriguez wrote:
> I'm talking about during our bootstrap before we've generated any reflection
> classes that it must be true so we never try to do the MagicAccessorImpl
> subclass test. Once we're done with bootstrap MagicAccessorImpl is loaded so
> the subclass tests work fine. You originally asked how we performed access
> checks if MagicAccessorImpl wasn't loaded and the answer is that there's a very
> small window during bootstrap where it isn't loaded and during that window it
> isn't needed.
Ahh, sorry, then I wasn't clear enough. I didn't mean
sun/reflect/MagicAccessorImpl is not loaded, but e.g.
sun/reflect/GeneratedConstructorAccessor1 isn't resolved when the
access-checks happen and the sub-class test on
sun/reflect/GeneratedConstructorAccessor1 does not work.
But when trying to resolve sun/reflect/GeneratedConstructorAccessor1,
obviously access-checks have to happen and these try to do _again_
sub-class tests on sun/reflect/GeneratedConstructorAccessor1.
See the problem? And I wonder how HotSpot can do that?
More information about the hotspot-dev