[BC] Patch: FYI: interpreter/verifier fixlet
Tom Tromey
tromey@redhat.com
Thu Nov 4 17:43:00 GMT 2004
I'm checking this in on the BC branch.
Trying to verify an abstract method causes a crash.
This is fallout from enabling the verifier the other day.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* interpret.cc (do_verify): Don't verify abstract methods.
Index: interpret.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/interpret.cc,v
retrieving revision 1.40.18.9
diff -u -r1.40.18.9 interpret.cc
--- interpret.cc 18 Oct 2004 23:48:56 -0000 1.40.18.9
+++ interpret.cc 4 Nov 2004 17:42:37 -0000
@@ -3696,9 +3696,10 @@
_Jv_InterpClass *iclass = (_Jv_InterpClass *) klass->aux_info;
for (int i = 0; i < klass->method_count; i++)
{
+ using namespace java::lang::reflect;
_Jv_MethodBase *imeth = iclass->interpreted_methods[i];
- if ((klass->methods[i].accflags & java::lang::reflect::Modifier::NATIVE)
- == 0)
+ _Jv_ushort accflags = klass->methods[i].accflags;
+ if ((accflags & (Modifier::NATIVE | Modifier::ABSTRACT)) == 0)
{
_Jv_InterpMethod *im = reinterpret_cast<_Jv_InterpMethod *> (imeth);
_Jv_VerifyMethod (im);
More information about the Java-patches
mailing list