verify.c (verify_jvm_instructions): Don't check instruction validity beyond end of...
authorGregg Townsend <gmt@cs.arizona.edu>
Thu, 26 Aug 1999 17:00:57 +0000 (17:00 +0000)
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>
Thu, 26 Aug 1999 17:00:57 +0000 (10:00 -0700)
Wed Aug 25 15:37:15 1999  Gregg Townsend  <gmt@cs.arizona.edu>

        * verify.c (verify_jvm_instructions): Don't check instruction
        validity beyond end of method.

From-SVN: r28897

gcc/java/ChangeLog
gcc/java/verify.c

index 38036915ee022cd9dd155fde6519300ea19f98ed..6abba840dbd550bbbb6ade70a10e012fe73ee9c7 100644 (file)
@@ -4,6 +4,11 @@ Thu Aug 26 09:10:58 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
        to set the column number.
        (qualify_ambiguous_name): Take WFL wrappers into account.
 
+Wed Aug 25 15:37:15 1999  Gregg Townsend  <gmt@cs.arizona.edu>
+
+       * verify.c (verify_jvm_instructions): Don't check instruction
+       validity beyond end of method.
+
 1999-08-25  Tom Tromey  <tromey@cygnus.com>
 
        * jvspec.c (lang_specific_driver): Correctly handle --help again.
index d665a16418a0ba2787da930ab059d28a46111ee8..8b08a8aacbb2078241c1b5f00341ec30b3264d65 100644 (file)
@@ -400,7 +400,8 @@ verify_jvm_instructions (jcf, byte_ops, length)
          || handler_pc < 0 || handler_pc >= length
          || (handler_pc >= start_pc && handler_pc < end_pc)
          || ! (instruction_bits [start_pc] & BCODE_INSTRUCTION_START)
-         || ! (instruction_bits [end_pc] & BCODE_INSTRUCTION_START)
+         || (end_pc < length &&
+            ! (instruction_bits [end_pc] & BCODE_INSTRUCTION_START))
          || ! (instruction_bits [handler_pc] & BCODE_INSTRUCTION_START))
        {
          error ("bad pc in exception_table");