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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: hs25
    • Component/s: hotspot
    • b133

      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.

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

              Created:
              Updated:
              Resolved: