src/share/vm/classfile/stackMapTable.cpp

changeset 6960
b2daaf70fab2
parent 6872
c77d5db18942
child 6876
710a3c8b516e
child 8080
e36fd279a207
equal deleted inserted replaced
6957:e0c6fadce66e 6960:b2daaf70fab2
128 bool match = match_stackmap( 128 bool match = match_stackmap(
129 frame, target, true, false, false, &ctx, CHECK_VERIFY(frame->verifier())); 129 frame, target, true, false, false, &ctx, CHECK_VERIFY(frame->verifier()));
130 if (!match || (target < 0 || target >= _code_length)) { 130 if (!match || (target < 0 || target >= _code_length)) {
131 frame->verifier()->verify_error(ctx, 131 frame->verifier()->verify_error(ctx,
132 "Inconsistent stackmap frames at branch target %d", target); 132 "Inconsistent stackmap frames at branch target %d", target);
133 return;
134 }
135 // check if uninitialized objects exist on backward branches
136 check_new_object(frame, target, CHECK_VERIFY(frame->verifier()));
137 }
138
139 void StackMapTable::check_new_object(
140 const StackMapFrame* frame, int32_t target, TRAPS) const {
141 if (frame->offset() > target && frame->has_new_object()) {
142 frame->verifier()->verify_error(
143 ErrorContext::bad_code(frame->offset()),
144 "Uninitialized object exists on backward branch %d", target);
145 return;
146 } 133 }
147 } 134 }
148 135
149 void StackMapTable::print_on(outputStream* str) const { 136 void StackMapTable::print_on(outputStream* str) const {
150 str->indent().print_cr("StackMapTable: frame_count = %d", _frame_count); 137 str->indent().print_cr("StackMapTable: frame_count = %d", _frame_count);

mercurial