Commit aca02b7e by Tom Tromey Committed by Tom Tromey

verify-impl.c (verify_instructions_0): Correctly handle situation where PC falls off end.

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.

From-SVN: r101299
parent 6a059870
2005-06-24 Tom Tromey <tromey@redhat.com>
* verify-impl.c (verify_instructions_0): Correctly handle
situation where PC falls off end.
2005-06-23 Bryce McKinlay <mckinlay@redhat.com> 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
PR java/20697 PR java/20697
......
...@@ -2251,10 +2251,12 @@ verify_instructions_0 (void) ...@@ -2251,10 +2251,12 @@ verify_instructions_0 (void)
else else
{ {
/* We only have to do this checking in the situation where /* We only have to do this checking in the situation where
control flow falls through from the previous control flow falls through from the previous instruction.
instruction. Otherwise merging is done at the time we Otherwise merging is done at the time we push the branch.
push the branch. */ Note that we'll catch the off-the-end problem just
if (vfr->states[vfr->PC] != NULL) below. */
if (vfr->PC < vfr->current_method->code_length
&& vfr->states[vfr->PC] != NULL)
{ {
/* We've already visited this instruction. So merge /* We've already visited this instruction. So merge
the states together. It is simplest, but not most the states together. It is simplest, but not most
......
2005-06-24 Tom Tromey <tromey@redhat.com> 2005-06-24 Tom Tromey <tromey@redhat.com>
* verify.cc (verify_instructions_0): Correctly handle situation
where PC falls off end.
2005-06-24 Tom Tromey <tromey@redhat.com>
* interpret.cc (compile): Handle case where table entry is * interpret.cc (compile): Handle case where table entry is
outside of PC range. outside of PC range.
......
...@@ -2198,8 +2198,9 @@ private: ...@@ -2198,8 +2198,9 @@ private:
// We only have to do this checking in the situation where // We only have to do this checking in the situation where
// control flow falls through from the previous // control flow falls through from the previous
// instruction. Otherwise merging is done at the time we // instruction. Otherwise merging is done at the time we
// push the branch. // push the branch. Note that we'll catch the
if (states[PC] != NULL) // off-the-end problem just below.
if (PC < current_method->code_length && states[PC] != NULL)
{ {
// We've already visited this instruction. So merge // We've already visited this instruction. So merge
// the states together. It is simplest, but not most // the states together. It is simplest, but not most
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment