re PR libgcj/16032 (libgcj should reject class files with incorrect version numbers)
PR libgcj/16032: * interpret.cc (AVAL1U): Resolve pool entry when not direct threaded. (AVAL2U): Likewise. (compile): Handle 'ldc class' specially. (_Jv_InterpMethod::run): Added special 'ldc class' instruction. * verify.cc (check_constant): Handle 'ldc class' for 1.5 classes. * defineclass.cc (handleCodeAttribute): Set new field. (MAJOR_1_1, MINOR_1_1, MAJOR_1_2, MINOR_1_2, MAJOR_1_3, MINOR_1_3, MAJOR_1_4, MINOR_1_4, MAJOR_1_5, MINOR_1_5): New defines. (parse): Check version numbers. (_Jv_ClassReader::is_15): New field. (_Jv_ClassReader): Initialize it. * include/java-interp.h (_Jv_InterpMethod::is_15): New field. From-SVN: r104325
This commit is contained in:
@@ -137,6 +137,7 @@ class _Jv_InterpMethod : public _Jv_MethodBase
|
||||
int code_length;
|
||||
|
||||
_Jv_ushort exc_count;
|
||||
bool is_15;
|
||||
|
||||
// Length of the line_table - when this is zero then line_table is NULL.
|
||||
int line_table_len;
|
||||
@@ -218,7 +219,8 @@ _Jv_GetFirstMethod (_Jv_InterpClass *klass)
|
||||
return klass->interpreted_methods;
|
||||
}
|
||||
|
||||
struct _Jv_ResolvedMethod {
|
||||
struct _Jv_ResolvedMethod
|
||||
{
|
||||
jint stack_item_count;
|
||||
jint vtable_index;
|
||||
jclass klass;
|
||||
|
||||
Reference in New Issue
Block a user