JDK-8056119 : 4.10.1.9: Clarify that FieldClass cannot be an array type in getfield/putfield
  • Type: Bug
  • Component: specification
  • Sub-Component: vm
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-08-26
  • Updated: 2025-02-12
  • Resolved: 2016-09-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 9
9Fixed
Related Reports
Relates :  
Relates :  
Description
1. The instructionIsTypeSafe rule for getfield mentions that "FieldClass must not be an array type." This is true by construction, because the rule uses functor 'class' in the validTypeTransition clause. However, the Prolog term 'class(FieldClass)' is ill-formed - 4.10.1.2 introduced 'class' as 2-arity. The rule should add:

  currentClassLoader(Environment, CurrentLoader),

and use class(FieldClass, CurrentLoader) in validTypeTransition.

2. The instructionIsTypeSafe rule for putfield should mention that "FieldClass must not be an array type.", since it uses the functor 'class' (correctly, with two args) in the canPop clause.

3. The getstatic and putstatic instructions don't rely on the declaring class of the field (indicated by the underscore in _FieldClass), so there is no need to modify their rules.