OSDN Git Service

Check for null class of class
authorMathieu Chartier <mathieuc@google.com>
Thu, 29 Jan 2015 18:47:10 +0000 (10:47 -0800)
committerMathieu Chartier <mathieuc@google.com>
Sat, 31 Jan 2015 01:01:42 +0000 (17:01 -0800)
Experimental fix.

Bug: 19193521
Change-Id: I11571dd5a63852acdbad5d4291510542c2e4b18a

runtime/debugger.cc

index 2fff70e..2e23eb8 100644 (file)
@@ -4350,6 +4350,11 @@ class HeapChunkContext {
       return HPSG_STATE(SOLIDITY_HARD, KIND_UNKNOWN);
     }
 
+    if (c->GetClass() == nullptr) {
+      LOG(ERROR) << "Null class of class " << c << " for object " << o;
+      return HPSG_STATE(SOLIDITY_HARD, KIND_UNKNOWN);
+    }
+
     if (c->IsClassClass()) {
       return HPSG_STATE(SOLIDITY_HARD, KIND_CLASS_OBJECT);
     }