Review Request: 8221530: Caller sensitive methods not handling caller = null when invoked by JNI code with no java frames on stack

Peter Levart peter.levart at gmail.com
Thu Mar 28 15:01:30 UTC 2019



On 3/28/19 3:48 PM, Peter Levart wrote:
> In addition, if access from null caller is granted and it is performed 
> to a member in a "concealed" package, there's no warning displayed 
> (the further logic in the AccessibleObject is skipped).
>
> What would it look like if AccessibleObject was left intact and only 
> Reflection was modified to accommodate for null currentClass - 
> caller/accessor....


Note that this would also require modifications to:

java.lang.reflect.AccessibleObject#logIfExportedForIllegalAccess

...to accommodate for null caller.

Currently this always throws NPE if such access is granted to a null 
caller regardless of whether it is made to a concealed package or not.

Peter



More information about the core-libs-dev mailing list