From 9edf6e7e3157aef2b7d55d93bce41496f10b5a39 Mon Sep 17 00:00:00 2001 From: kamg Date: Fri, 3 Sep 2010 14:47:05 -0400 Subject: [PATCH] 6870851: Bad frame_chop in StackMapTable crashes JVM Summary: Must check locals for null when processing chop frame Reviewed-by: dholmes, dcubed --- hotspot/src/share/vm/classfile/stackMapTable.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/classfile/stackMapTable.cpp b/hotspot/src/share/vm/classfile/stackMapTable.cpp index f3acdd14a6..e34fc5948a 100644 --- a/hotspot/src/share/vm/classfile/stackMapTable.cpp +++ b/hotspot/src/share/vm/classfile/stackMapTable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -152,6 +152,7 @@ void StackMapTable::print() const { int32_t StackMapReader::chop( VerificationType* locals, int32_t length, int32_t chops) { + if (locals == NULL) return -1; int32_t pos = length - 1; for (int32_t i=0; i