harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfur...@apache.org
Subject svn commit: r560229 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
Date Fri, 27 Jul 2007 13:50:29 GMT
Author: mfursov
Date: Fri Jul 27 06:50:27 2007
New Revision: 560229

URL: http://svn.apache.org/viewvc?view=rev&rev=560229
Log:
Fix for HARMONY-4542 is integrated

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp?view=diff&rev=560229&r1=560228&r2=560229
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp Fri Jul 27 06:50:27
2007
@@ -2179,7 +2179,17 @@
     }
     unsigned base_index = (unsigned)(infc_vtable - (char*)objClass->get_vtable()->methods)/sizeof(char*);
     Method* infc_method = objClass->get_method_from_vtable(base_index + m->get_index());
-    assert(infc_method);
+    if(infc_method == NULL) {
+        // objClass does not implement interface method
+        char* msg = (char*)STD_ALLOCA(objClass->get_name()->len + 1
+            + m->get_name()->len + m->get_descriptor()->len + 1);
+        strcpy(msg, objClass->get_name()->bytes);
+        strcat(msg, ".");
+        strcat(msg, m->get_name()->bytes);
+        strcat(msg, m->get_descriptor()->bytes);
+        exn_throw_by_name("java/lang/AbstractMethodError", msg);
+        return NULL; // not reachable
+    }
     assert(infc_method->get_class()->is_initialized() || objClass->is_initializing());
     return infc_method->get_indirect_address();
 }



Mime
View raw message