Hi Andrew,

Thanks for the stack trace of the issue triggering this.

It seems to me that Modifier::<clinit> isn't the right place
to setLangReflectAccess shared secret.  It might have assumed
that Modifier should have been initialized when Field/Method
or other AccessibleObject is instantiated which isn't true
since the modifiers field is an int.

While the fix looks okay, would you mind trying a different fix
moving Modifier::<clinit> to AccessibleObject?  See this resolves
the issue when running on J9?

Mandy

On 2/22/19 12:49 AM, Andrew Leonard wrote:
Hi Roger,
I had a think about this and a testcase will be difficult, as it was found
during OpenJ9 testing and occured during VM bootstrap, feel free to read
further details here:
https://github.com/eclipse/openj9/issues/3399#issuecomment-459004840
So the issue was discovered due to the bootstrap behaviour, it was not
observed with Hotspot, however given the obvious missing initialization
check logic in the class it's not to say there's an untested route with
Hotspot that could hit it... I'm not sure how I could scaffold a jtreg
test to replicate the same?
Thanks
Andrew

Reply via email to