OpenJDK / jdk / jdk
changeset 51592:1ddd1ec04431
8210168: JCK test .vm.classfmt.ins.code__002.code__00201m1.code__00201m1 hangs with -noverify
Summary: Check for 'bc_length > 0' to handle lengths of -1.
Reviewed-by: coleenp
author | hseigel |
---|---|
date | Thu, 30 Aug 2018 09:08:23 -0400 |
parents | 9183040e34d8 |
children | e6250a870739 |
files | src/hotspot/share/interpreter/rewriter.cpp |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/interpreter/rewriter.cpp Thu Aug 30 09:34:10 2018 +0200 +++ b/src/hotspot/share/interpreter/rewriter.cpp Thu Aug 30 09:08:23 2018 -0400 @@ -400,7 +400,9 @@ } } - assert(bc_length != 0, "impossible bytecode length"); + // Continuing with an invalid bytecode will fail in the loop below. + // So guarantee here. + guarantee(bc_length > 0, "Verifier should have caught this invalid bytecode"); switch (c) { case Bytecodes::_lookupswitch : {