Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8069132

runtime checks performed by aastore need specification cleanup

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: specification
    • Labels:
      None
    • Subcomponent:
      vm

      Description

      The instruction specification for aastore (JVMS 6.5) has these lines:

      • If S is an interface type, then:
      ◆ If T is a class type, then T must be Object.
      ◆ If T is an interface type, then T must be the same interface as S or a superinterface of S.

      These lines can be safely removed, since S can never be an interface type. (An implication with a vacuous condition has no force, since it cannot be falsified.) S is the runtime-type of a reference value, so it must be an array reference or concrete class reference or null.

      On the other hand, the specification does not say whether a null reference will pass the run time check. That deserves clarification, since the explicitly enumerated conditions are introduced like this:

         Specifically, assignment of a value of reference type S (source) to an array component of reference type T (target) is allowed only if:
      ...

      Suggested fix: Add this line.

      • If S is the null reference type, then the assignment is allowed.

      Or, deal with non-null values earlier, and change the introduction of the list to:

        Specifically, assignment of a +non null+ value of reference type S (source) to an array component of reference type T (target) is allowed only if

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abuckley Alex Buckley
                Reporter:
                jrose John Rose
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: