This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gcjx] Patch: FYI: verifier bug fix


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]