RFR (S + L test) : 8016839 : JSR292: AME instead of IAE when calling a method

Coleen Phillimore coleen.phillimore at oracle.com
Mon Nov 25 10:10:02 PST 2013


On 11/25/2013 12:12 PM, David Chase wrote:
> I wasn't 100% clear on the desire to not add another preloaded class, and I was under the impression that if s.m.Unsafe could not load, then things were hosed indeed.  If there's another already preloaded class that would be a good choice, it is an easy change to make; MethodHandleNatives, or others in the java.lang.invoke world, also seem potentially appropriate, though there is also a possibility that someone might want to backport this to 7 (I can demonstrate the bug in 6, and I suspect also in 5 if I could get my hands on such a VM) so we need to be aware of that, too (I am not myself 100% clear on which of those files appeared when, except that sun.misc.Unsafe has been around for a while).

I didn't think MethodHandles was an appropriate place to put this 
function since it is generic and we might want to use this mechanism to 
have Method* metadata when we throw other pre-existing exceptions.

Somewhere else in java/lang might be better but it seemed like Unsafe 
would be the lowest overhead to add something, without changing the 
documentation/specification of the basic jdk classes.

Coleen

David On 2013-11-25, at 4:49 AM, Paul Sandoz <paul.sandoz at oracle.com> 
wrote:
>> HI David,
>>
>> Just curious: why did you chose to add the method, throwIllegalAccessError, to s.m.Unsafe and add Unsafe to the list pre-loaded classes rather than modifying an existing pre-loaded class?
>>
>> Paul.
>>
>>
>>
>>



More information about the hotspot-dev mailing list