src/share/vm/classfile/stackMapFrame.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/classfile/stackMapFrame.cpp Mon Feb 21 15:35:48 2011
--- new/src/share/vm/classfile/stackMapFrame.cpp Mon Feb 21 15:35:46 2011
*** 180,189 ****
--- 180,218 ----
bool match_locals = is_assignable_to(
_locals, target->locals(), target->locals_size(), CHECK_false);
bool match_stack = is_assignable_to(
_stack, target->stack(), _stack_size, CHECK_false);
bool match_flags = (_flags | target->flags()) == target->flags();
+
+ // We allow flags of {UninitThis} to assign to {} if-and-only-if the
+ // target frame does not depend upon the current type.
+ // This is slightly too strict, as we need only enforce that the
+ // slots that were initialized by the <init> (the things that were
+ // UninitializedThis before initialize_object() converted them) are unused.
+ // However we didn't save that information so we'll enforce this upon
+ // anything that might have been initalized. This a rare situation
+ // and javac never generates code that would end up here, but some profilers
+ // (such as NetBeans) might, when adding exception handlers to
+ // <init> methods. See 7020118.
+ if (!match_flags && flag_this_uninit() && target->flags() == 0) {
+ match_flags = true;
+ for (int i = 0; i < target->locals_size(); ++i) {
+ if (locals()[i] == verifier()->current_type() &&
+ target->locals()[i] != VerificationType::top_type()) {
+ match_flags = false;
+ break;
+ }
+ }
+ for (int i = 0; i < target->stack_size(); ++i) {
+ if (stack()[i] == verifier()->current_type() &&
+ target->stack()[i] != VerificationType::top_type()) {
+ match_flags = false;
+ break;
+ }
+ }
+ }
+
return (match_locals && match_stack && match_flags);
}
VerificationType StackMapFrame::pop_stack_ex(VerificationType type, TRAPS) {
if (_stack_size <= 0) {
src/share/vm/classfile/stackMapFrame.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File