harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r520001 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp
Date Mon, 19 Mar 2007 16:33:15 GMT
Author: gshimansky
Date: Mon Mar 19 09:33:14 2007
New Revision: 520001

URL: http://svn.apache.org/viewvc?view=rev&rev=520001
Log:
Applied HARMONY-3316 [drlvm]VM throws VerifyError instead of ClassFormatError when class contains
incorrect method name

Test attached to JIRA passes now.


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp?view=diff&rev=520001&r1=520000&r2=520001
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class_File_Loader.cpp Mon Mar
19 09:33:14 2007
@@ -2658,6 +2658,11 @@
                                 clss->get_name()->bytes << ": illegal method
name for CONSTANT_Methodref entry: " << name->bytes);
                         return false;
                     }
+                    if(name->bytes[0] == '<' && name != env->Init_String)
{
+                        REPORT_FAILED_CLASS_CLASS(clss->get_class_loader(), clss, "java/lang/ClassFormatError",
+                                clss->get_name()->bytes << ": illegal method
name "<< name->bytes << " at constant pool index " << name_index);
+                        return false;
+                    }
                 } else { //always check method name if classloader is not system 
                     if((name != env->Init_String) 
                         && !check_member_name(name->bytes,name->len, clss->get_version()
< JAVA5_CLASS_FILE_VERSION, true))



Mime
View raw message