Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve MethodHandles.lookup() field accesses #3310

Merged
merged 1 commit into from
Oct 17, 2018

Conversation

JasonFengJ9
Copy link
Member

Improve MethodHandles.lookup() field accesses

Perform loader constraints check when accessing a field via a FindGetter or FindSetter MethodHandle. This applies to both instance and static fields.
Added tests to check IllegalAccessException with LinkageError cause thrown in following cases:

  • MH instance/static field getter/setter for reference and type classes loaded by different class loaders
  • MH instance/static field getter/setter for reference/type and access classes loaded by different class loaders

Reviewer: @DanHeidinga

Signed-off-by: Jason Feng fengj@ca.ibm.com

Perform loader constraints check when accessing a field via a FindGetter
or FindSetter MethodHandle. This applies to both instance and static
fields.
Added tests to check IllegalAccessException with LinkageError cause
thrown in following cases:

MH instance/static field getter/setter for reference and type classes
loaded by different class loaders
MH instance/static field getter/setter for reference/type and access
classes loaded by different class loaders

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
Copy link
Member

@DanHeidinga DanHeidinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@DanHeidinga
Copy link
Member

Jenkins test sanity xlinux jdk8

@DanHeidinga DanHeidinga self-assigned this Oct 16, 2018
@pshipton pshipton added this to the Release 0.11.0 milestone Oct 16, 2018
@DanHeidinga DanHeidinga merged commit 84966ab into eclipse-openj9:master Oct 17, 2018
@JasonFengJ9 JasonFengJ9 deleted the mhlookup branch February 19, 2019 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants