harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Kaigorodov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6555) [dvrlm][testing][vmtt] VMTT throws exception if custom attributes are semantically incorrrect though syntactiacally correct
Date Wed, 23 Jun 2010 12:40:51 GMT
[dvrlm][testing][vmtt] VMTT throws exception if custom attributes are semantically incorrrect
though syntactiacally correct
---------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-6555
                 URL: https://issues.apache.org/jira/browse/HARMONY-6555
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: all
            Reporter: Alexei Kaigorodov


/* VMTT -C expects custom attributes to be semantically correct (name index points to UTF8
constant pool element), otherwise fails with exception.
 * Try to compile this test.
*/
magic = xCAFEBABE

minor_version = 0

major_version = 50

constant_pool_count = 17

constant_pool {
  /* #1 */ UTF8 = "java/lang/Object"
  /* #2 */ Class = #13
  /* #3 */ Class = #1
  /* #4 */ UTF8 = "ok"
  /* #5 */ UTF8 = "I"
  /* #6 */ UTF8 = "bar"
  /* #7 */ UTF8 = "Ljava/lang/Object;"
  /* #8 */ UTF8 = "<init>"
  /* #9 */ UTF8 = "()I"
  /* #10 */ UTF8 = "Code"
  /* #11 */ UTF8 = "test"
  /* #12 */ NameAndType = #4 #5
  /* #13 */ UTF8 = "CustomAttr"
  /* #14 */ Field = #2 #12
  /* #15 */ UTF8 = "ConstantValue"
  /* #16 */ int = 104
}

access_flags = x21  // PUBLIC SUPER 

this_class = #2  // "CustomAttr"

super_class = #3  // "java/lang/Object"

interfaces_count = 0

interfaces {
}

fields_count = 1

fields {
  field {
    access_flag = x08  // STATIC 
    name_index = #4  // "ok"
    descriptor_index = #5  // "I"
    attributes_count = 2
    attributes {
      attribute {  // wrong name_index (not UTF8)
        x00 x10 x00 x00 x00 x02 x00 x00 
      }
      attribute {  // wrong name_index (out of range)
        x00 x11 x00 x00 x00 x02 x00 x00 
      }
    }
  }
}

methods_count = 1

methods {
  method {
    access_flag = x09  // PUBLIC STATIC 
    name_index = #11  // "test"
    descriptor_index = #9  // "()I"
    attributes_count = 1
      attributes {
        attribute Code {
          attribute_name_index = #10  // "Code"
          attribute_length = 16
          max_stack = 1
          max_locals = 0
          code_length = 4
          code asm {
          0:	sipush 104 
          3:	ireturn
          }
          exception_table_length = 0
          attributes_count = 0
        }
      }
  }
}

attributes_count = 0


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message