-
Notifications
You must be signed in to change notification settings - Fork 1k
Ignore classes in java.lang.invoke in early instrumentations #13602
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
Conversation
| agentBuilder | ||
| .ignore( | ||
| target -> instrumentationInstalled, // turn off after instrumentation is installed | ||
| Objects::nonNull) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the Objects::nonNull(checks that instrumentation applies only in boot loader) because it doesn't work as intended. When both type and class loader matcher are given both must match for the type to be ignored, as far as I understand here the intent was to ignore when either matches. If we want we can add the class loader check with .or(Objects::nonNull) but it shouldn't be necessary.
|
cc @JonasKunz |
JonasKunz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
With java11 it gets the following exception tests pass but we detect that there exceptions were logged (usually indicates advice failure) and fail the tests because of that. On jdk 21 there is a similar exception and also the following exception that kills the test. |
|
Thanks! So based on the last method being invoked before indy bootstrap ( EDIT: The If you want to, I can take care of that. |
Fixes indy test failures in #13590
These failures are caused by circularity for classes in
java.lang.invoke. Ignoring that package shouldn't be an issue because the purpose of the early instrumentations is to set up virtual field transforms for executors instrumentation as early as possible. Since virtual field instrumentation does structural modifications to classes it can not be applied to already loaded classes. The classes that we wish to apply these transforms to aren't in thejava.lang.invokepackage.