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

4.7, 4.9, 4.10: Simplify and clarify the rules for attribute validation

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8
    • Fix Version/s: tbd_major
    • Component/s: specification
    • Labels:
      None
    • Subcomponent:
      vm

      Description

      4.7 groups attributes into three categories. Only the first category is necessary for JVM semantics; the second and third are consumed by tools.

      It is unclear exactly when and how attributes are validated in the first two categories (the third is accurately described as unvalidated), nor is it clear why an attribute would belong to the second rather than the third category, or vice versa.

      Proposals:

      - Do not waste computation and startup time validating attributes other than those that are necessary for JVM semantics. (This is a significant change to implementation behavior, with a potential compatibility impact on tools.)

      - Clarify that the "static constraints" of 4.9.1 are used to validate most of Code and StackMapTable attributes. Simplify error checking by always throwing VerificationError at verification time.

      - Cleaning up verification rules to avoid redundant checks (they can assume format checks and static constraints have been satisfied).

      There are also some bugs in the verification rules of field and method references that should be addressed (the receiver type may be an array type; invokespecial and invokestatic support interface methods).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dlsmith Dan Smith
                Reporter:
                dlsmith Dan Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: