--- a/src/hotspot/share/classfile/verifier.cpp Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/verifier.cpp Tue May 14 11:29:18 2019 -0400
@@ -595,9 +595,9 @@
return VerificationType::reference_type(vmSymbols::java_lang_Object());
}
-TypeOrigin ClassVerifier::ref_ctx(const char* sig, TRAPS) {
+TypeOrigin ClassVerifier::ref_ctx(const char* sig) {
VerificationType vt = VerificationType::reference_type(
- create_temporary_symbol(sig, (int)strlen(sig), THREAD));
+ create_temporary_symbol(sig, (int)strlen(sig)));
return TypeOrigin::implicit(vt);
}
@@ -647,7 +647,7 @@
// Translate the signature arguments into verification types.
while (!sig_stream.at_return_type()) {
- int n = change_sig_to_verificationType(&sig_stream, sig_type, CHECK_VERIFY(this));
+ int n = change_sig_to_verificationType(&sig_stream, sig_type);
assert(n <= 2, "Unexpected signature type");
// Store verification type(s). Longs and Doubles each have two verificationTypes.
@@ -664,7 +664,7 @@
// Store verification type(s) for the return type, if there is one.
if (sig_stream.type() != T_VOID) {
- int n = change_sig_to_verificationType(&sig_stream, sig_type, CHECK_VERIFY(this));
+ int n = change_sig_to_verificationType(&sig_stream, sig_type);
assert(n <= 2, "Unexpected signature return type");
for (int y = 0; y < n; y++) {
verif_types->push(sig_type[y]);
@@ -925,7 +925,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_int_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[I", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[I")),
bad_type_msg, "iaload");
return;
}
@@ -953,7 +953,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_char_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[C", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[C")),
bad_type_msg, "caload");
return;
}
@@ -967,7 +967,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_short_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[S", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[S")),
bad_type_msg, "saload");
return;
}
@@ -981,7 +981,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_long_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[J", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[J")),
bad_type_msg, "laload");
return;
}
@@ -996,7 +996,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_float_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[F", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[F")),
bad_type_msg, "faload");
return;
}
@@ -1010,7 +1010,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_double_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[D", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[D")),
bad_type_msg, "daload");
return;
}
@@ -1099,7 +1099,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_int_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[I", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[I")),
bad_type_msg, "iastore");
return;
}
@@ -1127,7 +1127,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_char_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[C", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[C")),
bad_type_msg, "castore");
return;
}
@@ -1141,7 +1141,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_short_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[S", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[S")),
bad_type_msg, "sastore");
return;
}
@@ -1156,7 +1156,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_long_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[J", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[J")),
bad_type_msg, "lastore");
return;
}
@@ -1170,7 +1170,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_float_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[F", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[F")),
bad_type_msg, "fastore");
return;
}
@@ -1185,7 +1185,7 @@
VerificationType::reference_check(), CHECK_VERIFY(this));
if (!atype.is_double_array()) {
verify_error(ErrorContext::bad_type(bci,
- current_frame.stack_top_ctx(), ref_ctx("[D", THREAD)),
+ current_frame.stack_top_ctx(), ref_ctx("[D")),
bad_type_msg, "dastore");
return;
}
@@ -2183,8 +2183,7 @@
uintptr_t constant_type_buffer[2];
VerificationType* v_constant_type = (VerificationType*)constant_type_buffer;
SignatureStream sig_stream(constant_type, false);
- int n = change_sig_to_verificationType(
- &sig_stream, v_constant_type, CHECK_VERIFY(this));
+ int n = change_sig_to_verificationType(&sig_stream, v_constant_type);
int opcode_n = (opcode == Bytecodes::_ldc2_w ? 2 : 1);
if (n != opcode_n) {
// wrong kind of ldc; reverify against updated type mask
@@ -2325,8 +2324,7 @@
SignatureStream sig_stream(field_sig, false);
VerificationType stack_object_type;
- int n = change_sig_to_verificationType(
- &sig_stream, field_type, CHECK_VERIFY(this));
+ int n = change_sig_to_verificationType(&sig_stream, field_type);
u2 bci = bcs->bci();
bool is_assignable;
switch (bcs->raw_code()) {
@@ -3002,8 +3000,7 @@
}
// from_bt[index] contains the array signature which has a length of 2
- Symbol* sig = create_temporary_symbol(
- from_bt[index], 2, CHECK_(VerificationType::bogus_type()));
+ Symbol* sig = create_temporary_symbol(from_bt[index], 2);
return VerificationType::reference_type(sig);
}
@@ -3041,8 +3038,7 @@
int n = os::snprintf(arr_sig_str, length + 1, "[L%s;", component_name);
assert(n == length, "Unexpected number of characters in string");
}
- Symbol* arr_sig = create_temporary_symbol(
- arr_sig_str, length, CHECK_VERIFY(this));
+ Symbol* arr_sig = create_temporary_symbol(arr_sig_str, length);
VerificationType new_array_type = VerificationType::reference_type(arr_sig);
current_frame->push_stack(new_array_type, CHECK_VERIFY(this));
}
@@ -3150,18 +3146,18 @@
// These are stored in the verifier until the end of verification so that
// they can be reference counted.
Symbol* ClassVerifier::create_temporary_symbol(const Symbol *s, int begin,
- int end, TRAPS) {
+ int end) {
const char* name = (const char*)s->base() + begin;
int length = end - begin;
- return create_temporary_symbol(name, length, CHECK_NULL);
+ return create_temporary_symbol(name, length);
}
-Symbol* ClassVerifier::create_temporary_symbol(const char *name, int length, TRAPS) {
+Symbol* ClassVerifier::create_temporary_symbol(const char *name, int length) {
// Quick deduplication check
if (_previous_symbol != NULL && _previous_symbol->equals(name, length)) {
return _previous_symbol;
}
- Symbol* sym = SymbolTable::new_symbol(name, length, CHECK_NULL);
+ Symbol* sym = SymbolTable::new_symbol(name, length);
if (!sym->is_permanent()) {
if (_symbols == NULL) {
_symbols = new GrowableArray<Symbol*>(50, 0, NULL);