JDK-7082263 : Reflection::resolve_field/field_get/field_set are broken
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs21
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-08-23
  • Updated: 2011-11-28
  • Resolved: 2011-11-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u2Fixed 8Fixed hs22Fixed
Description
When moving the static fields out from the instanceKlasses into the mirrors, the Reflection::resolve_field, Reflection::field_get and Reflection::field_set functions were not updated accordingly. These functions still try to access the static fields with an offset from the klassOop.

Note, that these functions are only available if compiled with SUPPORT_OLD_REFLECTION.

Comments
EVALUATION See main CR
14-09-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/19241ae0d839
08-09-2011

EVALUATION 7082263: Reflection::resolve_field/field_get/field_set are broken Reviewed-by: kvn, dholmes, stefank, coleenp The static field mirror changes missed some dead code in reflection. Instead of fixing it I'm deleting it. I've deleted all the reflection code that's dead. I confirmed that none of these JVM_ entry points are referenced by any JDK since 1.5. They also aren't mentioned by the jvm.h in the JDK.
30-08-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/19241ae0d839
30-08-2011

EVALUATION We should just delete these.
24-08-2011

EVALUATION These functions are only used by JVM_GetField, JVM_GetPrimitiveField, JVM_SetField, and JVM_SetPrimitiveField. I couldn't find any references to these functions in the JDK6/JDK7 src code, or in libjava.so. Maybe an opportunity to clean out some old code?
23-08-2011