< prev index next >
src/share/vm/classfile/stackMapTable.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2003, 2017, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 167,180 ****
if (tag == ITEM_Object) {
u2 class_index = _stream->get_u2(THREAD);
int nconstants = _cp->length();
if ((class_index <= 0 || class_index >= nconstants) ||
(!_cp->tag_at(class_index).is_klass() &&
! !_cp->tag_at(class_index).is_unresolved_klass())) {
_stream->stackmap_format_error("bad class index", THREAD);
return VerificationType::bogus_type();
}
return VerificationType::reference_type(_cp->klass_name_at(class_index));
}
if (tag == ITEM_UninitializedThis) {
if (flags != NULL) {
*flags |= FLAG_THIS_UNINIT;
--- 167,186 ----
if (tag == ITEM_Object) {
u2 class_index = _stream->get_u2(THREAD);
int nconstants = _cp->length();
if ((class_index <= 0 || class_index >= nconstants) ||
(!_cp->tag_at(class_index).is_klass() &&
! !_cp->tag_at(class_index).is_unresolved_klass() &&
! !_cp->tag_at(class_index).is_value_type() &&
! !_cp->tag_at(class_index).is_unresolved_value_type())) {
_stream->stackmap_format_error("bad class index", THREAD);
return VerificationType::bogus_type();
}
+ if (_cp->tag_at(class_index).is_value_type() ||
+ _cp->tag_at(class_index).is_unresolved_value_type()) {
+ return VerificationType::valuetype_type(_cp->klass_name_at(class_index));
+ }
return VerificationType::reference_type(_cp->klass_name_at(class_index));
}
if (tag == ITEM_UninitializedThis) {
if (flags != NULL) {
*flags |= FLAG_THIS_UNINIT;
< prev index next >