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

JHAT - Missing java.lang.class mishandled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 6
    • core-svc
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      jdk-6-rc-src-b100-jrl-27_sep_2006

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      In Snapshot.resolve, there is code to attempt to handle the case where the JavaClass for "java.lang.Class" is not found. A stand-in object is created, but field javaLangClass is never assigned a value and is later dereferences (leading to NPE).


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      This works better: (in Snapshot.java, public void resolve(boolean calculateRefs))
      if (javaLangClass == null) {
      System.out.println("WARNING: hprof file does not include java.lang.Class!");
                  javaLangClass=new JavaClass("java.lang.Class", 0, 0, 0, 0,
                      EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY, 0);
                  addFakeClass(javaLangClass);
      }

            sundar Sundararajan Athijegannathan
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: