Merge master
This commit is contained in:
commit
d8a16c6d49
179
8136577_Make_AbortVMOnException_available_in_product_builds.patch
Executable file
179
8136577_Make_AbortVMOnException_available_in_product_builds.patch
Executable file
@ -0,0 +1,179 @@
|
|||||||
|
diff --git a/hotspot/src/share/vm/c1/c1_Runtime1.cpp b/hotspot/src/share/vm/c1/c1_Runtime1.cpp
|
||||||
|
index 3c1ea7280..b8d866786 100644
|
||||||
|
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp
|
||||||
|
@@ -542,7 +542,7 @@ JRT_ENTRY_NO_ASYNC(static address, exception_handler_for_pc_helper(JavaThread* t
|
||||||
|
exception->print_value_string(), p2i((address)exception()), nm->method()->print_value_string(), p2i(pc), p2i(thread));
|
||||||
|
}
|
||||||
|
// for AbortVMOnException flag
|
||||||
|
- NOT_PRODUCT(Exceptions::debug_check_abort(exception));
|
||||||
|
+ Exceptions::debug_check_abort(exception);
|
||||||
|
|
||||||
|
// Clear out the exception oop and pc since looking up an
|
||||||
|
// exception handler can cause class loading, which might throw an
|
||||||
|
diff --git a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
|
||||||
|
index 3a5f31ae7..dd680a258 100644
|
||||||
|
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
|
||||||
|
@@ -2861,7 +2861,7 @@ run:
|
||||||
|
(int)continuation_bci, p2i(THREAD));
|
||||||
|
}
|
||||||
|
// for AbortVMOnException flag
|
||||||
|
- NOT_PRODUCT(Exceptions::debug_check_abort(except_oop));
|
||||||
|
+ Exceptions::debug_check_abort(except_oop);
|
||||||
|
|
||||||
|
// Update profiling data.
|
||||||
|
BI_PROFILE_ALIGN_TO_CURRENT_BCI();
|
||||||
|
@@ -2877,7 +2877,8 @@ run:
|
||||||
|
p2i(THREAD));
|
||||||
|
}
|
||||||
|
// for AbortVMOnException flag
|
||||||
|
- NOT_PRODUCT(Exceptions::debug_check_abort(except_oop));
|
||||||
|
+ Exceptions::debug_check_abort(except_oop);
|
||||||
|
+
|
||||||
|
// No handler in this activation, unwind and try again
|
||||||
|
THREAD->set_pending_exception(except_oop(), NULL, 0);
|
||||||
|
goto handle_return;
|
||||||
|
diff --git a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
|
||||||
|
index 5d2845383..b9eeffeee 100644
|
||||||
|
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
|
||||||
|
@@ -472,7 +472,7 @@ IRT_ENTRY(address, InterpreterRuntime::exception_handler_for_exception(JavaThrea
|
||||||
|
// // warning("performance bug: should not call runtime if method has no exception handlers");
|
||||||
|
// }
|
||||||
|
// for AbortVMOnException flag
|
||||||
|
- NOT_PRODUCT(Exceptions::debug_check_abort(h_exception));
|
||||||
|
+ Exceptions::debug_check_abort(h_exception);
|
||||||
|
|
||||||
|
// exception handler lookup
|
||||||
|
KlassHandle h_klass(THREAD, h_exception->klass());
|
||||||
|
diff --git a/hotspot/src/share/vm/opto/runtime.cpp b/hotspot/src/share/vm/opto/runtime.cpp
|
||||||
|
index 6cfb99175..0a86211ba 100644
|
||||||
|
--- a/hotspot/src/share/vm/opto/runtime.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/opto/runtime.cpp
|
||||||
|
@@ -1321,7 +1321,7 @@ JRT_ENTRY_NO_ASYNC(address, OptoRuntime::handle_exception_C_helper(JavaThread* t
|
||||||
|
}
|
||||||
|
|
||||||
|
// for AbortVMOnException flag
|
||||||
|
- NOT_PRODUCT(Exceptions::debug_check_abort(exception));
|
||||||
|
+ Exceptions::debug_check_abort(exception);
|
||||||
|
|
||||||
|
#ifdef ASSERT
|
||||||
|
if (!(exception->is_a(SystemDictionary::Throwable_klass()))) {
|
||||||
|
diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp
|
||||||
|
index 85e91f95b..65dfcf69b 100644
|
||||||
|
--- a/hotspot/src/share/vm/runtime/globals.hpp
|
||||||
|
+++ b/hotspot/src/share/vm/runtime/globals.hpp
|
||||||
|
@@ -2739,11 +2739,11 @@ class CommandLineFlags {
|
||||||
|
"standard exit from VM if bytecode verify error " \
|
||||||
|
"(only in debug mode)") \
|
||||||
|
\
|
||||||
|
- notproduct(ccstr, AbortVMOnException, NULL, \
|
||||||
|
+ diagnostic(ccstr, AbortVMOnException, NULL, \
|
||||||
|
"Call fatal if this exception is thrown. Example: " \
|
||||||
|
"java -XX:AbortVMOnException=java.lang.NullPointerException Foo") \
|
||||||
|
\
|
||||||
|
- notproduct(ccstr, AbortVMOnExceptionMessage, NULL, \
|
||||||
|
+ diagnostic(ccstr, AbortVMOnExceptionMessage, NULL, \
|
||||||
|
"Call fatal if the exception pointed by AbortVMOnException " \
|
||||||
|
"has this message") \
|
||||||
|
\
|
||||||
|
diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
|
||||||
|
index 5f540247f..5eabd3df0 100644
|
||||||
|
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
|
||||||
|
@@ -895,7 +895,8 @@ address SharedRuntime::continuation_for_implicit_exception(JavaThread* thread,
|
||||||
|
assert(exception_kind == IMPLICIT_NULL || exception_kind == IMPLICIT_DIVIDE_BY_ZERO, "wrong implicit exception kind");
|
||||||
|
|
||||||
|
// for AbortVMOnException flag
|
||||||
|
- NOT_PRODUCT(Exceptions::debug_check_abort("java.lang.NullPointerException"));
|
||||||
|
+ Exceptions::debug_check_abort("java.lang.NullPointerException");
|
||||||
|
+
|
||||||
|
if (exception_kind == IMPLICIT_NULL) {
|
||||||
|
Events::log_exception(thread, "Implicit null exception at " INTPTR_FORMAT " to " INTPTR_FORMAT, pc, target_pc);
|
||||||
|
} else {
|
||||||
|
diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp
|
||||||
|
index 4cb783e2d..94b9e69d2 100644
|
||||||
|
--- a/hotspot/src/share/vm/runtime/thread.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/runtime/thread.cpp
|
||||||
|
@@ -2218,7 +2218,7 @@ void JavaThread::send_thread_stop(oop java_throwable) {
|
||||||
|
tty->print_cr("Pending Async. exception installed of type: %s", InstanceKlass::cast(_pending_async_exception->klass())->external_name());
|
||||||
|
}
|
||||||
|
// for AbortVMOnException flag
|
||||||
|
- NOT_PRODUCT(Exceptions::debug_check_abort(InstanceKlass::cast(_pending_async_exception->klass())->external_name()));
|
||||||
|
+ Exceptions::debug_check_abort(InstanceKlass::cast(_pending_async_exception->klass())->external_name());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/hotspot/src/share/vm/utilities/exceptions.cpp b/hotspot/src/share/vm/utilities/exceptions.cpp
|
||||||
|
index db4a17029..8b25cf8c4 100644
|
||||||
|
--- a/hotspot/src/share/vm/utilities/exceptions.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/utilities/exceptions.cpp
|
||||||
|
@@ -148,7 +148,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, message));
|
||||||
|
+ Exceptions::debug_check_abort(h_exception, message);
|
||||||
|
|
||||||
|
// Check for special boot-strapping/vm-thread handling
|
||||||
|
if (special_exception(thread, file, line, h_exception)) {
|
||||||
|
@@ -477,13 +477,12 @@ ExceptionMark::~ExceptionMark() {
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-#ifndef PRODUCT
|
||||||
|
// caller frees value_string if necessary
|
||||||
|
void Exceptions::debug_check_abort(const char *value_string, const char* message) {
|
||||||
|
if (AbortVMOnException != NULL && value_string != NULL &&
|
||||||
|
- strstr(value_string, AbortVMOnException)) {
|
||||||
|
- if (AbortVMOnExceptionMessage == NULL || message == NULL ||
|
||||||
|
- strcmp(message, AbortVMOnExceptionMessage) == 0) {
|
||||||
|
+ strstr(AbortVMOnException, value_string)) {
|
||||||
|
+ if (AbortVMOnExceptionMessage == NULL || (message != NULL &&
|
||||||
|
+ strstr(message, AbortVMOnExceptionMessage))) {
|
||||||
|
fatal(err_msg("Saw %s, aborting", value_string));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -491,14 +490,17 @@ void Exceptions::debug_check_abort(const char *value_string, const char* message
|
||||||
|
|
||||||
|
void Exceptions::debug_check_abort(Handle exception, const char* message) {
|
||||||
|
if (AbortVMOnException != NULL) {
|
||||||
|
- ResourceMark rm;
|
||||||
|
- 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_helper(exception, message);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void Exceptions::debug_check_abort_helper(Handle exception, const char* message) {
|
||||||
|
+ ResourceMark rm;
|
||||||
|
+ 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);
|
||||||
|
}
|
||||||
|
+ debug_check_abort(InstanceKlass::cast(exception()->klass())->external_name(), message);
|
||||||
|
}
|
||||||
|
-#endif
|
||||||
|
diff --git a/hotspot/src/share/vm/utilities/exceptions.hpp b/hotspot/src/share/vm/utilities/exceptions.hpp
|
||||||
|
index 7e10f735e..9da8f4d4b 100644
|
||||||
|
--- a/hotspot/src/share/vm/utilities/exceptions.hpp
|
||||||
|
+++ b/hotspot/src/share/vm/utilities/exceptions.hpp
|
||||||
|
@@ -174,8 +174,9 @@ class Exceptions {
|
||||||
|
static void print_exception_counts_on_error(outputStream* st);
|
||||||
|
|
||||||
|
// for AbortVMOnException flag
|
||||||
|
- NOT_PRODUCT(static void debug_check_abort(Handle exception, const char* message = NULL);)
|
||||||
|
- NOT_PRODUCT(static void debug_check_abort(const char *value_string, const char* message = NULL);)
|
||||||
|
+ static void debug_check_abort(Handle exception, const char* message = NULL);
|
||||||
|
+ static void debug_check_abort_helper(Handle exception, const char* message = NULL);
|
||||||
|
+ static void debug_check_abort(const char *value_string, const char* message = NULL);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
290
8173361-various-crashes-in-JvmtiExport-post_compiled.patch
Executable file
290
8173361-various-crashes-in-JvmtiExport-post_compiled.patch
Executable file
@ -0,0 +1,290 @@
|
|||||||
|
diff --git a/hotspot/src/share/vm/code/nmethod.cpp b/hotspot/src/share/vm/code/nmethod.cpp
|
||||||
|
index 175c195c6..01e878022 100644
|
||||||
|
--- a/hotspot/src/share/vm/code/nmethod.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/code/nmethod.cpp
|
||||||
|
@@ -1656,24 +1656,28 @@ bool nmethod::can_unload(BoolObjectClosure* is_alive, oop* root, bool unloading_
|
||||||
|
// Transfer information from compilation to jvmti
|
||||||
|
void nmethod::post_compiled_method_load_event() {
|
||||||
|
|
||||||
|
- Method* moop = method();
|
||||||
|
+ // This is a bad time for a safepoint. We don't want
|
||||||
|
+ // this nmethod to get unloaded while we're queueing the event.
|
||||||
|
+ No_Safepoint_Verifier nsv;
|
||||||
|
+
|
||||||
|
+ Method* m = method();
|
||||||
|
#ifndef USDT2
|
||||||
|
HS_DTRACE_PROBE8(hotspot, compiled__method__load,
|
||||||
|
- moop->klass_name()->bytes(),
|
||||||
|
- moop->klass_name()->utf8_length(),
|
||||||
|
- moop->name()->bytes(),
|
||||||
|
- moop->name()->utf8_length(),
|
||||||
|
- moop->signature()->bytes(),
|
||||||
|
- moop->signature()->utf8_length(),
|
||||||
|
+ m->klass_name()->bytes(),
|
||||||
|
+ m->klass_name()->utf8_length(),
|
||||||
|
+ m->name()->bytes(),
|
||||||
|
+ m->name()->utf8_length(),
|
||||||
|
+ m->signature()->bytes(),
|
||||||
|
+ m->signature()->utf8_length(),
|
||||||
|
insts_begin(), insts_size());
|
||||||
|
#else /* USDT2 */
|
||||||
|
HOTSPOT_COMPILED_METHOD_LOAD(
|
||||||
|
- (char *) moop->klass_name()->bytes(),
|
||||||
|
- moop->klass_name()->utf8_length(),
|
||||||
|
- (char *) moop->name()->bytes(),
|
||||||
|
- moop->name()->utf8_length(),
|
||||||
|
- (char *) moop->signature()->bytes(),
|
||||||
|
- moop->signature()->utf8_length(),
|
||||||
|
+ (char *) m->klass_name()->bytes(),
|
||||||
|
+ m->klass_name()->utf8_length(),
|
||||||
|
+ (char *) m->name()->bytes(),
|
||||||
|
+ m->name()->utf8_length(),
|
||||||
|
+ (char *) m->signature()->bytes(),
|
||||||
|
+ m->signature()->utf8_length(),
|
||||||
|
insts_begin(), insts_size());
|
||||||
|
#endif /* USDT2 */
|
||||||
|
|
||||||
|
diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp
|
||||||
|
index 895fbbf07..367c9a09d 100644
|
||||||
|
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp
|
||||||
|
@@ -1786,7 +1786,7 @@ jmethodID InstanceKlass::get_jmethod_id(instanceKlassHandle ik_h, methodHandle m
|
||||||
|
// we're single threaded or at a safepoint - no locking needed
|
||||||
|
get_jmethod_id_length_value(jmeths, idnum, &length, &id);
|
||||||
|
} else {
|
||||||
|
- MutexLocker ml(JmethodIdCreation_lock);
|
||||||
|
+ MutexLockerEx ml(JmethodIdCreation_lock, Mutex::_no_safepoint_check_flag);
|
||||||
|
get_jmethod_id_length_value(jmeths, idnum, &length, &id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1836,7 +1836,7 @@ jmethodID InstanceKlass::get_jmethod_id(instanceKlassHandle ik_h, methodHandle m
|
||||||
|
id = get_jmethod_id_fetch_or_update(ik_h, idnum, new_id, new_jmeths,
|
||||||
|
&to_dealloc_id, &to_dealloc_jmeths);
|
||||||
|
} else {
|
||||||
|
- MutexLocker ml(JmethodIdCreation_lock);
|
||||||
|
+ MutexLockerEx ml(JmethodIdCreation_lock, Mutex::_no_safepoint_check_flag);
|
||||||
|
id = get_jmethod_id_fetch_or_update(ik_h, idnum, new_id, new_jmeths,
|
||||||
|
&to_dealloc_id, &to_dealloc_jmeths);
|
||||||
|
}
|
||||||
|
diff --git a/hotspot/src/share/vm/prims/jvmtiExport.cpp b/hotspot/src/share/vm/prims/jvmtiExport.cpp
|
||||||
|
index 9b612598f..967ed200d 100644
|
||||||
|
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp
|
||||||
|
@@ -1754,7 +1754,7 @@ jvmtiCompiledMethodLoadInlineRecord* create_inline_record(nmethod* nm) {
|
||||||
|
int stackframe = 0;
|
||||||
|
for(ScopeDesc* sd = nm->scope_desc_at(p->real_pc(nm));sd != NULL;sd = sd->sender()) {
|
||||||
|
// sd->method() can be NULL for stubs but not for nmethods. To be completely robust, include an assert that we should never see a null sd->method()
|
||||||
|
- assert(sd->method() != NULL, "sd->method() cannot be null.");
|
||||||
|
+ guarantee(sd->method() != NULL, "sd->method() cannot be null.");
|
||||||
|
record->pcinfo[scope].methods[stackframe] = sd->method()->jmethod_id();
|
||||||
|
record->pcinfo[scope].bcis[stackframe] = sd->bci();
|
||||||
|
stackframe++;
|
||||||
|
diff --git a/hotspot/src/share/vm/prims/jvmtiImpl.cpp b/hotspot/src/share/vm/prims/jvmtiImpl.cpp
|
||||||
|
index 3c66b1671..3bcd15ed6 100644
|
||||||
|
--- a/hotspot/src/share/vm/prims/jvmtiImpl.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/prims/jvmtiImpl.cpp
|
||||||
|
@@ -897,9 +897,6 @@ JvmtiDeferredEvent JvmtiDeferredEvent::compiled_method_load_event(
|
||||||
|
nmethod* nm) {
|
||||||
|
JvmtiDeferredEvent event = JvmtiDeferredEvent(TYPE_COMPILED_METHOD_LOAD);
|
||||||
|
event._event_data.compiled_method_load = nm;
|
||||||
|
- // Keep the nmethod alive until the ServiceThread can process
|
||||||
|
- // this deferred event.
|
||||||
|
- nmethodLocker::lock_nmethod(nm);
|
||||||
|
return event;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -932,14 +929,12 @@ JvmtiDeferredEvent JvmtiDeferredEvent::dynamic_code_generated_event(
|
||||||
|
}
|
||||||
|
|
||||||
|
void JvmtiDeferredEvent::post() {
|
||||||
|
- assert(ServiceThread::is_service_thread(Thread::current()),
|
||||||
|
+ assert(Thread::current()->is_service_thread(),
|
||||||
|
"Service thread must post enqueued events");
|
||||||
|
switch(_type) {
|
||||||
|
case TYPE_COMPILED_METHOD_LOAD: {
|
||||||
|
nmethod* nm = _event_data.compiled_method_load;
|
||||||
|
JvmtiExport::post_compiled_method_load(nm);
|
||||||
|
- // done with the deferred event so unlock the nmethod
|
||||||
|
- nmethodLocker::unlock_nmethod(nm);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TYPE_COMPILED_METHOD_UNLOAD: {
|
||||||
|
@@ -969,6 +964,21 @@ void JvmtiDeferredEvent::post() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+// Keep the nmethod for compiled_method_load from being unloaded.
|
||||||
|
+void JvmtiDeferredEvent::oops_do(OopClosure* f, CodeBlobClosure* cf) {
|
||||||
|
+ if (cf != NULL && _type == TYPE_COMPILED_METHOD_LOAD) {
|
||||||
|
+ cf->do_code_blob(_event_data.compiled_method_load);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+// The sweeper calls this and marks the nmethods here on the stack so that
|
||||||
|
+// they cannot be turned into zombies while in the queue.
|
||||||
|
+void JvmtiDeferredEvent::nmethods_do(CodeBlobClosure* cf) {
|
||||||
|
+ if (cf != NULL && _type == TYPE_COMPILED_METHOD_LOAD) {
|
||||||
|
+ cf->do_code_blob(_event_data.compiled_method_load);
|
||||||
|
+ } // May add UNLOAD event but it doesn't work yet.
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
JvmtiDeferredEventQueue::QueueNode* JvmtiDeferredEventQueue::_queue_tail = NULL;
|
||||||
|
JvmtiDeferredEventQueue::QueueNode* JvmtiDeferredEventQueue::_queue_head = NULL;
|
||||||
|
|
||||||
|
@@ -1084,3 +1094,15 @@ void JvmtiDeferredEventQueue::process_pending_events() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+void JvmtiDeferredEventQueue::oops_do(OopClosure* f, CodeBlobClosure* cf) {
|
||||||
|
+ for(QueueNode* node = _queue_head; node != NULL; node = node->next()) {
|
||||||
|
+ node->event().oops_do(f, cf);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void JvmtiDeferredEventQueue::nmethods_do(CodeBlobClosure* cf) {
|
||||||
|
+ for(QueueNode* node = _queue_head; node != NULL; node = node->next()) {
|
||||||
|
+ node->event().nmethods_do(cf);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
diff --git a/hotspot/src/share/vm/prims/jvmtiImpl.hpp b/hotspot/src/share/vm/prims/jvmtiImpl.hpp
|
||||||
|
index 9f36f28fb..d74789451 100644
|
||||||
|
--- a/hotspot/src/share/vm/prims/jvmtiImpl.hpp
|
||||||
|
+++ b/hotspot/src/share/vm/prims/jvmtiImpl.hpp
|
||||||
|
@@ -492,6 +492,10 @@ class JvmtiDeferredEvent VALUE_OBJ_CLASS_SPEC {
|
||||||
|
|
||||||
|
// Actually posts the event.
|
||||||
|
void post() NOT_JVMTI_RETURN;
|
||||||
|
+ // Sweeper support to keep nmethods from being zombied while in the queue.
|
||||||
|
+ void nmethods_do(CodeBlobClosure* cf);
|
||||||
|
+ // GC support to keep nmethod from being unloaded while in the queue.
|
||||||
|
+ void oops_do(OopClosure* f, CodeBlobClosure* cf);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -511,7 +515,7 @@ class JvmtiDeferredEventQueue : AllStatic {
|
||||||
|
QueueNode(const JvmtiDeferredEvent& event)
|
||||||
|
: _event(event), _next(NULL) {}
|
||||||
|
|
||||||
|
- const JvmtiDeferredEvent& event() const { return _event; }
|
||||||
|
+ JvmtiDeferredEvent& event() { return _event; }
|
||||||
|
QueueNode* next() const { return _next; }
|
||||||
|
|
||||||
|
void set_next(QueueNode* next) { _next = next; }
|
||||||
|
@@ -529,6 +533,10 @@ class JvmtiDeferredEventQueue : AllStatic {
|
||||||
|
static bool has_events() NOT_JVMTI_RETURN_(false);
|
||||||
|
static void enqueue(const JvmtiDeferredEvent& event) NOT_JVMTI_RETURN;
|
||||||
|
static JvmtiDeferredEvent dequeue() NOT_JVMTI_RETURN_(JvmtiDeferredEvent());
|
||||||
|
+ // Sweeper support to keep nmethods from being zombied while in the queue.
|
||||||
|
+ static void nmethods_do(CodeBlobClosure* cf);
|
||||||
|
+ // GC support to keep nmethod from being unloaded while in the queue.
|
||||||
|
+ static void oops_do(OopClosure* f, CodeBlobClosure* cf);
|
||||||
|
|
||||||
|
// Used to enqueue events without using a lock, for times (such as during
|
||||||
|
// safepoint) when we can't or don't want to lock the Service_lock.
|
||||||
|
diff --git a/hotspot/src/share/vm/runtime/serviceThread.cpp b/hotspot/src/share/vm/runtime/serviceThread.cpp
|
||||||
|
index c3a2b88a5..a2a32ad2b 100644
|
||||||
|
--- a/hotspot/src/share/vm/runtime/serviceThread.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/runtime/serviceThread.cpp
|
||||||
|
@@ -34,6 +34,7 @@
|
||||||
|
#include "services/diagnosticFramework.hpp"
|
||||||
|
|
||||||
|
ServiceThread* ServiceThread::_instance = NULL;
|
||||||
|
+JvmtiDeferredEvent* ServiceThread::_jvmti_event = NULL;
|
||||||
|
|
||||||
|
void ServiceThread::initialize() {
|
||||||
|
EXCEPTION_MARK;
|
||||||
|
@@ -112,12 +113,15 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (has_jvmti_events) {
|
||||||
|
+ // Get the event under the Service_lock
|
||||||
|
jvmti_event = JvmtiDeferredEventQueue::dequeue();
|
||||||
|
+ _jvmti_event = &jvmti_event;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (has_jvmti_events) {
|
||||||
|
- jvmti_event.post();
|
||||||
|
+ _jvmti_event->post();
|
||||||
|
+ _jvmti_event = NULL; // reset
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sensors_changed) {
|
||||||
|
@@ -138,6 +142,26 @@ void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-bool ServiceThread::is_service_thread(Thread* thread) {
|
||||||
|
- return thread == _instance;
|
||||||
|
+void ServiceThread::oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf) {
|
||||||
|
+ JavaThread::oops_do(f, cld_f, cf);
|
||||||
|
+ // The ServiceThread "owns" the JVMTI Deferred events, scan them here
|
||||||
|
+ // to keep them alive until they are processed.
|
||||||
|
+ if (cf != NULL) {
|
||||||
|
+ if (_jvmti_event != NULL) {
|
||||||
|
+ _jvmti_event->oops_do(f, cf);
|
||||||
|
+ }
|
||||||
|
+ MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
|
||||||
|
+ JvmtiDeferredEventQueue::oops_do(f, cf);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void ServiceThread::nmethods_do(CodeBlobClosure* cf) {
|
||||||
|
+ JavaThread::nmethods_do(cf);
|
||||||
|
+ if (cf != NULL) {
|
||||||
|
+ if (_jvmti_event != NULL) {
|
||||||
|
+ _jvmti_event->nmethods_do(cf);
|
||||||
|
+ }
|
||||||
|
+ MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
|
||||||
|
+ JvmtiDeferredEventQueue::nmethods_do(cf);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
diff --git a/hotspot/src/share/vm/runtime/serviceThread.hpp b/hotspot/src/share/vm/runtime/serviceThread.hpp
|
||||||
|
index 42373e6f7..a9c219580 100644
|
||||||
|
--- a/hotspot/src/share/vm/runtime/serviceThread.hpp
|
||||||
|
+++ b/hotspot/src/share/vm/runtime/serviceThread.hpp
|
||||||
|
@@ -29,11 +29,13 @@
|
||||||
|
|
||||||
|
// A JavaThread for low memory detection support and JVMTI
|
||||||
|
// compiled-method-load events.
|
||||||
|
+class JvmtiDeferredEvent;
|
||||||
|
+
|
||||||
|
class ServiceThread : public JavaThread {
|
||||||
|
friend class VMStructs;
|
||||||
|
private:
|
||||||
|
-
|
||||||
|
static ServiceThread* _instance;
|
||||||
|
+ static JvmtiDeferredEvent* _jvmti_event;
|
||||||
|
|
||||||
|
static void service_thread_entry(JavaThread* thread, TRAPS);
|
||||||
|
ServiceThread(ThreadFunction entry_point) : JavaThread(entry_point) {};
|
||||||
|
@@ -43,9 +45,11 @@ class ServiceThread : public JavaThread {
|
||||||
|
|
||||||
|
// Hide this thread from external view.
|
||||||
|
bool is_hidden_from_external_view() const { return true; }
|
||||||
|
+ bool is_service_thread() const { return true; }
|
||||||
|
|
||||||
|
- // Returns true if the passed thread is the service thread.
|
||||||
|
- static bool is_service_thread(Thread* thread);
|
||||||
|
+ // GC support
|
||||||
|
+ void oops_do(OopClosure* f, CLDClosure* cld_f, CodeBlobClosure* cf);
|
||||||
|
+ void nmethods_do(CodeBlobClosure* cf);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SHARE_VM_RUNTIME_SERVICETHREAD_HPP
|
||||||
|
diff --git a/hotspot/src/share/vm/runtime/thread.hpp b/hotspot/src/share/vm/runtime/thread.hpp
|
||||||
|
index cc976182d..950c1b4fa 100644
|
||||||
|
--- a/hotspot/src/share/vm/runtime/thread.hpp
|
||||||
|
+++ b/hotspot/src/share/vm/runtime/thread.hpp
|
||||||
|
@@ -313,6 +313,7 @@ class Thread: public ThreadShadow {
|
||||||
|
virtual bool is_VM_thread() const { return false; }
|
||||||
|
virtual bool is_Java_thread() const { return false; }
|
||||||
|
virtual bool is_Compiler_thread() const { return false; }
|
||||||
|
+ virtual bool is_service_thread() const { return false; }
|
||||||
|
virtual bool is_hidden_from_external_view() const { return false; }
|
||||||
|
virtual bool is_jvmti_agent_thread() const { return false; }
|
||||||
|
// True iff the thread can perform GC operations at a safepoint.
|
||||||
|
--
|
||||||
|
2.22.0
|
||||||
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
From bc0b4ef15436f98b4e7fc87342320b5b4f10ef3c Mon Sep 17 00:00:00 2001
|
|
||||||
Date: Fri, 22 Jan 2021 14:30:40 +0800
|
|
||||||
Subject: Backport of JDK-8182036
|
|
||||||
|
|
||||||
summary: Load from initializing arraycopy uses wrong memory state
|
|
||||||
LLT:
|
|
||||||
Bug url: https://bugs.openjdk.java.net/browse/JDK-8182036
|
|
||||||
---
|
|
||||||
hotspot/src/share/vm/opto/library_call.cpp | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp
|
|
||||||
index cd1b1e5c0..89ebabe6f 100644
|
|
||||||
--- a/hotspot/src/share/vm/opto/library_call.cpp
|
|
||||||
+++ b/hotspot/src/share/vm/opto/library_call.cpp
|
|
||||||
@@ -5703,7 +5703,8 @@ LibraryCallKit::generate_block_arraycopy(const TypePtr* adr_type,
|
|
||||||
((src_off ^ dest_off) & (BytesPerLong-1)) == 0) {
|
|
||||||
Node* sptr = basic_plus_adr(src, src_off);
|
|
||||||
Node* dptr = basic_plus_adr(dest, dest_off);
|
|
||||||
- Node* sval = make_load(control(), sptr, TypeInt::INT, T_INT, adr_type, MemNode::unordered);
|
|
||||||
+ const TypePtr* s_adr_type = _gvn.type(sptr)->is_ptr();
|
|
||||||
+ Node* sval = make_load(control(), sptr, TypeInt::INT, T_INT, s_adr_type, MemNode::unordered);
|
|
||||||
store_to_memory(control(), dptr, sval, T_INT, adr_type, MemNode::unordered);
|
|
||||||
src_off += BytesPerInt;
|
|
||||||
dest_off += BytesPerInt;
|
|
||||||
--
|
|
||||||
2.19.0
|
|
||||||
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
diff --git a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp
|
|
||||||
index 8eb031e3..22daa502 100644
|
|
||||||
--- a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp
|
|
||||||
+++ b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp
|
|
||||||
@@ -55,7 +55,7 @@ define_pd_global(intx, ConditionalMoveLimit, 3);
|
|
||||||
define_pd_global(intx, FLOATPRESSURE, 64);
|
|
||||||
define_pd_global(intx, FreqInlineSize, 768);
|
|
||||||
define_pd_global(intx, MinJumpTableSize, 10);
|
|
||||||
-define_pd_global(intx, INTPRESSURE, 25);
|
|
||||||
+define_pd_global(intx, INTPRESSURE, 24);
|
|
||||||
define_pd_global(intx, InteriorEntryAlignment, 16);
|
|
||||||
define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K));
|
|
||||||
define_pd_global(intx, LoopUnrollLimit, 60);
|
|
||||||
333
8207011-Remove-uses-of-the-register-storage-class-specifier.patch
Executable file
333
8207011-Remove-uses-of-the-register-storage-class-specifier.patch
Executable file
@ -0,0 +1,333 @@
|
|||||||
|
diff --git a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
|
||||||
|
index f0de6456b..a9562f74a 100644
|
||||||
|
--- a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
|
||||||
|
+++ b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
|
||||||
|
@@ -280,11 +280,11 @@ PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||||
|
|
||||||
|
address os::current_stack_pointer() {
|
||||||
|
#if defined(__clang__) || defined(__llvm__)
|
||||||
|
- register void *esp;
|
||||||
|
+ void *esp;
|
||||||
|
__asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
|
||||||
|
return (address) esp;
|
||||||
|
#elif defined(SPARC_WORKS)
|
||||||
|
- register void *esp;
|
||||||
|
+ void *esp;
|
||||||
|
__asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
|
||||||
|
return (address) ((char*)esp + sizeof(long)*2);
|
||||||
|
#else
|
||||||
|
@@ -367,7 +367,7 @@ frame os::get_sender_for_C_frame(frame* fr) {
|
||||||
|
|
||||||
|
intptr_t* _get_previous_fp() {
|
||||||
|
#if defined(SPARC_WORKS) || defined(__clang__) || defined(__llvm__)
|
||||||
|
- register intptr_t **ebp;
|
||||||
|
+ intptr_t **ebp;
|
||||||
|
__asm__("mov %%" SPELL_REG_FP ", %0":"=r"(ebp));
|
||||||
|
#else
|
||||||
|
register intptr_t **ebp __asm__ (SPELL_REG_FP);
|
||||||
|
diff --git a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
|
||||||
|
index 65c3165ca..4775dc875 100644
|
||||||
|
--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
|
||||||
|
+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
|
||||||
|
@@ -92,11 +92,11 @@ PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
|
||||||
|
|
||||||
|
address os::current_stack_pointer() {
|
||||||
|
#ifdef SPARC_WORKS
|
||||||
|
- register void *esp;
|
||||||
|
+ void *esp;
|
||||||
|
__asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp));
|
||||||
|
return (address) ((char*)esp + sizeof(long)*2);
|
||||||
|
#elif defined(__clang__)
|
||||||
|
- intptr_t* esp;
|
||||||
|
+ void* esp;
|
||||||
|
__asm__ __volatile__ ("mov %%"SPELL_REG_SP", %0":"=r"(esp):);
|
||||||
|
return (address) esp;
|
||||||
|
#else
|
||||||
|
@@ -179,7 +179,7 @@ frame os::get_sender_for_C_frame(frame* fr) {
|
||||||
|
|
||||||
|
intptr_t* _get_previous_fp() {
|
||||||
|
#ifdef SPARC_WORKS
|
||||||
|
- register intptr_t **ebp;
|
||||||
|
+ intptr_t **ebp;
|
||||||
|
__asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp));
|
||||||
|
#elif defined(__clang__)
|
||||||
|
intptr_t **ebp;
|
||||||
|
diff --git a/hotspot/src/share/vm/adlc/adlparse.cpp b/hotspot/src/share/vm/adlc/adlparse.cpp
|
||||||
|
index 31955ff7d..de66eb414 100644
|
||||||
|
--- a/hotspot/src/share/vm/adlc/adlparse.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/adlc/adlparse.cpp
|
||||||
|
@@ -4564,7 +4564,7 @@ char *ADLParser::get_paren_expr(const char *description, bool include_location)
|
||||||
|
// string(still inside the file buffer). Returns a pointer to the string or
|
||||||
|
// NULL if some other token is found instead.
|
||||||
|
char *ADLParser::get_ident_common(bool do_preproc) {
|
||||||
|
- register char c;
|
||||||
|
+ char c;
|
||||||
|
char *start; // Pointer to start of token
|
||||||
|
char *end; // Pointer to end of token
|
||||||
|
|
||||||
|
@@ -4762,7 +4762,7 @@ char *ADLParser::get_unique_ident(FormDict& dict, const char* nameDescription){
|
||||||
|
// invokes a parse_err if the next token is not an integer.
|
||||||
|
// This routine does not leave the integer null-terminated.
|
||||||
|
int ADLParser::get_int(void) {
|
||||||
|
- register char c;
|
||||||
|
+ char c;
|
||||||
|
char *start; // Pointer to start of token
|
||||||
|
char *end; // Pointer to end of token
|
||||||
|
int result; // Storage for integer result
|
||||||
|
diff --git a/hotspot/src/share/vm/adlc/arena.cpp b/hotspot/src/share/vm/adlc/arena.cpp
|
||||||
|
index d7e4fc6eb..8ec3584d1 100644
|
||||||
|
--- a/hotspot/src/share/vm/adlc/arena.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/adlc/arena.cpp
|
||||||
|
@@ -79,7 +79,7 @@ Arena::Arena( Arena *a )
|
||||||
|
// Total of all Chunks in arena
|
||||||
|
size_t Arena::used() const {
|
||||||
|
size_t sum = _chunk->_len - (_max-_hwm); // Size leftover in this Chunk
|
||||||
|
- register Chunk *k = _first;
|
||||||
|
+ Chunk *k = _first;
|
||||||
|
while( k != _chunk) { // Whilst have Chunks in a row
|
||||||
|
sum += k->_len; // Total size of this Chunk
|
||||||
|
k = k->_next; // Bump along to next Chunk
|
||||||
|
@@ -93,7 +93,7 @@ void* Arena::grow( size_t x ) {
|
||||||
|
// Get minimal required size. Either real big, or even bigger for giant objs
|
||||||
|
size_t len = max(x, Chunk::size);
|
||||||
|
|
||||||
|
- register Chunk *k = _chunk; // Get filled-up chunk address
|
||||||
|
+ Chunk *k = _chunk; // Get filled-up chunk address
|
||||||
|
_chunk = new (len) Chunk(len);
|
||||||
|
|
||||||
|
if( k ) k->_next = _chunk; // Append new chunk to end of linked list
|
||||||
|
diff --git a/hotspot/src/share/vm/adlc/dict2.cpp b/hotspot/src/share/vm/adlc/dict2.cpp
|
||||||
|
index f341a2b67..2dc60b250 100644
|
||||||
|
--- a/hotspot/src/share/vm/adlc/dict2.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/adlc/dict2.cpp
|
||||||
|
@@ -283,9 +283,9 @@ void Dict::print(PrintKeyOrValue print_key, PrintKeyOrValue print_value) {
|
||||||
|
// limited to MAXID characters in length. Experimental evidence on 150K of
|
||||||
|
// C text shows excellent spreading of values for any size hash table.
|
||||||
|
int hashstr(const void *t) {
|
||||||
|
- register char c, k = 0;
|
||||||
|
- register int sum = 0;
|
||||||
|
- register const char *s = (const char *)t;
|
||||||
|
+ char c, k = 0;
|
||||||
|
+ int sum = 0;
|
||||||
|
+ const char *s = (const char *)t;
|
||||||
|
|
||||||
|
while (((c = s[k]) != '\0') && (k < MAXID-1)) { // Get characters till nul
|
||||||
|
c = (char) ((c << 1) + 1); // Characters are always odd!
|
||||||
|
diff --git a/hotspot/src/share/vm/adlc/main.cpp b/hotspot/src/share/vm/adlc/main.cpp
|
||||||
|
index 52044f12d..bcb385563 100644
|
||||||
|
--- a/hotspot/src/share/vm/adlc/main.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/adlc/main.cpp
|
||||||
|
@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
|
// Read command line arguments and file names
|
||||||
|
for( int i = 1; i < argc; i++ ) { // For all arguments
|
||||||
|
- register char *s = argv[i]; // Get option/filename
|
||||||
|
+ char *s = argv[i]; // Get option/filename
|
||||||
|
|
||||||
|
if( *s++ == '-' ) { // It's a flag? (not a filename)
|
||||||
|
if( !*s ) { // Stand-alone `-' means stdin
|
||||||
|
diff --git a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
|
||||||
|
index dd680a258..8ffe8f243 100644
|
||||||
|
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
|
||||||
|
@@ -508,13 +508,13 @@ BytecodeInterpreter::run(interpreterState istate) {
|
||||||
|
interpreterState orig = istate;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- register intptr_t* topOfStack = (intptr_t *)istate->stack(); /* access with STACK macros */
|
||||||
|
- register address pc = istate->bcp();
|
||||||
|
- register jubyte opcode;
|
||||||
|
- register intptr_t* locals = istate->locals();
|
||||||
|
- register ConstantPoolCache* cp = istate->constants(); // method()->constants()->cache()
|
||||||
|
+ intptr_t* topOfStack = (intptr_t *)istate->stack(); /* access with STACK macros */
|
||||||
|
+ address pc = istate->bcp();
|
||||||
|
+ jubyte opcode;
|
||||||
|
+ intptr_t* locals = istate->locals();
|
||||||
|
+ ConstantPoolCache* cp = istate->constants(); // method()->constants()->cache()
|
||||||
|
#ifdef LOTS_OF_REGS
|
||||||
|
- register JavaThread* THREAD = istate->thread();
|
||||||
|
+ JavaThread* THREAD = istate->thread();
|
||||||
|
#else
|
||||||
|
#undef THREAD
|
||||||
|
#define THREAD istate->thread()
|
||||||
|
@@ -603,7 +603,7 @@ BytecodeInterpreter::run(interpreterState istate) {
|
||||||
|
/* 0xF8 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default,
|
||||||
|
/* 0xFC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default
|
||||||
|
};
|
||||||
|
- register uintptr_t *dispatch_table = (uintptr_t*)&opclabels_data[0];
|
||||||
|
+ uintptr_t *dispatch_table = (uintptr_t*)&opclabels_data[0];
|
||||||
|
#endif /* USELABELS */
|
||||||
|
|
||||||
|
#ifdef ASSERT
|
||||||
|
diff --git a/hotspot/src/share/vm/libadt/dict.cpp b/hotspot/src/share/vm/libadt/dict.cpp
|
||||||
|
index 37559a097..8bef7d6ac 100644
|
||||||
|
--- a/hotspot/src/share/vm/libadt/dict.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/libadt/dict.cpp
|
||||||
|
@@ -319,9 +319,9 @@ void Dict::print() {
|
||||||
|
// limited to MAXID characters in length. Experimental evidence on 150K of
|
||||||
|
// C text shows excellent spreading of values for any size hash table.
|
||||||
|
int hashstr(const void *t) {
|
||||||
|
- register char c, k = 0;
|
||||||
|
- register int32 sum = 0;
|
||||||
|
- register const char *s = (const char *)t;
|
||||||
|
+ char c, k = 0;
|
||||||
|
+ int32 sum = 0;
|
||||||
|
+ const char *s = (const char *)t;
|
||||||
|
|
||||||
|
while( ((c = *s++) != '\0') && (k < MAXID-1) ) { // Get characters till null or MAXID-1
|
||||||
|
c = (c<<1)+1; // Characters are always odd!
|
||||||
|
diff --git a/hotspot/src/share/vm/libadt/set.cpp b/hotspot/src/share/vm/libadt/set.cpp
|
||||||
|
index 9fab2b64b..8b511d2e7 100644
|
||||||
|
--- a/hotspot/src/share/vm/libadt/set.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/libadt/set.cpp
|
||||||
|
@@ -73,7 +73,7 @@ char *Set::setstr() const
|
||||||
|
uint len = 128; // Total string space
|
||||||
|
char *buf = NEW_C_HEAP_ARRAY(char,len, mtCompiler);// Some initial string space
|
||||||
|
|
||||||
|
- register char *s = buf; // Current working string pointer
|
||||||
|
+ char *s = buf; // Current working string pointer
|
||||||
|
*s++ = '{';
|
||||||
|
*s = '\0';
|
||||||
|
|
||||||
|
@@ -125,8 +125,8 @@ void Set::print() const
|
||||||
|
// Set. Return the amount of text parsed in "len", or zero in "len".
|
||||||
|
int Set::parse(const char *s)
|
||||||
|
{
|
||||||
|
- register char c; // Parse character
|
||||||
|
- register const char *t = s; // Save the starting position of s.
|
||||||
|
+ char c; // Parse character
|
||||||
|
+ const char *t = s; // Save the starting position of s.
|
||||||
|
do c = *s++; // Skip characters
|
||||||
|
while( c && (c <= ' ') ); // Till no more whitespace or EOS
|
||||||
|
if( c != '{' ) return 0; // Oops, not a Set openner
|
||||||
|
diff --git a/hotspot/src/share/vm/libadt/vectset.cpp b/hotspot/src/share/vm/libadt/vectset.cpp
|
||||||
|
index ab80afef6..d4c403858 100644
|
||||||
|
--- a/hotspot/src/share/vm/libadt/vectset.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/libadt/vectset.cpp
|
||||||
|
@@ -105,8 +105,8 @@ void VectorSet::grow( uint newsize )
|
||||||
|
// Insert a member into an existing Set.
|
||||||
|
Set &VectorSet::operator <<= (uint elem)
|
||||||
|
{
|
||||||
|
- register uint word = elem >> 5; // Get the longword offset
|
||||||
|
- register uint32 mask = 1L << (elem & 31); // Get bit mask
|
||||||
|
+ uint word = elem >> 5; // Get the longword offset
|
||||||
|
+ uint32 mask = 1L << (elem & 31); // Get bit mask
|
||||||
|
|
||||||
|
if( word >= size ) // Need to grow set?
|
||||||
|
grow(elem+1); // Then grow it
|
||||||
|
@@ -118,10 +118,10 @@ Set &VectorSet::operator <<= (uint elem)
|
||||||
|
// Delete a member from an existing Set.
|
||||||
|
Set &VectorSet::operator >>= (uint elem)
|
||||||
|
{
|
||||||
|
- register uint word = elem >> 5; // Get the longword offset
|
||||||
|
+ uint word = elem >> 5; // Get the longword offset
|
||||||
|
if( word >= size ) // Beyond the last?
|
||||||
|
return *this; // Then it's clear & return clear
|
||||||
|
- register uint32 mask = 1L << (elem & 31); // Get bit mask
|
||||||
|
+ uint32 mask = 1L << (elem & 31); // Get bit mask
|
||||||
|
data[word] &= ~mask; // Clear bit
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
@@ -132,8 +132,8 @@ VectorSet &VectorSet::operator &= (const VectorSet &s)
|
||||||
|
{
|
||||||
|
// NOTE: The intersection is never any larger than the smallest set.
|
||||||
|
if( s.size < size ) size = s.size; // Get smaller size
|
||||||
|
- register uint32 *u1 = data; // Pointer to the destination data
|
||||||
|
- register uint32 *u2 = s.data; // Pointer to the source data
|
||||||
|
+ uint32 *u1 = data; // Pointer to the destination data
|
||||||
|
+ uint32 *u2 = s.data; // Pointer to the source data
|
||||||
|
for( uint i=0; i<size; i++) // For data in set
|
||||||
|
*u1++ &= *u2++; // Copy and AND longwords
|
||||||
|
return *this; // Return set
|
||||||
|
@@ -151,9 +151,9 @@ Set &VectorSet::operator &= (const Set &set)
|
||||||
|
VectorSet &VectorSet::operator |= (const VectorSet &s)
|
||||||
|
{
|
||||||
|
// This many words must be unioned
|
||||||
|
- register uint cnt = ((size<s.size)?size:s.size);
|
||||||
|
- register uint32 *u1 = data; // Pointer to the destination data
|
||||||
|
- register uint32 *u2 = s.data; // Pointer to the source data
|
||||||
|
+ uint cnt = ((size<s.size)?size:s.size);
|
||||||
|
+ uint32 *u1 = data; // Pointer to the destination data
|
||||||
|
+ uint32 *u2 = s.data; // Pointer to the source data
|
||||||
|
for( uint i=0; i<cnt; i++) // Copy and OR the two sets
|
||||||
|
*u1++ |= *u2++;
|
||||||
|
if( size < s.size ) { // Is set 2 larger than set 1?
|
||||||
|
@@ -176,9 +176,9 @@ Set &VectorSet::operator |= (const Set &set)
|
||||||
|
VectorSet &VectorSet::operator -= (const VectorSet &s)
|
||||||
|
{
|
||||||
|
// This many words must be unioned
|
||||||
|
- register uint cnt = ((size<s.size)?size:s.size);
|
||||||
|
- register uint32 *u1 = data; // Pointer to the destination data
|
||||||
|
- register uint32 *u2 = s.data; // Pointer to the source data
|
||||||
|
+ uint cnt = ((size<s.size)?size:s.size);
|
||||||
|
+ uint32 *u1 = data; // Pointer to the destination data
|
||||||
|
+ uint32 *u2 = s.data; // Pointer to the source data
|
||||||
|
for( uint i=0; i<cnt; i++ ) // For data in set
|
||||||
|
*u1++ &= ~(*u2++); // A <-- A & ~B with longwords
|
||||||
|
return *this; // Return new set
|
||||||
|
@@ -199,17 +199,17 @@ Set &VectorSet::operator -= (const Set &set)
|
||||||
|
// 1X -- B is a subset of A
|
||||||
|
int VectorSet::compare (const VectorSet &s) const
|
||||||
|
{
|
||||||
|
- register uint32 *u1 = data; // Pointer to the destination data
|
||||||
|
- register uint32 *u2 = s.data; // Pointer to the source data
|
||||||
|
- register uint32 AnotB = 0, BnotA = 0;
|
||||||
|
+ uint32 *u1 = data; // Pointer to the destination data
|
||||||
|
+ uint32 *u2 = s.data; // Pointer to the source data
|
||||||
|
+ uint32 AnotB = 0, BnotA = 0;
|
||||||
|
// This many words must be unioned
|
||||||
|
- register uint cnt = ((size<s.size)?size:s.size);
|
||||||
|
+ uint cnt = ((size<s.size)?size:s.size);
|
||||||
|
|
||||||
|
// Get bits for both sets
|
||||||
|
uint i; // Exit value of loop
|
||||||
|
for( i=0; i<cnt; i++ ) { // For data in BOTH sets
|
||||||
|
- register uint32 A = *u1++; // Data from one guy
|
||||||
|
- register uint32 B = *u2++; // Data from other guy
|
||||||
|
+ uint32 A = *u1++; // Data from one guy
|
||||||
|
+ uint32 B = *u2++; // Data from other guy
|
||||||
|
AnotB |= (A & ~B); // Compute bits in A not B
|
||||||
|
BnotA |= (B & ~A); // Compute bits in B not A
|
||||||
|
}
|
||||||
|
@@ -249,9 +249,9 @@ int VectorSet::disjoint(const Set &set) const
|
||||||
|
const VectorSet &s = *(set.asVectorSet());
|
||||||
|
|
||||||
|
// NOTE: The intersection is never any larger than the smallest set.
|
||||||
|
- register uint small_size = ((size<s.size)?size:s.size);
|
||||||
|
- register uint32 *u1 = data; // Pointer to the destination data
|
||||||
|
- register uint32 *u2 = s.data; // Pointer to the source data
|
||||||
|
+ uint small_size = ((size<s.size)?size:s.size);
|
||||||
|
+ uint32 *u1 = data; // Pointer to the destination data
|
||||||
|
+ uint32 *u2 = s.data; // Pointer to the source data
|
||||||
|
for( uint i=0; i<small_size; i++) // For data in set
|
||||||
|
if( *u1++ & *u2++ ) // If any elements in common
|
||||||
|
return 0; // Then not disjoint
|
||||||
|
@@ -290,10 +290,10 @@ int VectorSet::operator <= (const Set &set) const
|
||||||
|
// Test for membership. A Zero/Non-Zero value is returned!
|
||||||
|
int VectorSet::operator[](uint elem) const
|
||||||
|
{
|
||||||
|
- register uint word = elem >> 5; // Get the longword offset
|
||||||
|
+ uint word = elem >> 5; // Get the longword offset
|
||||||
|
if( word >= size ) // Beyond the last?
|
||||||
|
return 0; // Then it's clear
|
||||||
|
- register uint32 mask = 1L << (elem & 31); // Get bit mask
|
||||||
|
+ uint32 mask = 1L << (elem & 31); // Get bit mask
|
||||||
|
return ((data[word] & mask))!=0; // Return the sense of the bit
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/hotspot/src/share/vm/opto/mulnode.cpp b/hotspot/src/share/vm/opto/mulnode.cpp
|
||||||
|
index 9f2a134f1..5796af3a0 100644
|
||||||
|
--- a/hotspot/src/share/vm/opto/mulnode.cpp
|
||||||
|
+++ b/hotspot/src/share/vm/opto/mulnode.cpp
|
||||||
|
@@ -46,7 +46,7 @@ uint MulNode::hash() const {
|
||||||
|
//------------------------------Identity---------------------------------------
|
||||||
|
// Multiplying a one preserves the other argument
|
||||||
|
Node *MulNode::Identity( PhaseTransform *phase ) {
|
||||||
|
- register const Type *one = mul_id(); // The multiplicative identity
|
||||||
|
+ const Type *one = mul_id(); // The multiplicative identity
|
||||||
|
if( phase->type( in(1) )->higher_equal( one ) ) return in(2);
|
||||||
|
if( phase->type( in(2) )->higher_equal( one ) ) return in(1);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.12.3
|
||||||
|
|
||||||
@ -5,9 +5,9 @@ Subject: [PATCH 2/4] 8233280: Remove GCLockerInvokesConcurrent relative logic
|
|||||||
for G1
|
for G1
|
||||||
|
|
||||||
---
|
---
|
||||||
.../src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 4 ----
|
.../src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 1 ----
|
||||||
.../src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp | 5 ++---
|
.../src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp | 5 ++---
|
||||||
2 files changed, 2 insertions(+), 7 deletions(-)
|
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
|
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
|
||||||
index 4f45bba52..060531901 100644
|
index 4f45bba52..060531901 100644
|
||||||
@ -21,16 +21,6 @@ index 4f45bba52..060531901 100644
|
|||||||
case GCCause::_g1_humongous_allocation: return true;
|
case GCCause::_g1_humongous_allocation: return true;
|
||||||
case GCCause::_g1_periodic_collection: return true;
|
case GCCause::_g1_periodic_collection: return true;
|
||||||
default: return is_user_requested_concurrent_full_gc(cause);
|
default: return is_user_requested_concurrent_full_gc(cause);
|
||||||
@@ -2583,9 +2582,6 @@ void G1CollectedHeap::collect(GCCause::Cause cause) {
|
|
||||||
gclog_or_tty->print_cr("Periodic GC is denied and not try !");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
- if (GC_locker::is_active_and_needs_gc()) {
|
|
||||||
- GC_locker::stall_until_clear();
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (GC_locker::should_discard(cause, gc_count_before)) {
|
|
||||||
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
|
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
|
||||||
index d83e6cb65..3225967b3 100644
|
index d83e6cb65..3225967b3 100644
|
||||||
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
|
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
|
||||||
|
|||||||
448
8268819-SA-Remove-libthread_db-dependency-on-Linux.patch
Normal file
448
8268819-SA-Remove-libthread_db-dependency-on-Linux.patch
Normal file
@ -0,0 +1,448 @@
|
|||||||
|
From ed8ff7161f021b4a9cb5ec7c4c55c7b62a0ac389 Mon Sep 17 00:00:00 2001
|
||||||
|
From: d30023828 <douyiwang@huawei.com>
|
||||||
|
Date: Wed, 9 Feb 2022 18:32:05 +0800
|
||||||
|
Subject: [PATCH 3/8] 8268819: SA: Remove libthread_db dependency on Linux
|
||||||
|
|
||||||
|
DTS/AR: DTS2022020914784
|
||||||
|
Summary:hotspot:SA: Remove libthread_db dependency on Linux
|
||||||
|
LLT:NA
|
||||||
|
Patch Type:backport
|
||||||
|
Bug url:https://bugs.openjdk.java.net/browse/JDK-8268819
|
||||||
|
---
|
||||||
|
.../agent/src/os/linux/LinuxDebuggerLocal.c | 3 +-
|
||||||
|
hotspot/agent/src/os/linux/Makefile | 6 +-
|
||||||
|
hotspot/agent/src/os/linux/libproc.h | 35 +--------
|
||||||
|
hotspot/agent/src/os/linux/libproc_impl.c | 76 +------------------
|
||||||
|
hotspot/agent/src/os/linux/libproc_impl.h | 8 +-
|
||||||
|
hotspot/agent/src/os/linux/proc_service.h | 12 +--
|
||||||
|
hotspot/agent/src/os/linux/ps_core.c | 6 +-
|
||||||
|
hotspot/agent/src/os/linux/ps_proc.c | 35 +++++++--
|
||||||
|
.../debugger/linux/LinuxDebuggerLocal.java | 2 +-
|
||||||
|
hotspot/make/linux/makefiles/saproc.make | 2 +-
|
||||||
|
10 files changed, 46 insertions(+), 139 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c b/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
|
||||||
|
index d6a0c7d9a..a4c6f4057 100644
|
||||||
|
--- a/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
|
||||||
|
+++ b/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
+ * Copyright (c) 2002, 2019, 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
|
||||||
|
@@ -24,6 +24,7 @@
|
||||||
|
|
||||||
|
#include <jni.h>
|
||||||
|
#include "libproc.h"
|
||||||
|
+#include "proc_service.h"
|
||||||
|
|
||||||
|
#include <elf.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
diff --git a/hotspot/agent/src/os/linux/Makefile b/hotspot/agent/src/os/linux/Makefile
|
||||||
|
index c0b5c869c..957b4b555 100644
|
||||||
|
--- a/hotspot/agent/src/os/linux/Makefile
|
||||||
|
+++ b/hotspot/agent/src/os/linux/Makefile
|
||||||
|
@@ -38,8 +38,6 @@ INCLUDES = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux
|
||||||
|
|
||||||
|
OBJS = $(SOURCES:%.c=$(ARCH)/%.o) $(ARCH)/sadis.o
|
||||||
|
|
||||||
|
-LIBS = -lthread_db
|
||||||
|
-
|
||||||
|
CFLAGS = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) -I$(ARCH)
|
||||||
|
|
||||||
|
LIBSA = $(ARCH)/libsaproc.so
|
||||||
|
@@ -81,13 +79,13 @@ LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
|
||||||
|
LFLAGS_LIBSA += $(LDFLAGS_NO_EXEC_STACK)
|
||||||
|
|
||||||
|
$(LIBSA): $(ARCH) $(OBJS) mapfile
|
||||||
|
- $(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
|
||||||
|
+ $(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS)
|
||||||
|
|
||||||
|
test.o: test.c
|
||||||
|
$(GCC) -c -o test.o -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) test.c
|
||||||
|
|
||||||
|
test: test.o
|
||||||
|
- $(GCC) -o test test.o -L$(ARCH) -lsaproc $(LIBS)
|
||||||
|
+ $(GCC) -o test test.o -L$(ARCH) -lsaproc
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -fr $(ARCH)
|
||||||
|
diff --git a/hotspot/agent/src/os/linux/libproc.h b/hotspot/agent/src/os/linux/libproc.h
|
||||||
|
index 6b6e41cab..36e82d207 100644
|
||||||
|
--- a/hotspot/agent/src/os/linux/libproc.h
|
||||||
|
+++ b/hotspot/agent/src/os/linux/libproc.h
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
+ * Copyright (c) 2003, 2019, 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
|
||||||
|
@@ -28,49 +28,18 @@
|
||||||
|
#include <jni.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
-#include "proc_service.h"
|
||||||
|
|
||||||
|
#ifdef ALT_SASRCDIR
|
||||||
|
#include "libproc_md.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <sys/procfs.h>
|
||||||
|
#include <sys/ptrace.h>
|
||||||
|
|
||||||
|
#if defined(aarch64)
|
||||||
|
#include "asm/ptrace.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-/************************************************************************************
|
||||||
|
-
|
||||||
|
-0. This is very minimal subset of Solaris libproc just enough for current application.
|
||||||
|
-Please note that the bulk of the functionality is from proc_service interface. This
|
||||||
|
-adds Pgrab__ and some missing stuff. We hide the difference b/w live process and core
|
||||||
|
-file by this interface.
|
||||||
|
-
|
||||||
|
-1. pthread_id unique in both NPTL & LinuxThreads. We store this in
|
||||||
|
-OSThread::_pthread_id in JVM code.
|
||||||
|
-
|
||||||
|
-2. All threads see the same pid when they call getpid() under NPTL.
|
||||||
|
-Threads receive different pid under LinuxThreads. We used to save the result of
|
||||||
|
-::getpid() call in OSThread::_thread_id. This way uniqueness of OSThread::_thread_id
|
||||||
|
-was lost under NPTL. Now, we store the result of ::gettid() call in
|
||||||
|
-OSThread::_thread_id. Because gettid returns actual pid of thread (lwp id), this is
|
||||||
|
-unique again. We therefore use OSThread::_thread_id as unique identifier.
|
||||||
|
-
|
||||||
|
-3. There is a unique LWP id under both thread libraries. libthread_db maps pthread_id
|
||||||
|
-to its underlying lwp_id under both the thread libraries. thread_info.lwp_id stores
|
||||||
|
-lwp_id of the thread. The lwp id is nothing but the actual pid of clone'd processes. But
|
||||||
|
-unfortunately libthread_db does not work very well for core dumps. So, we get pthread_id
|
||||||
|
-only for processes. For core dumps, we don't use libthread_db at all (like gdb).
|
||||||
|
-
|
||||||
|
-4. ptrace operates on this LWP id under both the thread libraries. When we say 'pid' for
|
||||||
|
-ptrace call, we refer to lwp_id of the thread.
|
||||||
|
-
|
||||||
|
-5. for core file, we parse ELF files and read data from them. For processes we use
|
||||||
|
-combination of ptrace and /proc calls.
|
||||||
|
-
|
||||||
|
-*************************************************************************************/
|
||||||
|
-
|
||||||
|
|
||||||
|
#if defined(sparc) || defined(sparcv9) || defined(ppc64)
|
||||||
|
#include <asm/ptrace.h>
|
||||||
|
diff --git a/hotspot/agent/src/os/linux/libproc_impl.c b/hotspot/agent/src/os/linux/libproc_impl.c
|
||||||
|
index 73a15ce35..cf5bd030f 100644
|
||||||
|
--- a/hotspot/agent/src/os/linux/libproc_impl.c
|
||||||
|
+++ b/hotspot/agent/src/os/linux/libproc_impl.c
|
||||||
|
@@ -26,8 +26,9 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
-#include <thread_db.h>
|
||||||
|
+#include <sys/procfs.h>
|
||||||
|
#include "libproc_impl.h"
|
||||||
|
+#include "proc_service.h"
|
||||||
|
|
||||||
|
#define SA_ALTROOT "SA_ALTROOT"
|
||||||
|
|
||||||
|
@@ -105,13 +106,6 @@ bool is_debug() {
|
||||||
|
bool init_libproc(bool debug) {
|
||||||
|
// init debug mode
|
||||||
|
_libsaproc_debug = debug;
|
||||||
|
-
|
||||||
|
- // initialize the thread_db library
|
||||||
|
- if (td_init() != TD_OK) {
|
||||||
|
- print_debug("libthread_db's td_init failed\n");
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -243,7 +237,7 @@ const char* symbol_for_pc(struct ps_prochandle* ph, uintptr_t addr, uintptr_t* p
|
||||||
|
}
|
||||||
|
|
||||||
|
// add a thread to ps_prochandle
|
||||||
|
-thread_info* add_thread_info(struct ps_prochandle* ph, pthread_t pthread_id, lwpid_t lwp_id) {
|
||||||
|
+thread_info* add_thread_info(struct ps_prochandle* ph, lwpid_t lwp_id) {
|
||||||
|
thread_info* newthr;
|
||||||
|
if ( (newthr = (thread_info*) calloc(1, sizeof(thread_info))) == NULL) {
|
||||||
|
print_debug("can't allocate memory for thread_info\n");
|
||||||
|
@@ -251,7 +245,6 @@ thread_info* add_thread_info(struct ps_prochandle* ph, pthread_t pthread_id, lwp
|
||||||
|
}
|
||||||
|
|
||||||
|
// initialize thread info
|
||||||
|
- newthr->pthread_id = pthread_id;
|
||||||
|
newthr->lwp_id = lwp_id;
|
||||||
|
|
||||||
|
// add new thread to the list
|
||||||
|
@@ -282,64 +275,6 @@ void delete_thread_info(struct ps_prochandle* ph, thread_info* thr_to_be_removed
|
||||||
|
free(current_thr);
|
||||||
|
}
|
||||||
|
|
||||||
|
-// struct used for client data from thread_db callback
|
||||||
|
-struct thread_db_client_data {
|
||||||
|
- struct ps_prochandle* ph;
|
||||||
|
- thread_info_callback callback;
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
-// callback function for libthread_db
|
||||||
|
-static int thread_db_callback(const td_thrhandle_t *th_p, void *data) {
|
||||||
|
- struct thread_db_client_data* ptr = (struct thread_db_client_data*) data;
|
||||||
|
- td_thrinfo_t ti;
|
||||||
|
- td_err_e err;
|
||||||
|
-
|
||||||
|
- memset(&ti, 0, sizeof(ti));
|
||||||
|
- err = td_thr_get_info(th_p, &ti);
|
||||||
|
- if (err != TD_OK) {
|
||||||
|
- print_debug("libthread_db : td_thr_get_info failed, can't get thread info\n");
|
||||||
|
- return err;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- print_debug("thread_db : pthread %d (lwp %d)\n", ti.ti_tid, ti.ti_lid);
|
||||||
|
-
|
||||||
|
- if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE) {
|
||||||
|
- print_debug("Skipping pthread %d (lwp %d)\n", ti.ti_tid, ti.ti_lid);
|
||||||
|
- return TD_OK;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (ptr->callback(ptr->ph, ti.ti_tid, ti.ti_lid) != true)
|
||||||
|
- return TD_ERR;
|
||||||
|
-
|
||||||
|
- return TD_OK;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-// read thread_info using libthread_db
|
||||||
|
-bool read_thread_info(struct ps_prochandle* ph, thread_info_callback cb) {
|
||||||
|
- struct thread_db_client_data mydata;
|
||||||
|
- td_thragent_t* thread_agent = NULL;
|
||||||
|
- if (td_ta_new(ph, &thread_agent) != TD_OK) {
|
||||||
|
- print_debug("can't create libthread_db agent\n");
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- mydata.ph = ph;
|
||||||
|
- mydata.callback = cb;
|
||||||
|
-
|
||||||
|
- // we use libthread_db iterator to iterate thru list of threads.
|
||||||
|
- if (td_ta_thr_iter(thread_agent, thread_db_callback, &mydata,
|
||||||
|
- TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
|
||||||
|
- TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS) != TD_OK) {
|
||||||
|
- td_ta_delete(thread_agent);
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // delete thread agent
|
||||||
|
- td_ta_delete(thread_agent);
|
||||||
|
- return true;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-
|
||||||
|
// get number of threads
|
||||||
|
int get_num_threads(struct ps_prochandle* ph) {
|
||||||
|
return ph->num_threads;
|
||||||
|
@@ -463,8 +398,3 @@ ps_err_e ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset)
|
||||||
|
return PS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
-// new libthread_db of NPTL seem to require this symbol
|
||||||
|
-ps_err_e ps_get_thread_area() {
|
||||||
|
- print_debug("ps_get_thread_area not implemented\n");
|
||||||
|
- return PS_OK;
|
||||||
|
-}
|
||||||
|
diff --git a/hotspot/agent/src/os/linux/libproc_impl.h b/hotspot/agent/src/os/linux/libproc_impl.h
|
||||||
|
index 1d25a0922..8546bbf5a 100644
|
||||||
|
--- a/hotspot/agent/src/os/linux/libproc_impl.h
|
||||||
|
+++ b/hotspot/agent/src/os/linux/libproc_impl.h
|
||||||
|
@@ -46,7 +46,6 @@ typedef struct lib_info {
|
||||||
|
// list of threads
|
||||||
|
typedef struct thread_info {
|
||||||
|
lwpid_t lwp_id;
|
||||||
|
- pthread_t pthread_id; // not used cores, always -1
|
||||||
|
struct user_regs_struct regs; // not for process, core uses for caching regset
|
||||||
|
struct thread_info* next;
|
||||||
|
} thread_info;
|
||||||
|
@@ -108,11 +107,6 @@ void print_debug(const char* format,...);
|
||||||
|
void print_error(const char* format,...);
|
||||||
|
bool is_debug();
|
||||||
|
|
||||||
|
-typedef bool (*thread_info_callback)(struct ps_prochandle* ph, pthread_t pid, lwpid_t lwpid);
|
||||||
|
-
|
||||||
|
-// reads thread info using libthread_db and calls above callback for each thread
|
||||||
|
-bool read_thread_info(struct ps_prochandle* ph, thread_info_callback cb);
|
||||||
|
-
|
||||||
|
// deletes a thread from the thread list
|
||||||
|
void delete_thread_info(struct ps_prochandle* ph, thread_info* thr);
|
||||||
|
|
||||||
|
@@ -124,7 +118,7 @@ lib_info* add_lib_info_fd(struct ps_prochandle* ph, const char* libname, int fd,
|
||||||
|
uintptr_t base);
|
||||||
|
|
||||||
|
// adds a new thread to threads list, returns NULL on failure
|
||||||
|
-thread_info* add_thread_info(struct ps_prochandle* ph, pthread_t pthread_id, lwpid_t lwp_id);
|
||||||
|
+thread_info* add_thread_info(struct ps_prochandle* ph, lwpid_t lwp_id);
|
||||||
|
|
||||||
|
// a test for ELF signature without using libelf
|
||||||
|
bool is_elf_file(int fd);
|
||||||
|
diff --git a/hotspot/agent/src/os/linux/proc_service.h b/hotspot/agent/src/os/linux/proc_service.h
|
||||||
|
index 802e5b0bb..a8e0c2a5c 100644
|
||||||
|
--- a/hotspot/agent/src/os/linux/proc_service.h
|
||||||
|
+++ b/hotspot/agent/src/os/linux/proc_service.h
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
+ * Copyright (c) 2003,2019, 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
|
||||||
|
@@ -26,11 +26,10 @@
|
||||||
|
#define _PROC_SERVICE_H_
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
-#include <thread_db.h>
|
||||||
|
+#include <sys/procfs.h>
|
||||||
|
+
|
||||||
|
+#include "libproc.h"
|
||||||
|
|
||||||
|
-// Linux does not have the proc service library, though it does provide the
|
||||||
|
-// thread_db library which can be used to manipulate threads without having
|
||||||
|
-// to know the details of LinuxThreads or NPTL
|
||||||
|
|
||||||
|
// copied from Solaris "proc_service.h"
|
||||||
|
typedef enum {
|
||||||
|
@@ -70,7 +69,4 @@ ps_err_e ps_lgetfpregs(struct ps_prochandle *ph, lwpid_t lid, prfpregset_t *
|
||||||
|
|
||||||
|
ps_err_e ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset);
|
||||||
|
|
||||||
|
-// new libthread_db of NPTL seem to require this symbol
|
||||||
|
-ps_err_e ps_get_thread_area();
|
||||||
|
-
|
||||||
|
#endif /* _PROC_SERVICE_H_ */
|
||||||
|
diff --git a/hotspot/agent/src/os/linux/ps_core.c b/hotspot/agent/src/os/linux/ps_core.c
|
||||||
|
index b7fe4c095..6da43f195 100644
|
||||||
|
--- a/hotspot/agent/src/os/linux/ps_core.c
|
||||||
|
+++ b/hotspot/agent/src/os/linux/ps_core.c
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
+ * Copyright (c) 2003, 2019, 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
|
||||||
|
@@ -31,6 +31,7 @@
|
||||||
|
#include <elf.h>
|
||||||
|
#include <link.h>
|
||||||
|
#include "libproc_impl.h"
|
||||||
|
+#include "proc_service.h"
|
||||||
|
#include "salibelf.h"
|
||||||
|
|
||||||
|
// This file has the libproc implementation to read core files.
|
||||||
|
@@ -546,8 +547,7 @@ static bool core_handle_prstatus(struct ps_prochandle* ph, const char* buf, size
|
||||||
|
prstatus_t* prstat = (prstatus_t*) buf;
|
||||||
|
thread_info* newthr;
|
||||||
|
print_debug("got integer regset for lwp %d\n", prstat->pr_pid);
|
||||||
|
- // we set pthread_t to -1 for core dump
|
||||||
|
- if((newthr = add_thread_info(ph, (pthread_t) -1, prstat->pr_pid)) == NULL)
|
||||||
|
+ if((newthr = add_thread_info(ph, prstat->pr_pid)) == NULL)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// copy regs
|
||||||
|
diff --git a/hotspot/agent/src/os/linux/ps_proc.c b/hotspot/agent/src/os/linux/ps_proc.c
|
||||||
|
index c4d6a9ecc..748cc1397 100644
|
||||||
|
--- a/hotspot/agent/src/os/linux/ps_proc.c
|
||||||
|
+++ b/hotspot/agent/src/os/linux/ps_proc.c
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
+ * Copyright (c) 2003, 2019, 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
|
||||||
|
@@ -28,6 +28,7 @@
|
||||||
|
#include <signal.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <elf.h>
|
||||||
|
+#include <dirent.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
@@ -338,11 +339,6 @@ static char * fgets_no_cr(char * buf, int n, FILE *fp)
|
||||||
|
return rslt;
|
||||||
|
}
|
||||||
|
|
||||||
|
-// callback for read_thread_info
|
||||||
|
-static bool add_new_thread(struct ps_prochandle* ph, pthread_t pthread_id, lwpid_t lwp_id) {
|
||||||
|
- return add_thread_info(ph, pthread_id, lwp_id) != NULL;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static bool read_lib_info(struct ps_prochandle* ph) {
|
||||||
|
char fname[32];
|
||||||
|
char buf[PATH_MAX];
|
||||||
|
@@ -462,6 +458,7 @@ struct ps_prochandle* Pgrab(pid_t pid, char* err_buf, size_t err_buf_len) {
|
||||||
|
|
||||||
|
// initialize ps_prochandle
|
||||||
|
ph->pid = pid;
|
||||||
|
+ add_thread_info(ph, ph->pid);
|
||||||
|
|
||||||
|
// initialize vtable
|
||||||
|
ph->ops = &process_ops;
|
||||||
|
@@ -471,8 +468,30 @@ struct ps_prochandle* Pgrab(pid_t pid, char* err_buf, size_t err_buf_len) {
|
||||||
|
// the list of threads within the same process.
|
||||||
|
read_lib_info(ph);
|
||||||
|
|
||||||
|
- // read thread info
|
||||||
|
- read_thread_info(ph, add_new_thread);
|
||||||
|
+ /*
|
||||||
|
+ * Read thread info.
|
||||||
|
+ * SA scans all tasks in /proc/<PID>/task to read all threads info.
|
||||||
|
+ */
|
||||||
|
+ char taskpath[PATH_MAX];
|
||||||
|
+ DIR *dirp;
|
||||||
|
+ struct dirent *entry;
|
||||||
|
+
|
||||||
|
+ snprintf(taskpath, PATH_MAX, "/proc/%d/task", ph->pid);
|
||||||
|
+ dirp = opendir(taskpath);
|
||||||
|
+ int lwp_id;
|
||||||
|
+ while ((entry = readdir(dirp)) != NULL) {
|
||||||
|
+ if (*entry->d_name == '.') {
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ lwp_id = atoi(entry->d_name);
|
||||||
|
+ if (lwp_id == ph->pid) {
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ if (!process_doesnt_exist(lwp_id)) {
|
||||||
|
+ add_thread_info(ph, lwp_id);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ closedir(dirp);
|
||||||
|
|
||||||
|
// attach to the threads
|
||||||
|
thr = ph->threads;
|
||||||
|
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java
|
||||||
|
index f282a228d..7a28506b8 100644
|
||||||
|
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java
|
||||||
|
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
/*
|
||||||
|
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
+ * Copyright (c) 2002, 2019, 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
|
||||||
|
diff --git a/hotspot/make/linux/makefiles/saproc.make b/hotspot/make/linux/makefiles/saproc.make
|
||||||
|
index 258585366..d9b1f14f4 100644
|
||||||
|
--- a/hotspot/make/linux/makefiles/saproc.make
|
||||||
|
+++ b/hotspot/make/linux/makefiles/saproc.make
|
||||||
|
@@ -108,7 +108,7 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
|
||||||
|
$(SA_OPT_FLAGS) \
|
||||||
|
$(EXTRA_CFLAGS) \
|
||||||
|
-o $@ \
|
||||||
|
- -lthread_db -ldl
|
||||||
|
+ -ldl
|
||||||
|
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||||
|
ifneq ($(STRIP_POLICY),no_strip)
|
||||||
|
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
|
||||||
|
--
|
||||||
|
2.22.0
|
||||||
|
|
||||||
@ -1,121 +0,0 @@
|
|||||||
From d64c9b5f69fa307c1fdc44ce8e2a063e805400b8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: zhangyipeng <zhangyipeng7@huawei.com>
|
|
||||||
Date: Wed, 15 Dec 2021 18:26:13 +0800
|
|
||||||
Subject: [PATCH 2/2] Delete expired certificate
|
|
||||||
|
|
||||||
---
|
|
||||||
jdk/make/data/cacerts/globalsignr2ca | 29 -------------------
|
|
||||||
jdk/make/data/cacerts/identrustdstx3 | 27 -----------------
|
|
||||||
.../security/lib/cacerts/VerifyCACerts.java | 8 ++---
|
|
||||||
3 files changed, 2 insertions(+), 62 deletions(-)
|
|
||||||
delete mode 100644 jdk/make/data/cacerts/globalsignr2ca
|
|
||||||
delete mode 100644 jdk/make/data/cacerts/identrustdstx3
|
|
||||||
|
|
||||||
diff --git a/jdk/make/data/cacerts/globalsignr2ca b/jdk/make/data/cacerts/globalsignr2ca
|
|
||||||
deleted file mode 100644
|
|
||||||
index 746d1fab9..000000000
|
|
||||||
--- a/jdk/make/data/cacerts/globalsignr2ca
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,29 +0,0 @@
|
|
||||||
-Owner: CN=GlobalSign, O=GlobalSign, OU=GlobalSign Root CA - R2
|
|
||||||
-Issuer: CN=GlobalSign, O=GlobalSign, OU=GlobalSign Root CA - R2
|
|
||||||
-Serial number: 400000000010f8626e60d
|
|
||||||
-Valid from: Fri Dec 15 08:00:00 GMT 2006 until: Wed Dec 15 08:00:00 GMT 2021
|
|
||||||
-Signature algorithm name: SHA1withRSA
|
|
||||||
-Subject Public Key Algorithm: 2048-bit RSA key
|
|
||||||
-Version: 3
|
|
||||||
------BEGIN CERTIFICATE-----
|
|
||||||
-MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
|
|
||||||
-A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp
|
|
||||||
-Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1
|
|
||||||
-MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG
|
|
||||||
-A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
|
|
||||||
-hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL
|
|
||||||
-v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8
|
|
||||||
-eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq
|
|
||||||
-tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd
|
|
||||||
-C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa
|
|
||||||
-zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB
|
|
||||||
-mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH
|
|
||||||
-V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n
|
|
||||||
-bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG
|
|
||||||
-3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs
|
|
||||||
-J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO
|
|
||||||
-291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS
|
|
||||||
-ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd
|
|
||||||
-AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
|
|
||||||
-TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
|
|
||||||
------END CERTIFICATE-----
|
|
||||||
diff --git a/jdk/make/data/cacerts/identrustdstx3 b/jdk/make/data/cacerts/identrustdstx3
|
|
||||||
deleted file mode 100644
|
|
||||||
index 87a0d0c4f..000000000
|
|
||||||
--- a/jdk/make/data/cacerts/identrustdstx3
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,27 +0,0 @@
|
|
||||||
-Owner: CN=DST Root CA X3, O=Digital Signature Trust Co.
|
|
||||||
-Issuer: CN=DST Root CA X3, O=Digital Signature Trust Co.
|
|
||||||
-Serial number: 44afb080d6a327ba893039862ef8406b
|
|
||||||
-Valid from: Sat Sep 30 21:12:19 GMT 2000 until: Thu Sep 30 14:01:15 GMT 2021
|
|
||||||
-Signature algorithm name: SHA1withRSA
|
|
||||||
-Subject Public Key Algorithm: 2048-bit RSA key
|
|
||||||
-Version: 3
|
|
||||||
------BEGIN CERTIFICATE-----
|
|
||||||
-MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
|
|
||||||
-MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
|
|
||||||
-DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
|
|
||||||
-PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
|
|
||||||
-Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
|
|
||||||
-AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
|
|
||||||
-rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
|
|
||||||
-OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
|
|
||||||
-xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
|
|
||||||
-7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
|
|
||||||
-aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
|
|
||||||
-HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
|
|
||||||
-SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
|
|
||||||
-ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
|
|
||||||
-AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
|
|
||||||
-R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
|
|
||||||
-JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
|
|
||||||
-Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
|
|
||||||
------END CERTIFICATE-----
|
|
||||||
diff --git a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
|
|
||||||
index e4fc63ad7..f46355e8c 100644
|
|
||||||
--- a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
|
|
||||||
+++ b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
|
|
||||||
@@ -53,12 +53,12 @@ public class VerifyCACerts {
|
|
||||||
+ File.separator + "security" + File.separator + "cacerts";
|
|
||||||
|
|
||||||
// The numbers of certs now.
|
|
||||||
- private static final int COUNT = 86;
|
|
||||||
+ private static final int COUNT = 84;
|
|
||||||
|
|
||||||
// SHA-256 of cacerts, can be generated with
|
|
||||||
// shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95
|
|
||||||
private static final String CHECKSUM
|
|
||||||
- = "A5:00:71:02:B4:8B:AC:BE:64:34:0A:F2:DF:9D:F7:75:9D:05:84:7E:F6:EA:48:F0:64:36:29:8C:E7:A2:2D:63";
|
|
||||||
+ = "D3:05:21:64:FA:D7:CD:29:E8:CB:57:E7:47:ED:79:9B:47:D8:0E:75:2D:CA:83:BB:86:AF:D9:43:FD:3E:17:85";
|
|
||||||
|
|
||||||
// map of cert alias to SHA-256 fingerprint
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@@ -139,8 +139,6 @@ public class VerifyCACerts {
|
|
||||||
"49:E7:A4:42:AC:F0:EA:62:87:05:00:54:B5:25:64:B6:50:E4:F4:9E:42:E3:48:D6:AA:38:E0:39:E9:57:B1:C1");
|
|
||||||
put("dtrustclass3ca2ev [jdk]",
|
|
||||||
"EE:C5:49:6B:98:8C:E9:86:25:B9:34:09:2E:EC:29:08:BE:D0:B0:F3:16:C2:D4:73:0C:84:EA:F1:F3:D3:48:81");
|
|
||||||
- put("identrustdstx3 [jdk]",
|
|
||||||
- "06:87:26:03:31:A7:24:03:D9:09:F1:05:E6:9B:CF:0D:32:E1:BD:24:93:FF:C6:D9:20:6D:11:BC:D6:77:07:39");
|
|
||||||
put("identrustpublicca [jdk]",
|
|
||||||
"30:D0:89:5A:9A:44:8A:26:20:91:63:55:22:D1:F5:20:10:B5:86:7A:CA:E1:2C:78:EF:95:8F:D4:F4:38:9F:2F");
|
|
||||||
put("identrustcommercial [jdk]",
|
|
||||||
@@ -209,8 +207,6 @@ public class VerifyCACerts {
|
|
||||||
"17:9F:BC:14:8A:3D:D0:0F:D2:4E:A1:34:58:CC:43:BF:A7:F5:9C:81:82:D7:83:A5:13:F6:EB:EC:10:0C:89:24");
|
|
||||||
put("globalsigneccrootcar4 [jdk]",
|
|
||||||
"BE:C9:49:11:C2:95:56:76:DB:6C:0A:55:09:86:D7:6E:3B:A0:05:66:7C:44:2C:97:62:B4:FB:B7:73:DE:22:8C");
|
|
||||||
- put("globalsignr2ca [jdk]",
|
|
||||||
- "CA:42:DD:41:74:5F:D0:B8:1E:B9:02:36:2C:F9:D8:BF:71:9D:A1:BD:1B:1E:FC:94:6F:5B:4C:99:F4:2C:1B:9E");
|
|
||||||
put("teliasonerarootcav1 [jdk]",
|
|
||||||
"DD:69:36:FE:21:F8:F0:77:C1:23:A1:A5:21:C1:22:24:F7:22:55:B7:3E:03:A7:26:06:93:E8:A2:4B:0F:A3:89");
|
|
||||||
put("globalsignrootcar6 [jdk]",
|
|
||||||
--
|
|
||||||
2.22.0
|
|
||||||
|
|
||||||
63
add-environment-variable-ZIP_INVALID_LOC_HEADER_EXIT.patch
Executable file
63
add-environment-variable-ZIP_INVALID_LOC_HEADER_EXIT.patch
Executable file
@ -0,0 +1,63 @@
|
|||||||
|
diff --git a/jdk/src/share/native/java/util/zip/zip_util.c b/jdk/src/share/native/java/util/zip/zip_util.c
|
||||||
|
index 5fd6fea04..3dbd2ba62 100644
|
||||||
|
--- a/jdk/src/share/native/java/util/zip/zip_util.c
|
||||||
|
+++ b/jdk/src/share/native/java/util/zip/zip_util.c
|
||||||
|
@@ -78,6 +78,22 @@ static void freeCEN(jzfile *);
|
||||||
|
|
||||||
|
static jint INITIAL_META_COUNT = 2; /* initial number of entries in meta name array */
|
||||||
|
|
||||||
|
+#ifdef LINUX
|
||||||
|
+#define ZIP_INVALID_LOC_HEADER_EXIT "ZIP_INVALID_LOC_HEADER_EXIT"
|
||||||
|
+
|
||||||
|
+char *getExitFlag() {
|
||||||
|
+ static char *process_exit_flag = NULL;
|
||||||
|
+ static jboolean is_initialized = JNI_FALSE;
|
||||||
|
+ if (is_initialized) {
|
||||||
|
+ return process_exit_flag;
|
||||||
|
+ }
|
||||||
|
+ process_exit_flag = getenv(ZIP_INVALID_LOC_HEADER_EXIT);
|
||||||
|
+ is_initialized = JNI_TRUE;
|
||||||
|
+ return process_exit_flag;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* The ZFILE_* functions exist to provide some platform-independence with
|
||||||
|
* respect to file access needs.
|
||||||
|
@@ -1322,6 +1338,32 @@ ZIP_GetEntryDataOffset(jzfile *zip, jzentry *entry)
|
||||||
|
}
|
||||||
|
if (GETSIG(loc) != LOCSIG) {
|
||||||
|
zip->msg = "invalid LOC header (bad signature)";
|
||||||
|
+ printf("[LOC-ERROR] LOC check failed, %s\n", zip->msg);
|
||||||
|
+ printf("[LOC-ERROR] LOC check failed for jar: %s, class: %s, LOC: %08lx, pos:%ld\n",
|
||||||
|
+ zip->name, entry->name, GETSIG(loc), (-(entry->pos)));
|
||||||
|
+ unsigned int *temp = (unsigned int *) loc;
|
||||||
|
+ printf("[LOC-ERROR] LOC check failed, readVal: %08x %08x %08x %08x %08x %08x %08x %02x %02x\n",
|
||||||
|
+ *temp, *(temp + 1), *(temp + 2), *(temp + 3), *(temp + 4),
|
||||||
|
+ *(temp + 5), *(temp + 6), loc[28], loc[29]);
|
||||||
|
+
|
||||||
|
+#ifdef LINUX
|
||||||
|
+#define ZIP_INVALID_LOC_HEADER_EXIT_ONLY "1"
|
||||||
|
+#define ZIP_INVALID_LOC_HEADER_EXIT_CODE_DUMP "2"
|
||||||
|
+ /*
|
||||||
|
+ * The meaning of the exit flag is as follows:
|
||||||
|
+ * 1: exit (126)
|
||||||
|
+ * 2: core dump
|
||||||
|
+ * others: throws ZipException
|
||||||
|
+ */
|
||||||
|
+ char *exitFlag = getExitFlag();
|
||||||
|
+ if (exitFlag != NULL) {
|
||||||
|
+ if (strcmp(exitFlag, ZIP_INVALID_LOC_HEADER_EXIT_ONLY) == 0) {
|
||||||
|
+ exit(126);
|
||||||
|
+ } else if (strcmp(exitFlag, ZIP_INVALID_LOC_HEADER_EXIT_CODE_DUMP) == 0) {
|
||||||
|
+ abort();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
entry->pos = (- entry->pos) + LOCHDR + LOCNAM(loc) + LOCEXT(loc);
|
||||||
|
--
|
||||||
|
2.12.3
|
||||||
|
|
||||||
84
add-system-property-swing.JComboBox.useLegacyMode.patch
Executable file
84
add-system-property-swing.JComboBox.useLegacyMode.patch
Executable file
@ -0,0 +1,84 @@
|
|||||||
|
diff --git a/jdk/src/share/classes/javax/swing/JComboBox.java b/jdk/src/share/classes/javax/swing/JComboBox.java
|
||||||
|
index 27a0c055a..d62330063 100644
|
||||||
|
--- a/jdk/src/share/classes/javax/swing/JComboBox.java
|
||||||
|
+++ b/jdk/src/share/classes/javax/swing/JComboBox.java
|
||||||
|
@@ -24,9 +24,12 @@
|
||||||
|
*/
|
||||||
|
package javax.swing;
|
||||||
|
|
||||||
|
+import sun.security.action.GetPropertyAction;
|
||||||
|
+
|
||||||
|
import java.beans.PropertyChangeEvent;
|
||||||
|
import java.beans.PropertyChangeListener;
|
||||||
|
import java.beans.Transient;
|
||||||
|
+import java.security.AccessController;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
@@ -86,6 +89,16 @@ implements ItemSelectable,ListDataListener,ActionListener, Accessible {
|
||||||
|
*/
|
||||||
|
private static final String uiClassID = "ComboBoxUI";
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * Use legacy mode, rollback JDK-8072767 changes.
|
||||||
|
+ */
|
||||||
|
+ private static final boolean useLegacyMode;
|
||||||
|
+
|
||||||
|
+ static {
|
||||||
|
+ useLegacyMode = "true".equals(AccessController.doPrivileged(
|
||||||
|
+ new GetPropertyAction("swing.JComboBox.useLegacyMode", "true")));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* This protected field is implementation specific. Do not access directly
|
||||||
|
* or override. Use the accessor methods instead.
|
||||||
|
@@ -569,7 +582,9 @@ implements ItemSelectable,ListDataListener,ActionListener, Accessible {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- getEditor().setItem(anObject);
|
||||||
|
+ if (!useLegacyMode) {
|
||||||
|
+ getEditor().setItem(anObject);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Must toggle the state of this flag since this method
|
||||||
|
@@ -1309,12 +1324,16 @@ implements ItemSelectable,ListDataListener,ActionListener, Accessible {
|
||||||
|
* do not call or override.
|
||||||
|
*/
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
- setPopupVisible(false);
|
||||||
|
- getModel().setSelectedItem(getEditor().getItem());
|
||||||
|
- String oldCommand = getActionCommand();
|
||||||
|
- setActionCommand("comboBoxEdited");
|
||||||
|
- fireActionEvent();
|
||||||
|
- setActionCommand(oldCommand);
|
||||||
|
+ ComboBoxEditor editor = getEditor();
|
||||||
|
+ if ((!useLegacyMode) || ((editor != null) && (e != null) && (editor == e.getSource()
|
||||||
|
+ || editor.getEditorComponent() == e.getSource()))) {
|
||||||
|
+ setPopupVisible(false);
|
||||||
|
+ getModel().setSelectedItem(editor.getItem());
|
||||||
|
+ String oldCommand = getActionCommand();
|
||||||
|
+ setActionCommand("comboBoxEdited");
|
||||||
|
+ fireActionEvent();
|
||||||
|
+ setActionCommand(oldCommand);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
diff --git a/jdk/test/javax/swing/JComboBox/8072767/bug8072767.java b/jdk/test/javax/swing/JComboBox/8072767/bug8072767.java
|
||||||
|
index 826e4631d..3d3e42cac 100644
|
||||||
|
--- a/jdk/test/javax/swing/JComboBox/8072767/bug8072767.java
|
||||||
|
+++ b/jdk/test/javax/swing/JComboBox/8072767/bug8072767.java
|
||||||
|
@@ -41,7 +41,7 @@ import javax.swing.SwingUtilities;
|
||||||
|
* @author Alexander Scherbatiy
|
||||||
|
* @summary DefaultCellEditor for comboBox creates ActionEvent with wrong source
|
||||||
|
* object
|
||||||
|
- * @run main bug8072767
|
||||||
|
+ * @run main/othervm -Dswing.JComboBox.useLegacyMode=false bug8072767
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class bug8072767 {
|
||||||
|
--
|
||||||
|
2.22.0
|
||||||
|
|
||||||
16
debuginfo.diz-should-not-contain-the-path-after-unzip.patch
Executable file
16
debuginfo.diz-should-not-contain-the-path-after-unzip.patch
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
|
||||||
|
index 0e0346374..2d9bdbeed 100644
|
||||||
|
--- a/make/common/NativeCompilation.gmk
|
||||||
|
+++ b/make/common/NativeCompilation.gmk
|
||||||
|
@@ -537,7 +537,7 @@ define SetupNativeCompilation
|
||||||
|
# to be rebuilt properly.
|
||||||
|
$$($1_DEBUGINFO_ZIP): $$($1_DEBUGINFO_FILES) $$($1_TARGET)
|
||||||
|
$(CD) $$($1_OBJECT_DIR) \
|
||||||
|
- && $(ZIP) -q $$@ $$($1_DEBUGINFO_FILES)
|
||||||
|
+ && $(ZIP) -q $$@ $$(subst $$($1_OBJECT_DIR)/,,$$($1_DEBUGINFO_FILES))
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
ifneq ($$($1_STRIP_POLICY), no_strip)
|
||||||
|
--
|
||||||
|
2.22.0
|
||||||
|
|
||||||
@ -2,12 +2,14 @@ diff --git a/hotspot/make/linux/makefiles/adlc.make b/hotspot/make/linux/makefil
|
|||||||
index 92b8b9b3..a24f9184 100644
|
index 92b8b9b3..a24f9184 100644
|
||||||
--- a/hotspot/make/linux/makefiles/adlc.make
|
--- a/hotspot/make/linux/makefiles/adlc.make
|
||||||
+++ b/hotspot/make/linux/makefiles/adlc.make
|
+++ b/hotspot/make/linux/makefiles/adlc.make
|
||||||
@@ -64,6 +64,9 @@ CXXFLAGS = $(SYSDEFS) $(INCLUDES)
|
@@ -64,6 +64,11 @@ CXXFLAGS = $(SYSDEFS) $(INCLUDES)
|
||||||
# Force assertions on.
|
# Force assertions on.
|
||||||
CXXFLAGS += -DASSERT
|
CXXFLAGS += -DASSERT
|
||||||
|
|
||||||
+# Introduced in GCC 8.X
|
+# Introduced in GCC 8.X
|
||||||
+CXXFLAGS += -Wno-error=stringop-overflow=
|
+ifneq "$(shell expr \( $(CC_VER_MAJOR) \>= 8 \))" "0"
|
||||||
|
+ CXXFLAGS += -Wno-error=stringop-overflow=
|
||||||
|
+endif
|
||||||
+
|
+
|
||||||
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
|
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
|
||||||
# Compiler warnings are treated as errors
|
# Compiler warnings are treated as errors
|
||||||
|
|||||||
@ -314,7 +314,7 @@ index 5d30f2a01..b67f01719 100644
|
|||||||
ObjectStreamClass desc = new ObjectStreamClass();
|
ObjectStreamClass desc = new ObjectStreamClass();
|
||||||
desc.readNonProxy(this);
|
desc.readNonProxy(this);
|
||||||
return desc;
|
return desc;
|
||||||
@@ -1935,17 +2056,40 @@ public class ObjectInputStream
|
@@ -1996,41 +2090,64 @@ private ObjectStreamClass readNonProxyDesc(boolean unshared)
|
||||||
|
|
||||||
skipCustomData();
|
skipCustomData();
|
||||||
|
|
||||||
@ -322,6 +322,30 @@ index 5d30f2a01..b67f01719 100644
|
|||||||
- totalObjectRefs++;
|
- totalObjectRefs++;
|
||||||
- depth++;
|
- depth++;
|
||||||
- desc.initNonProxy(readDesc, cl, resolveEx, readClassDesc(false));
|
- desc.initNonProxy(readDesc, cl, resolveEx, readClassDesc(false));
|
||||||
|
-
|
||||||
|
- if (cl != null) {
|
||||||
|
- // Check that serial filtering has been done on the local class descriptor's superclass,
|
||||||
|
- // in case it does not appear in the stream.
|
||||||
|
-
|
||||||
|
- // Find the next super descriptor that has a local class descriptor.
|
||||||
|
- // Descriptors for which there is no local class are ignored.
|
||||||
|
- ObjectStreamClass superLocal = null;
|
||||||
|
- for (ObjectStreamClass sDesc = desc.getSuperDesc(); sDesc != null; sDesc = sDesc.getSuperDesc()) {
|
||||||
|
- if ((superLocal = sDesc.getLocalDesc()) != null) {
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // Scan local descriptor superclasses for a match with the local descriptor of the super found above.
|
||||||
|
- // For each super descriptor before the match, invoke the serial filter on the class.
|
||||||
|
- // The filter is invoked for each class that has not already been filtered
|
||||||
|
- // but would be filtered if the instance had been serialized by this Java runtime.
|
||||||
|
- for (ObjectStreamClass lDesc = desc.getLocalDesc().getSuperDesc();
|
||||||
|
- lDesc != null && lDesc != superLocal;
|
||||||
|
- lDesc = lDesc.getSuperDesc()) {
|
||||||
|
- filterCheck(lDesc.forClass(), -1);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
- } finally {
|
- } finally {
|
||||||
- depth--;
|
- depth--;
|
||||||
+ totalObjectRefs++;
|
+ totalObjectRefs++;
|
||||||
@ -344,6 +368,30 @@ index 5d30f2a01..b67f01719 100644
|
|||||||
+ } else {
|
+ } else {
|
||||||
+ try {
|
+ try {
|
||||||
+ desc.initNonProxy(readDesc, cl, resolveEx, readClassDesc(false));
|
+ desc.initNonProxy(readDesc, cl, resolveEx, readClassDesc(false));
|
||||||
|
+
|
||||||
|
+ if (cl != null) {
|
||||||
|
+ // Check that serial filtering has been done on the local class descriptor's superclass,
|
||||||
|
+ // in case it does not appear in the stream.
|
||||||
|
+
|
||||||
|
+ // Find the next super descriptor that has a local class descriptor.
|
||||||
|
+ // Descriptors for which there is no local class are ignored.
|
||||||
|
+ ObjectStreamClass superLocal = null;
|
||||||
|
+ for (ObjectStreamClass sDesc = desc.getSuperDesc(); sDesc != null; sDesc = sDesc.getSuperDesc()) {
|
||||||
|
+ if ((superLocal = sDesc.getLocalDesc()) != null) {
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // Scan local descriptor superclasses for a match with the local descriptor of the super found above.
|
||||||
|
+ // For each super descriptor before the match, invoke the serial filter on the class.
|
||||||
|
+ // The filter is invoked for each class that has not already been filtered
|
||||||
|
+ // but would be filtered if the instance had been serialized by this Java runtime.
|
||||||
|
+ for (ObjectStreamClass lDesc = desc.getLocalDesc().getSuperDesc();
|
||||||
|
+ lDesc != null && lDesc != superLocal;
|
||||||
|
+ lDesc = lDesc.getSuperDesc()) {
|
||||||
|
+ filterCheck(lDesc.forClass(), -1);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
+ } finally {
|
+ } finally {
|
||||||
+ depth--;
|
+ depth--;
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
16
fix-TestUseCompressedOopsErgo-run-failed.patch
Executable file
16
fix-TestUseCompressedOopsErgo-run-failed.patch
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java
|
||||||
|
index 65231abe7..9e1f0cb70 100644
|
||||||
|
--- a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java
|
||||||
|
+++ b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java
|
||||||
|
@@ -109,6 +109,8 @@ public class WhiteBox {
|
||||||
|
public native long g1NumMaxRegions();
|
||||||
|
public native long g1NumFreeRegions();
|
||||||
|
public native int g1RegionSize();
|
||||||
|
+ public native int g1ActiveMemoryNodeCount();
|
||||||
|
+ public native int[] g1MemoryNodeIds();
|
||||||
|
public native MemoryUsage g1AuxiliaryMemoryUsage();
|
||||||
|
public native Object[] parseCommandLine(String commandline, DiagnosticCommand[] args);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.22.0
|
||||||
|
|
||||||
51
fix-testme-Test6929067-run-faild.patch
Executable file
51
fix-testme-Test6929067-run-faild.patch
Executable file
@ -0,0 +1,51 @@
|
|||||||
|
diff --git a/hotspot/test/runtime/6929067/Test6929067.sh b/hotspot/test/runtime/6929067/Test6929067.sh
|
||||||
|
index 90b96d5e9..438a287c8 100644
|
||||||
|
--- a/hotspot/test/runtime/6929067/Test6929067.sh
|
||||||
|
+++ b/hotspot/test/runtime/6929067/Test6929067.sh
|
||||||
|
@@ -101,6 +101,10 @@ case "$ARCH" in
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
+if [ "${VM_CPU}" == "aarch64" ]; then
|
||||||
|
+ COMP_FLAG="-mabi=lp64"
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
# VM type: need to know server or client
|
||||||
|
VMTYPE=client
|
||||||
|
grep Server vm_version.out > ${NULL}
|
||||||
|
@@ -128,7 +132,7 @@ echo "VM type: ${VMTYPE}"
|
||||||
|
$gcc_cmd -DLINUX ${COMP_FLAG} -o invoke \
|
||||||
|
-I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
|
||||||
|
-L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \
|
||||||
|
- -ljvm -lpthread invoke.c
|
||||||
|
+ invoke.c -ljvm -lpthread
|
||||||
|
|
||||||
|
./invoke
|
||||||
|
exit $?
|
||||||
|
diff --git a/hotspot/test/runtime/InitialThreadOverflow/testme.sh b/hotspot/test/runtime/InitialThreadOverflow/testme.sh
|
||||||
|
index ee8d35ede..ffd7d6e3d 100644
|
||||||
|
--- a/hotspot/test/runtime/InitialThreadOverflow/testme.sh
|
||||||
|
+++ b/hotspot/test/runtime/InitialThreadOverflow/testme.sh
|
||||||
|
@@ -51,6 +51,10 @@ fi
|
||||||
|
|
||||||
|
CFLAGS="-m${VM_BITS}"
|
||||||
|
|
||||||
|
+if [ "${VM_CPU}" == "aarch64" ]; then
|
||||||
|
+ CFLAGS="-mabi=lp64"
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
LD_LIBRARY_PATH=.:${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH
|
||||||
|
export LD_LIBRARY_PATH
|
||||||
|
|
||||||
|
@@ -67,7 +71,7 @@ echo "Compilation flag: ${COMP_FLAG}"
|
||||||
|
$gcc_cmd -DLINUX ${CFLAGS} -o invoke \
|
||||||
|
-I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
|
||||||
|
-L${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE} \
|
||||||
|
- -ljvm -lpthread invoke.cxx
|
||||||
|
+ invoke.cxx -ljvm -lpthread
|
||||||
|
|
||||||
|
./invoke
|
||||||
|
exit $?
|
||||||
|
--
|
||||||
|
2.22.0
|
||||||
|
|
||||||
@ -1,9 +1,3 @@
|
|||||||
commit 9856171f660f6edb240bb4e7e95a87b60f4d2bc3
|
|
||||||
Author: hubodao <hubodao@huawei.com>
|
|
||||||
Date: Tue Jun 8 08:07:38 2021 +0000
|
|
||||||
|
|
||||||
blas instrinsic
|
|
||||||
|
|
||||||
diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp
|
diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp
|
||||||
index 7080ea10d..62a8ab7bd 100644
|
index 7080ea10d..62a8ab7bd 100644
|
||||||
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp
|
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp
|
||||||
@ -270,10 +264,55 @@ diff --git a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp b/hotspot/src/
|
|||||||
index c5ec637a1..125983179 100644
|
index c5ec637a1..125983179 100644
|
||||||
--- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
|
--- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
|
||||||
+++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
|
+++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
|
||||||
@@ -3204,6 +3204,218 @@ class StubGenerator: public StubCodeGenerator {
|
@@ -3221,6 +3221,44 @@ class StubGenerator: public StubCodeGenerator {
|
||||||
return start;
|
return start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ address load_BLAS_library() {
|
||||||
|
+ // Try to load BLAS library.
|
||||||
|
+ const char library_name[] = "openblas";
|
||||||
|
+ char err_buf[1024] = {0};
|
||||||
|
+ char path[JVM_MAXPATHLEN] = {0};
|
||||||
|
+ os::jvm_path(path, sizeof(path));
|
||||||
|
+ int jvm_offset = -1;
|
||||||
|
+
|
||||||
|
+ // Match "jvm[^/]*" in jvm_path.
|
||||||
|
+ const char* last_name = strrchr(path, '/');
|
||||||
|
+ last_name = last_name ? last_name : path;
|
||||||
|
+ const char* last_lib_name = strstr(last_name, "jvm");
|
||||||
|
+ if (last_lib_name != NULL) {
|
||||||
|
+ jvm_offset = last_lib_name - path;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ address library = NULL;
|
||||||
|
+ // Find the BLAS shared library.
|
||||||
|
+ // Search path: <home>/jre/lib/<arch>/<vm>/libopenblas.so
|
||||||
|
+ if (jvm_offset >= 0) {
|
||||||
|
+ if (jvm_offset + strlen(library_name) + strlen(os::dll_file_extension()) < JVM_MAXPATHLEN) {
|
||||||
|
+ strncpy(&path[jvm_offset], library_name, strlen(library_name));
|
||||||
|
+ strncat(&path[jvm_offset], os::dll_file_extension(), strlen(os::dll_file_extension()));
|
||||||
|
+ library = (address)os::dll_load(path, err_buf, sizeof(err_buf));
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return library;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ address get_BLAS_func_entry(address library, const char* func_name) {
|
||||||
|
+ if (library == NULL) {
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // Try to find BLAS function entry.
|
||||||
|
+ return (address)os::dll_lookup((void*)library, func_name);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Arguments:
|
||||||
|
*
|
||||||
|
@@ -3254,6 +3292,218 @@ class StubGenerator: public StubCodeGenerator {
|
||||||
|
return start;
|
||||||
|
}
|
||||||
|
|
||||||
+ // Parameter conversion from JVM to native BLAS
|
+ // Parameter conversion from JVM to native BLAS
|
||||||
+ //
|
+ //
|
||||||
+ // Register:
|
+ // Register:
|
||||||
@ -485,51 +524,6 @@ index c5ec637a1..125983179 100644
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
+
|
|
||||||
/**
|
|
||||||
* Arguments:
|
|
||||||
*
|
|
||||||
@@ -3221,6 +3221,44 @@ class StubGenerator: public StubCodeGenerator {
|
|
||||||
return start;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ address load_BLAS_library() {
|
|
||||||
+ // Try to load BLAS library.
|
|
||||||
+ const char library_name[] = "openblas";
|
|
||||||
+ char err_buf[1024] = {0};
|
|
||||||
+ char path[JVM_MAXPATHLEN] = {0};
|
|
||||||
+ os::jvm_path(path, sizeof(path));
|
|
||||||
+ int jvm_offset = -1;
|
|
||||||
+
|
|
||||||
+ // Match "jvm[^/]*" in jvm_path.
|
|
||||||
+ const char* last_name = strrchr(path, '/');
|
|
||||||
+ last_name = last_name ? last_name : path;
|
|
||||||
+ const char* last_lib_name = strstr(last_name, "jvm");
|
|
||||||
+ if (last_lib_name != NULL) {
|
|
||||||
+ jvm_offset = last_lib_name - path;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ address library = NULL;
|
|
||||||
+ // Find the BLAS shared library.
|
|
||||||
+ // Search path: <home>/jre/lib/<arch>/<vm>/libopenblas.so
|
|
||||||
+ if (jvm_offset >= 0) {
|
|
||||||
+ if (jvm_offset + strlen(library_name) + strlen(os::dll_file_extension()) < JVM_MAXPATHLEN) {
|
|
||||||
+ strncpy(&path[jvm_offset], library_name, strlen(library_name));
|
|
||||||
+ strncat(&path[jvm_offset], os::dll_file_extension(), strlen(os::dll_file_extension()));
|
|
||||||
+ library = (address)os::dll_load(path, err_buf, sizeof(err_buf));
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return library;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ address get_BLAS_func_entry(address library, const char* func_name) {
|
|
||||||
+ if (library == NULL) {
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // Try to find BLAS function entry.
|
|
||||||
+ return (address)os::dll_lookup((void*)library, func_name);
|
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
/**
|
/**
|
||||||
* Arguments:
|
* Arguments:
|
||||||
@ -1313,11 +1307,10 @@ index 5cbc0f012..10eeea217 100644
|
|||||||
default:
|
default:
|
||||||
// If you get here, it may be that someone has added a new intrinsic
|
// If you get here, it may be that someone has added a new intrinsic
|
||||||
// to the list in vmSymbols.hpp without implementing it here.
|
// to the list in vmSymbols.hpp without implementing it here.
|
||||||
@@ -6353,6 +6361,144 @@ bool LibraryCallKit::inline_ddotF2jBLAS() {
|
@@ -6354,6 +6362,144 @@ bool LibraryCallKit::inline_ddotF2jBLAS() {
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+/**
|
/**
|
||||||
+ * double org.netlib.blas.Dgemm.dgemm(java.lang.String transa,
|
+ * double org.netlib.blas.Dgemm.dgemm(java.lang.String transa,
|
||||||
+ * java.lang.String transb, int m, int n, int k,
|
+ * java.lang.String transb, int m, int n, int k,
|
||||||
+ * double alpha, double[] a, int offset_a, int lda,
|
+ * double alpha, double[] a, int offset_a, int lda,
|
||||||
@ -1455,9 +1448,10 @@ index 5cbc0f012..10eeea217 100644
|
|||||||
+ return true;
|
+ return true;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
/**
|
+/**
|
||||||
* Calculate CRC32 for ByteBuffer.
|
* Calculate CRC32 for ByteBuffer.
|
||||||
* int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len)
|
* int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len)
|
||||||
|
*/
|
||||||
diff --git a/hotspot/src/share/vm/opto/runtime.cpp b/hotspot/src/share/vm/opto/runtime.cpp
|
diff --git a/hotspot/src/share/vm/opto/runtime.cpp b/hotspot/src/share/vm/opto/runtime.cpp
|
||||||
index f1fe4d666..dc8f0c774 100644
|
index f1fe4d666..dc8f0c774 100644
|
||||||
--- a/hotspot/src/share/vm/opto/runtime.cpp
|
--- a/hotspot/src/share/vm/opto/runtime.cpp
|
||||||
@ -1627,3 +1621,6 @@ index a4eeb910d..16075d9f4 100644
|
|||||||
|
|
||||||
static address multiplyToLen() {return _multiplyToLen; }
|
static address multiplyToLen() {return _multiplyToLen; }
|
||||||
static address squareToLen() {return _squareToLen; }
|
static address squareToLen() {return _squareToLen; }
|
||||||
|
--
|
||||||
|
2.12.3
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
diff --git a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp
|
|
||||||
index cec35b7..8eb031e 100644
|
|
||||||
--- a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp
|
|
||||||
+++ b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp
|
|
||||||
@@ -53,7 +53,7 @@ define_pd_global(intx, BackEdgeThreshold, 100000);
|
|
||||||
define_pd_global(intx, OnStackReplacePercentage, 140);
|
|
||||||
define_pd_global(intx, ConditionalMoveLimit, 3);
|
|
||||||
define_pd_global(intx, FLOATPRESSURE, 64);
|
|
||||||
-define_pd_global(intx, FreqInlineSize, 325);
|
|
||||||
+define_pd_global(intx, FreqInlineSize, 768);
|
|
||||||
define_pd_global(intx, MinJumpTableSize, 10);
|
|
||||||
define_pd_global(intx, INTPRESSURE, 25);
|
|
||||||
define_pd_global(intx, InteriorEntryAlignment, 16);
|
|
||||||
Binary file not shown.
@ -146,13 +146,13 @@
|
|||||||
%global origin_nice OpenJDK
|
%global origin_nice OpenJDK
|
||||||
%global top_level_dir_name %{origin}
|
%global top_level_dir_name %{origin}
|
||||||
%global repo jdk8u
|
%global repo jdk8u
|
||||||
%global revision jdk8u312-b07
|
%global revision jdk8u322-b06
|
||||||
%global full_revision %{repo}-%{revision}
|
%global full_revision %{repo}-%{revision}
|
||||||
# Define IcedTea version used for SystemTap tapsets and desktop files
|
# Define IcedTea version used for SystemTap tapsets and desktop files
|
||||||
%global icedteaver 3.15.0
|
%global icedteaver 3.15.0
|
||||||
|
|
||||||
%global updatever 312
|
%global updatever 322
|
||||||
%global buildver b07
|
%global buildver b06
|
||||||
# priority must be 7 digits in total. The expression is workarounding tip
|
# priority must be 7 digits in total. The expression is workarounding tip
|
||||||
%global priority 1800%{updatever}
|
%global priority 1800%{updatever}
|
||||||
|
|
||||||
@ -916,7 +916,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
|
|||||||
|
|
||||||
Name: java-%{javaver}-%{origin}
|
Name: java-%{javaver}-%{origin}
|
||||||
Version: %{javaver}.%{updatever}.%{buildver}
|
Version: %{javaver}.%{updatever}.%{buildver}
|
||||||
Release: 11
|
Release: 4
|
||||||
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
|
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
|
||||||
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
|
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
|
||||||
# also included the epoch in their virtual provides. This created a
|
# also included the epoch in their virtual provides. This created a
|
||||||
@ -995,7 +995,6 @@ Patch63: 8033552.patch
|
|||||||
Patch67: 8165860.patch
|
Patch67: 8165860.patch
|
||||||
Patch68: 8194154.patch
|
Patch68: 8194154.patch
|
||||||
Patch70: 8164948.patch
|
Patch70: 8164948.patch
|
||||||
Patch72: inline-optimize-for-aarch64.patch
|
|
||||||
|
|
||||||
# 8u242
|
# 8u242
|
||||||
Patch75: Add-ability-to-configure-third-port-for-remote-JMX.patch
|
Patch75: Add-ability-to-configure-third-port-for-remote-JMX.patch
|
||||||
@ -1083,7 +1082,6 @@ Patch183: revert-windows-bugfix.patch
|
|||||||
Patch184: set-vm.vendor-by-configure.patch
|
Patch184: set-vm.vendor-by-configure.patch
|
||||||
Patch185: update-cacerts-and-VerifyCACerts.java-test.patch
|
Patch185: update-cacerts-and-VerifyCACerts.java-test.patch
|
||||||
Patch186: update-to-keep-same-with-master.patch
|
Patch186: update-to-keep-same-with-master.patch
|
||||||
Patch187: 8182036.patch
|
|
||||||
Patch188: 8247691_incorrect_handling_of_VM_exceptions_in_C1_deopt_stub.patch
|
Patch188: 8247691_incorrect_handling_of_VM_exceptions_in_C1_deopt_stub.patch
|
||||||
Patch189: 8266187_Memory_leak_in_appendBootClassPath.patch
|
Patch189: 8266187_Memory_leak_in_appendBootClassPath.patch
|
||||||
Patch192: add_kae_implementation_add_default_conf_file.patch
|
Patch192: add_kae_implementation_add_default_conf_file.patch
|
||||||
@ -1117,17 +1115,26 @@ Patch219: G1Uncommit-Introduce-G1PeriodGCNotRetry-control-whet.patch
|
|||||||
Patch220: JDK-debug-version-crash-when-using-AppCDS.patch
|
Patch220: JDK-debug-version-crash-when-using-AppCDS.patch
|
||||||
|
|
||||||
# 8u312
|
# 8u312
|
||||||
Patch221: 8183543-Aarch64-C2-compilation-often-fails-with-fail--last.patch
|
|
||||||
Patch222: 8273111-Default-timezone-should-return-zone-ID-if-locatiome-is-valid-but-not-canonicalization-on-linux.patch
|
Patch222: 8273111-Default-timezone-should-return-zone-ID-if-locatiome-is-valid-but-not-canonicalization-on-linux.patch
|
||||||
Patch223: 8233280-Remove-GCLockerInvokesConcurrent-relative-logic-for-G1.patch
|
Patch223: 8233280-Remove-GCLockerInvokesConcurrent-relative-logic-for-G1.patch
|
||||||
Patch224: G1Ucommit-Refactor-Trigger-mechanism.patch
|
Patch224: G1Ucommit-Refactor-Trigger-mechanism.patch
|
||||||
Patch225: G1-Full-GC-parallel-mark.patch
|
Patch225: G1-Full-GC-parallel-mark.patch
|
||||||
Patch226: G1Uncommit-add-G1UncommitLog-limit-before-G1Uncommit.patch
|
Patch226: G1Uncommit-add-G1UncommitLog-limit-before-G1Uncommit.patch
|
||||||
Patch227: Delete-expired-certificate-globalsignr2ca.patch
|
|
||||||
Patch228: add-wrap_memcpy-to-libsaproc.patch
|
Patch228: add-wrap_memcpy-to-libsaproc.patch
|
||||||
Patch229: downgrade-the-symver-of-fcntl64.patch
|
Patch229: downgrade-the-symver-of-fcntl64.patch
|
||||||
|
|
||||||
# 8u322
|
# 8u322
|
||||||
|
Patch230: add-system-property-swing.JComboBox.useLegacyMode.patch
|
||||||
|
Patch231: debuginfo.diz-should-not-contain-the-path-after-unzip.patch
|
||||||
|
Patch232: 8173361-various-crashes-in-JvmtiExport-post_compiled.patch
|
||||||
|
Patch233: fix-TestUseCompressedOopsErgo-run-failed.patch
|
||||||
|
Patch235: fix-testme-Test6929067-run-faild.patch
|
||||||
|
Patch236: penetration_testing_vulnerability_fix.patch
|
||||||
|
Patch237: 8136577_Make_AbortVMOnException_available_in_product_builds.patch
|
||||||
|
Patch238: add-environment-variable-ZIP_INVALID_LOC_HEADER_EXIT.patch
|
||||||
|
Patch239: print-fd-and-file-path-when-a-zip-invalid-loc-header.patch
|
||||||
|
Patch240: 8207011-Remove-uses-of-the-register-storage-class-specifier.patch
|
||||||
|
Patch241: 8268819-SA-Remove-libthread_db-dependency-on-Linux.patch
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
#
|
#
|
||||||
@ -1488,7 +1495,6 @@ pushd %{top_level_dir_name}
|
|||||||
%patch67 -p1
|
%patch67 -p1
|
||||||
%patch68 -p1
|
%patch68 -p1
|
||||||
%patch70 -p1
|
%patch70 -p1
|
||||||
%patch72 -p1
|
|
||||||
%patch75 -p1
|
%patch75 -p1
|
||||||
%patch83 -p1
|
%patch83 -p1
|
||||||
%patch85 -p1
|
%patch85 -p1
|
||||||
@ -1562,7 +1568,6 @@ pushd %{top_level_dir_name}
|
|||||||
%patch184 -p1
|
%patch184 -p1
|
||||||
%patch185 -p1
|
%patch185 -p1
|
||||||
%patch186 -p1
|
%patch186 -p1
|
||||||
%patch187 -p1
|
|
||||||
%patch188 -p1
|
%patch188 -p1
|
||||||
%patch189 -p1
|
%patch189 -p1
|
||||||
%patch192 -p1
|
%patch192 -p1
|
||||||
@ -1591,15 +1596,24 @@ pushd %{top_level_dir_name}
|
|||||||
%patch218 -p1
|
%patch218 -p1
|
||||||
%patch219 -p1
|
%patch219 -p1
|
||||||
%patch220 -p1
|
%patch220 -p1
|
||||||
%patch221 -p1
|
|
||||||
%patch222 -p1
|
%patch222 -p1
|
||||||
%patch223 -p1
|
%patch223 -p1
|
||||||
%patch224 -p1
|
%patch224 -p1
|
||||||
%patch225 -p1
|
%patch225 -p1
|
||||||
%patch226 -p1
|
%patch226 -p1
|
||||||
%patch227 -p1
|
|
||||||
%patch228 -p1
|
%patch228 -p1
|
||||||
%patch229 -p1
|
%patch229 -p1
|
||||||
|
%patch230 -p1
|
||||||
|
%patch231 -p1
|
||||||
|
%patch232 -p1
|
||||||
|
%patch233 -p1
|
||||||
|
%patch235 -p1
|
||||||
|
%patch236 -p1
|
||||||
|
%patch237 -p1
|
||||||
|
%patch238 -p1
|
||||||
|
%patch239 -p1
|
||||||
|
%patch240 -p1
|
||||||
|
%patch241 -p1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# System library fixes
|
# System library fixes
|
||||||
@ -2224,6 +2238,37 @@ cjc.mainProgram(arg)
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 2 2022 kuenking111 <wangkun49@huawei.com> - 1:1.8.0.322-b06.4
|
||||||
|
- add 8268819-SA-Remove-libthread_db-dependency-on-Linux.patch
|
||||||
|
|
||||||
|
* Thu Mar 1 2022 kuenking111 <wangkun49@huawei.com> - 1:1.8.0.322-b06.3
|
||||||
|
- modified 8233280-Remove-GCLockerInvokesConcurrent-relative-logic-for-G1.patch
|
||||||
|
|
||||||
|
* Wed Feb 16 2022 kuenking111 <wangkun49@huawei.com> - 1:1.8.0.322-b06.2
|
||||||
|
- add add-system-property-swing.JComboBox.useLegacyMode.patch
|
||||||
|
- add debuginfo.diz-should-not-contain-the-path-after-unzip.patch
|
||||||
|
- add 8173361-various-crashes-in-JvmtiExport-post_compiled.patch
|
||||||
|
- add fix-TestUseCompressedOopsErgo-run-failed.patch
|
||||||
|
- add fix-testme-Test6929067-run-faild.patch
|
||||||
|
- add penetration_testing_vulnerability_fix.patch
|
||||||
|
- add 8136577_Make_AbortVMOnException_available_in_product_builds.patch
|
||||||
|
- add add-environment-variable-ZIP_INVALID_LOC_HEADER_EXIT.patch
|
||||||
|
- add print-fd-and-file-path-when-a-zip-invalid-loc-header.patch
|
||||||
|
- add 8207011-Remove-uses-of-the-register-storage-class-specifier.patch
|
||||||
|
- modified implementation_of_Blas_hotspot_function_in_Intrinsics.patch
|
||||||
|
|
||||||
|
* Tue Feb 15 2022 eapen <zhangyipeng7@huawei.com> - 1:1.8.0.322-b06.1
|
||||||
|
- fix makes failure when gcc version is lower than 8
|
||||||
|
|
||||||
|
* Thu Feb 10 2022 eapen <zhangyipeng7@huawei.com> - 1:1.8.0.322-b06.0
|
||||||
|
- upgrade to 8u322-b06(ga)
|
||||||
|
- modified fast-serializer-jdk8.patch to adopt openjdk
|
||||||
|
- modified update-cacerts-and-VerifyCACerts.java-test.patch
|
||||||
|
- deleted 8182036.patch
|
||||||
|
- deleted 8183543-Aarch64-C2-compilation-often-fails-with-fail--last.patch
|
||||||
|
- deleted Delete-expired-certificate-globalsignr2ca.patch
|
||||||
|
- deleted inline-optimize-for-aarch64.patch
|
||||||
|
|
||||||
* Wed Jan 05 2021 noah <hedongbo@huawei.com> - 1:1.8.0.312-b07.11
|
* Wed Jan 05 2021 noah <hedongbo@huawei.com> - 1:1.8.0.312-b07.11
|
||||||
- adapted to newst cjc to fix issue with rpm 4.17
|
- adapted to newst cjc to fix issue with rpm 4.17
|
||||||
|
|
||||||
|
|||||||
124
penetration_testing_vulnerability_fix.patch
Executable file
124
penetration_testing_vulnerability_fix.patch
Executable file
@ -0,0 +1,124 @@
|
|||||||
|
diff --git a/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEDHKeyPairGenerator.java b/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEDHKeyPairGenerator.java
|
||||||
|
index 429c65fc0..6094c82a1 100644
|
||||||
|
--- a/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEDHKeyPairGenerator.java
|
||||||
|
+++ b/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEDHKeyPairGenerator.java
|
||||||
|
@@ -148,6 +148,9 @@ public class KAEDHKeyPairGenerator
|
||||||
|
throw new ProviderException("Invoke nativeGenerateKeyPair failed.", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // check keys
|
||||||
|
+ checkKeys(keys);
|
||||||
|
+
|
||||||
|
BigInteger pubKey = new BigInteger(keys[0]);
|
||||||
|
BigInteger priKey = new BigInteger(keys[1]);
|
||||||
|
|
||||||
|
@@ -162,5 +165,21 @@ public class KAEDHKeyPairGenerator
|
||||||
|
throw new ProviderException(ikse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ private void checkKeys(byte[][] keys) {
|
||||||
|
+ if (keys == null) {
|
||||||
|
+ throw new ProviderException("Invalid keys, keys is null.");
|
||||||
|
+ }
|
||||||
|
+ // The keys needs to contain at least 2 byte arrays, which are public and private keys.
|
||||||
|
+ if (keys.length < 2) {
|
||||||
|
+ throw new ProviderException("Invalid keys, keys length is less than 2.");
|
||||||
|
+ }
|
||||||
|
+ for (int i = 0; i < keys.length; i++) {
|
||||||
|
+ if (keys[i] == null) {
|
||||||
|
+ throw new ProviderException("Invalid keys, keys[" + i + "]" + "is null.");
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
protected native static byte[][] nativeGenerateKeyPair(byte[] p, byte[] g, int lSize);
|
||||||
|
}
|
||||||
|
diff --git a/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEECKeyPairGenerator.java b/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEECKeyPairGenerator.java
|
||||||
|
index 5f0c4db05..812980608 100644
|
||||||
|
--- a/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEECKeyPairGenerator.java
|
||||||
|
+++ b/jdk/src/solaris/classes/org/openeuler/security/openssl/KAEECKeyPairGenerator.java
|
||||||
|
@@ -65,9 +65,8 @@ public class KAEECKeyPairGenerator extends KeyPairGeneratorSpi {
|
||||||
|
|
||||||
|
private ECParameterSpec getParamsByCurve(String curveName) {
|
||||||
|
byte[][] params = nativeGenerateParam(curveName);
|
||||||
|
- if (params == null) {
|
||||||
|
- throw new InvalidParameterException("unknown curve " + curveName);
|
||||||
|
- }
|
||||||
|
+ // check params
|
||||||
|
+ checkParams(params, curveName);
|
||||||
|
BigInteger p = new BigInteger(params[0]);
|
||||||
|
BigInteger a = new BigInteger(params[1]);
|
||||||
|
BigInteger b = new BigInteger(params[2]);
|
||||||
|
@@ -82,6 +81,21 @@ public class KAEECKeyPairGenerator extends KeyPairGeneratorSpi {
|
||||||
|
return spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ private void checkParams(byte[][] params, String curveName) {
|
||||||
|
+ if (params == null) {
|
||||||
|
+ throw new InvalidParameterException("Unknown curve " + curveName);
|
||||||
|
+ }
|
||||||
|
+ // The params needs to contain at least 7 byte arrays, which are p,a,b,x,y,order and cofactor.
|
||||||
|
+ if (params.length < 7) {
|
||||||
|
+ throw new InvalidParameterException("The params length is less than 7.");
|
||||||
|
+ }
|
||||||
|
+ for (int i = 0; i < params.length; i++) {
|
||||||
|
+ if (params[i] == null) {
|
||||||
|
+ throw new InvalidParameterException("The params[" + i + "]" + "is null.");
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public void initialize(AlgorithmParameterSpec param, SecureRandom random) throws InvalidAlgorithmParameterException {
|
||||||
|
if (param instanceof ECParameterSpec) {
|
||||||
|
diff --git a/jdk/src/solaris/native/org/openeuler/security/openssl/kae_exception.c b/jdk/src/solaris/native/org/openeuler/security/openssl/kae_exception.c
|
||||||
|
index 9ccc617c4..a43da7b30 100644
|
||||||
|
--- a/jdk/src/solaris/native/org/openeuler/security/openssl/kae_exception.c
|
||||||
|
+++ b/jdk/src/solaris/native/org/openeuler/security/openssl/kae_exception.c
|
||||||
|
@@ -105,14 +105,10 @@ void KAE_ThrowFromOpenssl(JNIEnv* env, const char* msg, void (* defaultException
|
||||||
|
KAE_TRACE("OpenSSL error in %s: err=%lx, lib=%x, reason=%x, file=%s, line=%d, estring=%s, data=%s", msg, err,
|
||||||
|
lib, reason, file, line, estring, (flags & ERR_TXT_STRING) ? data : "(no data)");
|
||||||
|
|
||||||
|
- switch (lib) {
|
||||||
|
- case ERR_LIB_EVP:
|
||||||
|
- case ERR_LIB_RSA:
|
||||||
|
- KAE_ThrowEvpException(env, reason, estring, defaultException);
|
||||||
|
- break;
|
||||||
|
- default:
|
||||||
|
- defaultException(env, estring);
|
||||||
|
- break;
|
||||||
|
+ if (lib == ERR_LIB_EVP || lib == ERR_LIB_RSA) {
|
||||||
|
+ KAE_ThrowEvpException(env, reason, estring, defaultException);
|
||||||
|
+ } else {
|
||||||
|
+ defaultException(env, estring);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/jdk/src/solaris/native/org/openeuler/security/openssl/kae_hmac.c b/jdk/src/solaris/native/org/openeuler/security/openssl/kae_hmac.c
|
||||||
|
index 7b28fa1fa..554a9750c 100644
|
||||||
|
--- a/jdk/src/solaris/native/org/openeuler/security/openssl/kae_hmac.c
|
||||||
|
+++ b/jdk/src/solaris/native/org/openeuler/security/openssl/kae_hmac.c
|
||||||
|
@@ -182,7 +182,7 @@ JNIEXPORT jint JNICALL Java_org_openeuler_security_openssl_KAEHMac_nativeFinal
|
||||||
|
|
||||||
|
// write back to output_array
|
||||||
|
(*env)->SetByteArrayRegion(env, output, out_offset, bytesWritten, (jbyte*) temp_result);
|
||||||
|
- KAE_TRACE("KAEHMac_nativeFinal success, output_offset = %d, bytesWritten = %d", out_offset, bytesWritten);
|
||||||
|
+ KAE_TRACE("KAEHMac_nativeFinal success, output_offset = %d, bytesWritten = %u", out_offset, bytesWritten);
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
free(temp_result);
|
||||||
|
diff --git a/jdk/src/solaris/native/org/openeuler/security/openssl/kae_keypairgenerator_rsa.c b/jdk/src/solaris/native/org/openeuler/security/openssl/kae_keypairgenerator_rsa.c
|
||||||
|
index 0b23aa7d6..2ca978bbe 100644
|
||||||
|
--- a/jdk/src/solaris/native/org/openeuler/security/openssl/kae_keypairgenerator_rsa.c
|
||||||
|
+++ b/jdk/src/solaris/native/org/openeuler/security/openssl/kae_keypairgenerator_rsa.c
|
||||||
|
@@ -136,7 +136,8 @@ static jobjectArray NewRSAKeyParams(JNIEnv* env, RSA* rsa) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// set rsa key param
|
||||||
|
- for (RSAParamIndex paramIndex = rsaN; paramIndex <= rsaIqmp; paramIndex++) {
|
||||||
|
+ RSAParamIndex paramIndex;
|
||||||
|
+ for (paramIndex = rsaN; paramIndex <= rsaIqmp; paramIndex++) {
|
||||||
|
if (!SetRSAKeyParam(env, rsa, params, paramIndex)) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
49
print-fd-and-file-path-when-a-zip-invalid-loc-header.patch
Executable file
49
print-fd-and-file-path-when-a-zip-invalid-loc-header.patch
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
diff --git a/jdk/src/share/native/java/util/zip/zip_util.c b/jdk/src/share/native/java/util/zip/zip_util.c
|
||||||
|
index 3dbd2ba62..ff59c5ecc 100644
|
||||||
|
--- a/jdk/src/share/native/java/util/zip/zip_util.c
|
||||||
|
+++ b/jdk/src/share/native/java/util/zip/zip_util.c
|
||||||
|
@@ -81,6 +81,20 @@ static jint INITIAL_META_COUNT = 2; /* initial number of entries in meta name
|
||||||
|
#ifdef LINUX
|
||||||
|
#define ZIP_INVALID_LOC_HEADER_EXIT "ZIP_INVALID_LOC_HEADER_EXIT"
|
||||||
|
|
||||||
|
+void printFdInfo(jzfile *zip) {
|
||||||
|
+ int fd = zip->zfd;
|
||||||
|
+ char fdPath[100];
|
||||||
|
+ char filePath[PATH_MAX + 1];
|
||||||
|
+ sprintf(fdPath, "/proc/self/fd/%d", fd);
|
||||||
|
+ int len = readlink(fdPath, filePath, PATH_MAX);
|
||||||
|
+ if (len < 0) {
|
||||||
|
+ printf("[LOC-ERROR] Could not find fd : %d\n", fd);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ filePath[len] = '\0';
|
||||||
|
+ printf("[LOC-ERROR] LOC check failed, zfd : %d , zfd file : %s\n", zip->zfd, filePath);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
char *getExitFlag() {
|
||||||
|
static char *process_exit_flag = NULL;
|
||||||
|
static jboolean is_initialized = JNI_FALSE;
|
||||||
|
@@ -1339,8 +1353,8 @@ ZIP_GetEntryDataOffset(jzfile *zip, jzentry *entry)
|
||||||
|
if (GETSIG(loc) != LOCSIG) {
|
||||||
|
zip->msg = "invalid LOC header (bad signature)";
|
||||||
|
printf("[LOC-ERROR] LOC check failed, %s\n", zip->msg);
|
||||||
|
- printf("[LOC-ERROR] LOC check failed for jar: %s, class: %s, LOC: %08lx, pos:%ld\n",
|
||||||
|
- zip->name, entry->name, GETSIG(loc), (-(entry->pos)));
|
||||||
|
+ printf("[LOC-ERROR] LOC check failed for jar: %s, class: %s, LOCSIG: %08lx, expected LOCSIG: %08lx, "
|
||||||
|
+ "pos:%ld\n", zip->name, entry->name, GETSIG(loc), LOCSIG, (-(entry->pos)));
|
||||||
|
unsigned int *temp = (unsigned int *) loc;
|
||||||
|
printf("[LOC-ERROR] LOC check failed, readVal: %08x %08x %08x %08x %08x %08x %08x %02x %02x\n",
|
||||||
|
*temp, *(temp + 1), *(temp + 2), *(temp + 3), *(temp + 4),
|
||||||
|
@@ -1349,6 +1363,9 @@ ZIP_GetEntryDataOffset(jzfile *zip, jzentry *entry)
|
||||||
|
#ifdef LINUX
|
||||||
|
#define ZIP_INVALID_LOC_HEADER_EXIT_ONLY "1"
|
||||||
|
#define ZIP_INVALID_LOC_HEADER_EXIT_CODE_DUMP "2"
|
||||||
|
+ // print fd info
|
||||||
|
+ printFdInfo(zip);
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* The meaning of the exit flag is as follows:
|
||||||
|
* 1: exit (126)
|
||||||
|
--
|
||||||
|
2.12.3
|
||||||
|
|
||||||
@ -224,14 +224,14 @@ index dd107fc..791ddb6 100644
|
|||||||
+ File.separator + "security" + File.separator + "cacerts";
|
+ File.separator + "security" + File.separator + "cacerts";
|
||||||
|
|
||||||
// The numbers of certs now.
|
// The numbers of certs now.
|
||||||
- private static final int COUNT = 91;
|
- private static final int COUNT = 89;
|
||||||
+ private static final int COUNT = 86;
|
+ private static final int COUNT = 84;
|
||||||
|
|
||||||
// SHA-256 of cacerts, can be generated with
|
// SHA-256 of cacerts, can be generated with
|
||||||
// shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95
|
// shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95
|
||||||
private static final String CHECKSUM
|
private static final String CHECKSUM
|
||||||
- = "9B:C3:0B:24:D4:26:E4:A9:4F:2C:96:25:06:9B:08:E5:13:5B:0B:33:74:5F:78:DB:BD:91:CD:31:D4:37:07:28";
|
- = "CC:AD:BB:49:70:97:3F:42:AD:73:91:A0:A2:C4:B8:AA:D1:95:59:F3:B3:22:09:2A:1F:2C:AB:04:47:08:EF:AA";
|
||||||
+ = "A5:00:71:02:B4:8B:AC:BE:64:34:0A:F2:DF:9D:F7:75:9D:05:84:7E:F6:EA:48:F0:64:36:29:8C:E7:A2:2D:63";
|
+ = "D3:05:21:64:FA:D7:CD:29:E8:CB:57:E7:47:ED:79:9B:47:D8:0E:75:2D:CA:83:BB:86:AF:D9:43:FD:3E:17:85";
|
||||||
|
|
||||||
// map of cert alias to SHA-256 fingerprint
|
// map of cert alias to SHA-256 fingerprint
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@ -259,7 +259,7 @@ index dd107fc..791ddb6 100644
|
|||||||
put("quovadisrootca1g3 [jdk]",
|
put("quovadisrootca1g3 [jdk]",
|
||||||
"8A:86:6F:D1:B2:76:B5:7E:57:8E:92:1C:65:82:8A:2B:ED:58:E9:F2:F2:88:05:41:34:B7:F1:F4:BF:C9:CC:74");
|
"8A:86:6F:D1:B2:76:B5:7E:57:8E:92:1C:65:82:8A:2B:ED:58:E9:F2:F2:88:05:41:34:B7:F1:F4:BF:C9:CC:74");
|
||||||
put("quovadisrootca2 [jdk]",
|
put("quovadisrootca2 [jdk]",
|
||||||
@@ -267,22 +247,7 @@ public class VerifyCACerts {
|
@@ -267,20 +247,7 @@ public class VerifyCACerts {
|
||||||
// Exception list to 90 days expiry policy
|
// Exception list to 90 days expiry policy
|
||||||
// No error will be reported if certificate in this list expires
|
// No error will be reported if certificate in this list expires
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@ -275,8 +275,6 @@ index dd107fc..791ddb6 100644
|
|||||||
- add("luxtrustglobalrootca [jdk]");
|
- add("luxtrustglobalrootca [jdk]");
|
||||||
- // Valid until: Wed Mar 17 11:33:33 PDT 2021
|
- // Valid until: Wed Mar 17 11:33:33 PDT 2021
|
||||||
- add("quovadisrootca [jdk]");
|
- add("quovadisrootca [jdk]");
|
||||||
- // Valid until: Thu Sep 30 14:01:15 GMT 2021
|
|
||||||
- add("identrustdstx3 [jdk]");
|
|
||||||
- }
|
- }
|
||||||
- };
|
- };
|
||||||
+ private static final HashSet<String> EXPIRY_EXC_ENTRIES = new HashSet<String>();
|
+ private static final HashSet<String> EXPIRY_EXC_ENTRIES = new HashSet<String>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user