mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
6973308: Missing zero length check before repne scas in check_klass_subtype_slow_path()
Set Z = 0 (not equal) before repne_scan() to indicate that class was not found when RCX == 0. Reviewed-by: never, phh
This commit is contained in:
parent
b071e2accc
commit
f0b6dc4e4f
6 changed files with 68 additions and 60 deletions
|
@ -117,7 +117,7 @@ void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exc
|
|||
(address)h_exception(), file, line, thread);
|
||||
}
|
||||
// for AbortVMOnException flag
|
||||
NOT_PRODUCT(Exceptions::debug_check_abort(h_exception));
|
||||
NOT_PRODUCT(Exceptions::debug_check_abort(h_exception, message));
|
||||
|
||||
// Check for special boot-strapping/vm-thread handling
|
||||
if (special_exception(thread, file, line, h_exception)) return;
|
||||
|
@ -375,17 +375,26 @@ ExceptionMark::~ExceptionMark() {
|
|||
|
||||
#ifndef PRODUCT
|
||||
// caller frees value_string if necessary
|
||||
void Exceptions::debug_check_abort(const char *value_string) {
|
||||
void Exceptions::debug_check_abort(const char *value_string, const char* message) {
|
||||
if (AbortVMOnException != NULL && value_string != NULL &&
|
||||
strstr(value_string, AbortVMOnException)) {
|
||||
fatal(err_msg("Saw %s, aborting", value_string));
|
||||
if (AbortVMOnExceptionMessage == NULL || message == NULL ||
|
||||
strcmp(message, AbortVMOnExceptionMessage) == 0) {
|
||||
fatal(err_msg("Saw %s, aborting", value_string));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Exceptions::debug_check_abort(Handle exception) {
|
||||
void Exceptions::debug_check_abort(Handle exception, const char* message) {
|
||||
if (AbortVMOnException != NULL) {
|
||||
ResourceMark rm;
|
||||
debug_check_abort(instanceKlass::cast(exception()->klass())->external_name());
|
||||
if (message == NULL && exception->is_a(SystemDictionary::Throwable_klass())) {
|
||||
oop msg = java_lang_Throwable::message(exception);
|
||||
if (msg != NULL) {
|
||||
message = java_lang_String::as_utf8_string(msg);
|
||||
}
|
||||
}
|
||||
debug_check_abort(instanceKlass::cast(exception()->klass())->external_name(), message);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue