diff --git a/.hgtags b/.hgtags index 354514e1acaeea1b75e8d64bc4ff33d4943f30c6..f123cd275b894382a39373c511d4335de915ec6a 100644 --- a/.hgtags +++ b/.hgtags @@ -872,6 +872,7 @@ cb4af293fe70549b51039bb9197f373e6750fafb jdk8u101-b07 8ed377d2cec94435d1617a37999960a24be73ad9 jdk8u101-b08 9be452c4e7161e60d623d55bb72ad013386aefd1 jdk8u101-b09 218a44a163fa8c2532fd5f2e8ea9bc3c9c2ca8cf jdk8u101-b10 +0095e54dcaa1acfe1614feff9600734c26af7ae8 jdk8u101-b11 d6c92b9e192ef97305a699e868387d55821c81ad jdk8u102-b00 d6c92b9e192ef97305a699e868387d55821c81ad jdk8u82-b00 516a64e6d7c2dc29fd932bf3b8313e560a01bcd0 jdk8u102-b01 diff --git a/src/share/vm/classfile/verifier.cpp b/src/share/vm/classfile/verifier.cpp index ed65f0d78f77c78a538fb59759835a3d3f710cd8..e1f9f23819627d866fe845d486e4ee574502719c 100644 --- a/src/share/vm/classfile/verifier.cpp +++ b/src/share/vm/classfile/verifier.cpp @@ -2323,9 +2323,17 @@ bool ClassVerifier::ends_in_athrow(u4 start_bc_offset) { case Bytecodes::_ifnonnull: target = bcs.dest(); if (visited_branches->contains(bci)) { - if (bci_stack->is_empty()) return true; - // Pop a bytecode starting offset and scan from there. - bcs.set_start(bci_stack->pop()); + if (bci_stack->is_empty()) { + if (handler_stack->is_empty()) { + return true; + } else { + // Parse the catch handlers for try blocks containing athrow. + bcs.set_start(handler_stack->pop()); + } + } else { + // Pop a bytecode starting offset and scan from there. + bcs.set_start(bci_stack->pop()); + } } else { if (target > bci) { // forward branch if (target >= code_length) return false; @@ -2348,9 +2356,17 @@ bool ClassVerifier::ends_in_athrow(u4 start_bc_offset) { case Bytecodes::_goto_w: target = (opcode == Bytecodes::_goto ? bcs.dest() : bcs.dest_w()); if (visited_branches->contains(bci)) { - if (bci_stack->is_empty()) return true; - // Been here before, pop new starting offset from stack. - bcs.set_start(bci_stack->pop()); + if (bci_stack->is_empty()) { + if (handler_stack->is_empty()) { + return true; + } else { + // Parse the catch handlers for try blocks containing athrow. + bcs.set_start(handler_stack->pop()); + } + } else { + // Been here before, pop new starting offset from stack. + bcs.set_start(bci_stack->pop()); + } } else { if (target >= code_length) return false; // Continue scanning from the target onward.