This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: verifier bug fix
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 16 Nov 2001 17:03:43 -0700
- Subject: Patch: FYI: verifier bug fix
- Reply-to: tromey at redhat dot com
I'm checking this in.
If the bytecode referenced a field whose type was, e.g., "I", the
verifier would erroneously push reference_type and not int_type on the
stack. This patch fixes the problem.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handle
case where field has primitive type.
Index: verify.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/verify.cc,v
retrieving revision 1.6
diff -u -r1.6 verify.cc
--- verify.cc 2001/11/16 19:59:16 1.6
+++ verify.cc 2001/11/16 23:18:39
@@ -1545,7 +1545,9 @@
&name, &field_type);
if (class_type)
*class_type = ct;
- return type (field_type);
+ if (field_type->data[0] == '[' || field_type->data[0] == 'L')
+ return type (field_type);
+ return get_type_val_for_signature (field_type->data[0]);
}
type check_method_constant (int index, bool is_interface,