Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
all
Description
/* 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
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
exception_table_length = 0
attributes_count = 0
}
}
}
}
attributes_count = 0