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

Checking for anonymous class should check for NULL as well as potential nesting

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • hs25
    • hotspot
    • b133

    Description

      The following 3 is_anonymous() invocations should be cleaned up:

      - classfile/verifier.cpp - is_anonymous() is checked twice in ClassVerifier::verify_invoke_instructions().

      - interpreter/linkResolver.cpp - is_anonymous() called once within
        LinkResolver::linktime_resolve_special_method().

      Tasks:
      =====
      cleanup item #1 - is_anonymous() checks a bit, so we should also sanity check if host_klass() == NULL
                                before dereferencing

      cleanup item #2 - these 3 code instances should also be walking up through potentially nested anonymous classes. Need more test cases of nested anonymous classes. See code in runtime/reflection.cpp, Reflection::verify_field_access() for code example that walks up through nested anonymous classes. This code came in via JDK-8027458.

      Attachments

        Activity

          People

            hseigel Harold Seigel (Inactive)
            lfoltan Lois Foltan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: