Hotspot file reflectionAccessorImplKlassHelper.cpp, used by jcmd to inspect reflection generated classes, uses hard-coded constant pool indices to find information in these classes. For example, for reflection generated classes that are not SerializationConstructorAccessors, it expects the method name and signature to be in constant pool indexes 7 and 8.
This dependency on hard-coded constant pool indices is fragile and can easily be broken. The implementation of reflectionAccessorImplKlassHelper.cpp should be changed to something less fragile.
This dependency on hard-coded constant pool indices is fragile and can easily be broken. The implementation of reflectionAccessorImplKlassHelper.cpp should be changed to something less fragile.
- duplicates
-
JDK-8272065 jcmd cannot rely on the old core reflection implementation which will be changed after JEP 416
- Resolved
- relates to
-
JDK-8203343 VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
- Resolved
-
JDK-8209899 [lworld] dcmd tests crash with "Unexpected constant pool layout"
- Resolved
-
JDK-8272065 jcmd cannot rely on the old core reflection implementation which will be changed after JEP 416
- Resolved