This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] 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: 11 Jul 2005 10:31:22 -0600
- Subject: [gcjx] Patch: FYI: verifier bug fix
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This parallels a verifier fix that was checked in on the trunk.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* bytecode/verify.cc (verify_instructions_0): Correctly handle
situation where PC falls off end.
Index: bytecode/verify.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/bytecode/Attic/verify.cc,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 verify.cc
--- bytecode/verify.cc 17 Apr 2005 21:07:18 -0000 1.1.2.7
+++ bytecode/verify.cc 11 Jul 2005 16:33:55 -0000
@@ -2205,8 +2205,9 @@
// We only have to do this checking in the situation where
// control flow falls through from the previous
// instruction. Otherwise merging is done at the time we
- // push the branch.
- if (states[PC] != NULL)
+ // push the branch. Note that we'll catch the off-the-end
+ // problem just below.
+ if (PC < current_method->code_length && states[PC] != NULL)
{
// We've already visited this instruction. So merge
// the states together. It is simplest, but not most