summaryrefslogtreecommitdiff
path: root/libjava/verify.cc
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-24 22:09:15 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-24 22:09:15 +0000
commita7d9c7d6bb3edfbe7a99dcb1cb0c510b10054f3a (patch)
treedc3cacf7c6d08a5e1aadc432281d4ad24526b9b2 /libjava/verify.cc
parent0e26cf9911087616a1506c0613ce9498d2bf0507 (diff)
downloadgcc-a7d9c7d6bb3edfbe7a99dcb1cb0c510b10054f3a.tar.gz
gcc/java/:
* verify-impl.c (verify_instructions_0): Correctly handle situation where PC falls off end. libjava/: * verify.cc (verify_instructions_0): Correctly handle situation where PC falls off end. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101299 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/verify.cc')
-rw-r--r--libjava/verify.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libjava/verify.cc b/libjava/verify.cc
index a47571bb809..167d74cf8f6 100644
--- a/libjava/verify.cc
+++ b/libjava/verify.cc
@@ -2198,8 +2198,9 @@ private:
// 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