提交 11655017 编写于 作者: H hseigel

8046233: VerifyError on backward branch

Summary: Remove check that causes the VerifyError
Reviewed-by: dholmes, coleenp, acorn
上级 5b217c44
......@@ -54,21 +54,6 @@ StackMapFrame* StackMapFrame::frame_in_exception_handler(u1 flags) {
return frame;
}
bool StackMapFrame::has_new_object() const {
int32_t i;
for (i = 0; i < _max_locals; i++) {
if (_locals[i].is_uninitialized()) {
return true;
}
}
for (i = 0; i < _stack_size; i++) {
if (_stack[i].is_uninitialized()) {
return true;
}
}
return false;
}
void StackMapFrame::initialize_object(
VerificationType old_object, VerificationType new_object) {
int32_t i;
......
......@@ -154,10 +154,6 @@ class StackMapFrame : public ResourceObj {
VerificationType set_locals_from_arg(
const methodHandle m, VerificationType thisKlass, TRAPS);
// Search local variable type array and stack type array.
// Return true if an uninitialized object is found.
bool has_new_object() const;
// Search local variable type array and stack type array.
// Set every element with type of old_object to new_object.
void initialize_object(
......
......@@ -130,19 +130,6 @@ void StackMapTable::check_jump_target(
if (!match || (target < 0 || target >= _code_length)) {
frame->verifier()->verify_error(ctx,
"Inconsistent stackmap frames at branch target %d", target);
return;
}
// check if uninitialized objects exist on backward branches
check_new_object(frame, target, CHECK_VERIFY(frame->verifier()));
}
void StackMapTable::check_new_object(
const StackMapFrame* frame, int32_t target, TRAPS) const {
if (frame->offset() > target && frame->has_new_object()) {
frame->verifier()->verify_error(
ErrorContext::bad_code(frame->offset()),
"Uninitialized object exists on backward branch %d", target);
return;
}
}
......
......@@ -90,10 +90,6 @@ class StackMapTable : public StackObj {
// Returns the frame array index where the frame with offset is stored.
int get_index_from_offset(int32_t offset) const;
// Make sure that there's no uninitialized object exist on backward branch.
void check_new_object(
const StackMapFrame* frame, int32_t target, TRAPS) const;
void print_on(outputStream* str) const;
};
......
/*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2014, 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
......@@ -147,7 +147,8 @@ class VerifyErrorCases {
"no stackmap frame at jump location or bad jump",
"Inconsistent stackmap frames at branch target "),
new Case("case15", "stackMapTable.cpp", true, "check_new_object",
/* Backward jump with uninit is allowed starting with JDK 8 */
new Case("case15", "stackMapTable.cpp", false, "check_new_object",
"backward jump with uninit",
"Uninitialized object exists on backward branch "),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册