diff --git a/8136577_Make_AbortVMOnException_available_in_product_builds.patch b/8136577_Make_AbortVMOnException_available_in_product_builds.patch deleted file mode 100755 index 1aa04c7bc9b4677cd2536ad44905707ee88616df..0000000000000000000000000000000000000000 --- a/8136577_Make_AbortVMOnException_available_in_product_builds.patch +++ /dev/null @@ -1,179 +0,0 @@ -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); - }; - - diff --git a/8173361-various-crashes-in-JvmtiExport-post_compiled.patch b/8173361-various-crashes-in-JvmtiExport-post_compiled.patch deleted file mode 100755 index 2b14cc7a333bce48c10049f12810d85d683adb50..0000000000000000000000000000000000000000 --- a/8173361-various-crashes-in-JvmtiExport-post_compiled.patch +++ /dev/null @@ -1,290 +0,0 @@ -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 - diff --git a/8182036.patch b/8182036.patch new file mode 100644 index 0000000000000000000000000000000000000000..cb2dcf5a194c0d077d6dab4be273275a78a2f926 --- /dev/null +++ b/8182036.patch @@ -0,0 +1,28 @@ +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 + diff --git a/8183543-Aarch64-C2-compilation-often-fails-with-fail--last.patch b/8183543-Aarch64-C2-compilation-often-fails-with-fail--last.patch new file mode 100755 index 0000000000000000000000000000000000000000..2ad77e4f8c060e9f4662fb908ebce4736c8b9d16 --- /dev/null +++ b/8183543-Aarch64-C2-compilation-often-fails-with-fail--last.patch @@ -0,0 +1,13 @@ +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); diff --git a/8194154.patch b/8194154.patch index c5589c8d7e36aea78f5b736b9b4c879ca3f377d6..0adbad3e0f5aa4cf01e72b87e0f1957539147602 100644 --- a/8194154.patch +++ b/8194154.patch @@ -18,7 +18,7 @@ index fb0fef636..a6ef2d3a6 100644 +++ b/jdk/src/solaris/classes/java/io/UnixFileSystem.java @@ -1,5 +1,5 @@ /* -- * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -59,7 +59,7 @@ index caa47f80c..1844a662a 100644 +++ b/jdk/src/windows/classes/java/io/WinNTFileSystem.java @@ -1,5 +1,5 @@ /* -- * Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved. +- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -70,8 +70,8 @@ index caa47f80c..1844a662a 100644 private final char semicolon; + private final String userDir; - // Whether to enable alternative data streams (ADS) by suppressing - // checking the path for invalid characters, in particular ":". + public WinNTFileSystem() { + slash = AccessController.doPrivileged( @@ -47,6 +48,8 @@ class WinNTFileSystem extends FileSystem { semicolon = AccessController.doPrivileged( new GetPropertyAction("path.separator")).charAt(0); diff --git a/8207011-Remove-uses-of-the-register-storage-class-specifier.patch b/8207011-Remove-uses-of-the-register-storage-class-specifier.patch deleted file mode 100755 index 1c52c325d6cb76013eddac8b5b833b3b7fa5ff28..0000000000000000000000000000000000000000 --- a/8207011-Remove-uses-of-the-register-storage-class-specifier.patch +++ /dev/null @@ -1,333 +0,0 @@ -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> 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 - diff --git a/8233280-Remove-GCLockerInvokesConcurrent-relative-logic-for-G1.patch b/8233280-Remove-GCLockerInvokesConcurrent-relative-logic-for-G1.patch index 4a5b89cd4ea1ad0838e4d281f69bb7434988c058..2ad997311bcdb3e04c851a6200740859f11b7d98 100755 --- a/8233280-Remove-GCLockerInvokesConcurrent-relative-logic-for-G1.patch +++ b/8233280-Remove-GCLockerInvokesConcurrent-relative-logic-for-G1.patch @@ -5,9 +5,9 @@ Subject: [PATCH 2/4] 8233280: Remove GCLockerInvokesConcurrent relative logic for G1 --- - .../src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 1 ---- + .../src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 4 ---- .../src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp | 5 ++--- - 2 files changed, 2 insertions(+), 4 deletions(-) + 2 files changed, 2 insertions(+), 7 deletions(-) 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 @@ -21,6 +21,16 @@ index 4f45bba52..060531901 100644 case GCCause::_g1_humongous_allocation: return true; case GCCause::_g1_periodic_collection: return true; 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 index d83e6cb65..3225967b3 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp diff --git a/8268819-SA-Remove-libthread_db-dependency-on-Linux.patch b/8268819-SA-Remove-libthread_db-dependency-on-Linux.patch deleted file mode 100644 index 77849a111712c40620012c1e4fca2ec31eafca85..0000000000000000000000000000000000000000 --- a/8268819-SA-Remove-libthread_db-dependency-on-Linux.patch +++ /dev/null @@ -1,448 +0,0 @@ -From ed8ff7161f021b4a9cb5ec7c4c55c7b62a0ac389 Mon Sep 17 00:00:00 2001 -From: d30023828 -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 - #include "libproc.h" -+#include "proc_service.h" - - #include - #include -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 - #include - #include --#include "proc_service.h" - - #ifdef ALT_SASRCDIR - #include "libproc_md.h" - #endif - -+#include - #include - - #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 -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 - #include - #include --#include -+#include - #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 --#include -+#include -+ -+#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 - #include - #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 - #include - #include -+#include - #include - #include - #include -@@ -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//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 - diff --git a/Delete-expired-certificate-globalsignr2ca.patch b/Delete-expired-certificate-globalsignr2ca.patch new file mode 100755 index 0000000000000000000000000000000000000000..8b771adb934f6aac903c243e8c3c06067c2d6db7 --- /dev/null +++ b/Delete-expired-certificate-globalsignr2ca.patch @@ -0,0 +1,121 @@ +From d64c9b5f69fa307c1fdc44ce8e2a063e805400b8 Mon Sep 17 00:00:00 2001 +From: zhangyipeng +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 + diff --git a/Fix-compile-and-runtime-failures-for-minimal1-versio.patch b/Fix-compile-and-runtime-failures-for-minimal1-versio.patch deleted file mode 100644 index 0cdb49e5e6882372094b8bf3eed7d204a90150f6..0000000000000000000000000000000000000000 --- a/Fix-compile-and-runtime-failures-for-minimal1-versio.patch +++ /dev/null @@ -1,211 +0,0 @@ -From d915916d5a7f3280270ea4207e4d3892ffa7de04 Mon Sep 17 00:00:00 2001 -Date: Mon, 11 Apr 2022 17:14:06 +0800 -Subject: [PATCH] Fix compile and runtime failures for minimal1 version - -Reference: NA -Summary: < JDK> : Fix compile and runtime failures for minimal1 version ---- - .../src/share/vm/classfile/systemDictionary.cpp | 30 ++++++++++------------ - .../parallelScavenge/psMarkSweep.hpp | 2 +- - hotspot/src/share/vm/prims/jvm.cpp | 12 +++++++++ - hotspot/src/share/vm/prims/jvmtiImpl.hpp | 8 +++--- - hotspot/src/share/vm/runtime/memprofiler.cpp | 2 +- - hotspot/src/share/vm/utilities/taskqueue.cpp | 2 ++ - hotspot/src/share/vm/utilities/taskqueue.hpp | 4 +-- - .../com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c | 1 - - 8 files changed, 36 insertions(+), 25 deletions(-) - -diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp -index 0d11abfa..794ee9b1 100644 ---- a/hotspot/src/share/vm/classfile/systemDictionary.cpp -+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp -@@ -1093,19 +1093,6 @@ Klass* SystemDictionary::parse_stream(Symbol* class_name, - return k(); - } - --static char* convert_into_package_name(char* name) { -- char* index = strrchr(name, '/'); -- if (index == NULL) { -- return NULL; -- } else { -- *index = '\0'; // chop to just the package name -- while ((index = strchr(name, '/')) != NULL) { -- *index = '.'; // replace '/' with '.' in package name -- } -- return name; -- } --} -- - static bool is_prohibited_package_slow(Symbol* class_name) { - // Caller has ResourceMark - int length; -@@ -1252,6 +1239,18 @@ void SystemDictionary::set_shared_dictionary(HashtableBucket* t, int le - _shared_dictionary = new Dictionary(_nof_buckets, t, number_of_entries); - } - -+static char* convert_into_package_name(char* name) { -+ char* index = strrchr(name, '/'); -+ if (index == NULL) { -+ return NULL; -+ } else { -+ *index = '\0'; // chop to just the package name -+ while ((index = strchr(name, '/')) != NULL) { -+ *index = '.'; // replace '/' with '.' in package name -+ } -+ return name; -+ } -+} - - // If there is a shared dictionary, then find the entry for the - // given shared system class, if any. -@@ -1267,7 +1266,6 @@ Klass* SystemDictionary::find_shared_class(Symbol* class_name) { - } - } - -- - // Load a class from the shared spaces (found through the shared system - // dictionary). Force the superclass and all interfaces to be loaded. - // Update the class definition to include sibling classes and no -diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp -index 01666ea4d..deeca7bb5 100644 ---- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp -+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.hpp -@@ -77,7 +77,7 @@ class PSMarkSweep : public MarkSweep { - - // Reset time since last full gc - static void reset_millis_since_last_gc(); -- static void ps_marksweep_init(); -+ static void ps_marksweep_init() NOT_ALL_GCS_RETURN; - - public: - static inline PSMarkSweep* the_ps_mark() { return (PSMarkSweep*)_the_ps_mark; } -diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp -index c27a534ef..f75501dba 100644 ---- a/hotspot/src/share/vm/prims/jvm.cpp -+++ b/hotspot/src/share/vm/prims/jvm.cpp -@@ -3303,20 +3303,32 @@ JVM_END - - JVM_ENTRY(void, JVM_AdaptiveHeapSetG1PeriodicGCInterval(JNIEnv *env, jclass klass, jint interval)) - JVMWrapper("JVM_AdaptiveHeapSetG1PeriodicGCInterval"); -+#if INCLUDE_ALL_GCS - G1PeriodicGCInterval = interval; -+#endif - JVM_END - JVM_ENTRY(jint, JVM_AdaptiveHeapGetG1PeriodicGCInterval(JNIEnv *env, jclass klass)) - JVMWrapper("JVM_AdaptiveHeapGetG1PeriodicGCInterval"); -+#if INCLUDE_ALL_GCS - return G1PeriodicGCInterval; -+#else -+ return -1; -+#endif - JVM_END - - JVM_ENTRY(void, JVM_AdaptiveHeapSetG1PeriodicGCLoadThreshold(JNIEnv *env, jclass clazz, jint loadThreshold)) - JVMWrapper("JVM_AdaptiveHeapSetG1PeriodicGCLoadThreshold"); -+#if INCLUDE_ALL_GCS - G1PeriodicGCLoadThreshold = loadThreshold; -+#endif - JVM_END - JVM_ENTRY(jint, JVM_AdaptiveHeapGetG1PeriodicGCLoadThreshold(JNIEnv *env, jclass clazz)) - JVMWrapper("JVM_AdaptiveHeapgetG1PeriodicGCLoadThreshold"); -+#if INCLUDE_ALL_GCS - return G1PeriodicGCLoadThreshold; -+#else -+ return -1; -+#endif - JVM_END - - JVM_ENTRY(void, JVM_Yield(JNIEnv *env, jclass threadClass)) -diff --git a/hotspot/src/share/vm/prims/jvmtiImpl.hpp b/hotspot/src/share/vm/prims/jvmtiImpl.hpp -index d74789451..ec721ca20 100644 ---- a/hotspot/src/share/vm/prims/jvmtiImpl.hpp -+++ b/hotspot/src/share/vm/prims/jvmtiImpl.hpp -@@ -493,9 +493,9 @@ 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); -+ void nmethods_do(CodeBlobClosure* cf) NOT_JVMTI_RETURN; - // GC support to keep nmethod from being unloaded while in the queue. -- void oops_do(OopClosure* f, CodeBlobClosure* cf); -+ void oops_do(OopClosure* f, CodeBlobClosure* cf) NOT_JVMTI_RETURN; - }; - - /** -@@ -534,9 +534,9 @@ class JvmtiDeferredEventQueue : AllStatic { - 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); -+ static void nmethods_do(CodeBlobClosure* cf) NOT_JVMTI_RETURN; - // GC support to keep nmethod from being unloaded while in the queue. -- static void oops_do(OopClosure* f, CodeBlobClosure* cf); -+ static void oops_do(OopClosure* f, CodeBlobClosure* cf) NOT_JVMTI_RETURN; - - // 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/memprofiler.cpp b/hotspot/src/share/vm/runtime/memprofiler.cpp -index ddb22601f..a956c5252 100644 ---- a/hotspot/src/share/vm/runtime/memprofiler.cpp -+++ b/hotspot/src/share/vm/runtime/memprofiler.cpp -@@ -126,7 +126,7 @@ void MemProfiler::do_trace() { - - fprintf(_log_fp, UINTX_FORMAT_W(6) ",", CodeCache::capacity() / K); - -- fprintf(_log_fp, UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) "\n", -+ fprintf(_log_fp, UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) ",%6ld\n", - handles_memory_usage / K, - resource_memory_usage / K, - 0L); -diff --git a/hotspot/src/share/vm/utilities/taskqueue.cpp b/hotspot/src/share/vm/utilities/taskqueue.cpp -index 120c65a60..7c6849c63 100644 ---- a/hotspot/src/share/vm/utilities/taskqueue.cpp -+++ b/hotspot/src/share/vm/utilities/taskqueue.cpp -@@ -273,10 +273,12 @@ void ParallelTaskTerminator::reset_for_reuse(int n_threads) { - _n_threads = n_threads; - } - -+#if INCLUDE_ALL_GCS - TaskTerminator::TaskTerminator(uint n_threads, TaskQueueSetSuper* queue_set) : - _terminator(UseOWSTTaskTerminator ? new OWSTTaskTerminator(n_threads, queue_set) - : new ParallelTaskTerminator(n_threads, queue_set)) { - } -+#endif - - TaskTerminator::~TaskTerminator() { - if (_terminator != NULL) { -diff --git a/hotspot/src/share/vm/utilities/taskqueue.hpp b/hotspot/src/share/vm/utilities/taskqueue.hpp -index 959d0dd21..284675708 100644 ---- a/hotspot/src/share/vm/utilities/taskqueue.hpp -+++ b/hotspot/src/share/vm/utilities/taskqueue.hpp -@@ -763,7 +763,7 @@ private: - TaskTerminator(const TaskTerminator& o) { } - TaskTerminator& operator=(TaskTerminator& o) { return *this; } - public: -- TaskTerminator(uint n_threads, TaskQueueSetSuper* queue_set); -+ TaskTerminator(uint n_threads, TaskQueueSetSuper* queue_set) NOT_ALL_GCS_RETURN; - ~TaskTerminator(); - - // Move assignment -@@ -929,4 +929,4 @@ typedef OverflowTaskQueue RegionTaskQueue; - typedef GenericTaskQueueSet RegionTaskQueueSet; - - --#endif // SHARE_VM_UTILITIES_TASKQUEUE_HPP -\ No newline at end of file -+#endif // SHARE_VM_UTILITIES_TASKQUEUE_HPP -diff --git a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c -index 99bfff885..0e365d7aa 100644 ---- a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c -+++ b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c -@@ -31,7 +31,6 @@ static JNINativeMethod methods[] = { - {"getG1PeriodicGCIntervalImpl", "()I", (void *)&JVM_AdaptiveHeapGetG1PeriodicGCInterval}, - {"setG1PeriodicGCLoadThresholdImpl", "(I)V", (void *)&JVM_AdaptiveHeapSetG1PeriodicGCLoadThreshold}, - {"getG1PeriodicGCLoadThresholdImpl", "()I", (void *)&JVM_AdaptiveHeapGetG1PeriodicGCLoadThreshold}, -- - }; - - JNIEXPORT void JNICALL --- -2.12.3 - diff --git a/add-environment-variable-ZIP_INVALID_LOC_HEADER_EXIT.patch b/add-environment-variable-ZIP_INVALID_LOC_HEADER_EXIT.patch deleted file mode 100755 index 06dad7c786201b17e0505f6e6edf48ad7212eea8..0000000000000000000000000000000000000000 --- a/add-environment-variable-ZIP_INVALID_LOC_HEADER_EXIT.patch +++ /dev/null @@ -1,63 +0,0 @@ -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 - diff --git a/add-missing-test-case.patch b/add-missing-test-case.patch index d17f6cacfb0e60c2a784c63146be16169422a765..e432247c8161497406d216d9d8cf56f375419caf 100644 --- a/add-missing-test-case.patch +++ b/add-missing-test-case.patch @@ -125,7 +125,7 @@ index 00000000..9b614024 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ -+8.332.9.0.13 ++8.292.8.0.13 -- 2.23.0 diff --git a/add-system-property-swing.JComboBox.useLegacyMode.patch b/add-system-property-swing.JComboBox.useLegacyMode.patch deleted file mode 100755 index cd58e569f3b7ca1a75a0dc3db992c12a17861a75..0000000000000000000000000000000000000000 --- a/add-system-property-swing.JComboBox.useLegacyMode.patch +++ /dev/null @@ -1,84 +0,0 @@ -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 - diff --git a/debuginfo.diz-should-not-contain-the-path-after-unzip.patch b/debuginfo.diz-should-not-contain-the-path-after-unzip.patch deleted file mode 100755 index 1f49d5f7761b0de3ef03d69f94a126e675408603..0000000000000000000000000000000000000000 --- a/debuginfo.diz-should-not-contain-the-path-after-unzip.patch +++ /dev/null @@ -1,16 +0,0 @@ -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 - diff --git a/dismiss-warnings-in-GCC-8.X.patch b/dismiss-warnings-in-GCC-8.X.patch index 55847d9dd6fc2eb0960466e1132903d258bffb36..6592a7484cb2e30b9f20cc6d0d3a5d6566081e7e 100644 --- a/dismiss-warnings-in-GCC-8.X.patch +++ b/dismiss-warnings-in-GCC-8.X.patch @@ -2,14 +2,12 @@ diff --git a/hotspot/make/linux/makefiles/adlc.make b/hotspot/make/linux/makefil index 92b8b9b3..a24f9184 100644 --- a/hotspot/make/linux/makefiles/adlc.make +++ b/hotspot/make/linux/makefiles/adlc.make -@@ -64,6 +64,11 @@ CXXFLAGS = $(SYSDEFS) $(INCLUDES) +@@ -64,6 +64,9 @@ CXXFLAGS = $(SYSDEFS) $(INCLUDES) # Force assertions on. CXXFLAGS += -DASSERT +# Introduced in GCC 8.X -+ifneq "$(shell expr \( $(CC_VER_MAJOR) \>= 8 \))" "0" -+ CXXFLAGS += -Wno-error=stringop-overflow= -+endif ++CXXFLAGS += -Wno-error=stringop-overflow= + # CFLAGS_WARN holds compiler options to suppress/enable warnings. # Compiler warnings are treated as errors diff --git a/fast-serializer-jdk8.patch b/fast-serializer-jdk8.patch index d2a0e1ad0b55b57f91eb4f1760cf00e7b3694868..381fb49389e1ea13bc7d6d21cc90f0848df8c75f 100644 --- a/fast-serializer-jdk8.patch +++ b/fast-serializer-jdk8.patch @@ -314,7 +314,7 @@ index 5d30f2a01..b67f01719 100644 ObjectStreamClass desc = new ObjectStreamClass(); desc.readNonProxy(this); return desc; -@@ -1996,41 +2090,64 @@ private ObjectStreamClass readNonProxyDesc(boolean unshared) +@@ -1935,17 +2056,40 @@ public class ObjectInputStream skipCustomData(); @@ -322,30 +322,6 @@ index 5d30f2a01..b67f01719 100644 - totalObjectRefs++; - depth++; - 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 { - depth--; + totalObjectRefs++; @@ -368,30 +344,6 @@ index 5d30f2a01..b67f01719 100644 + } else { + try { + 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 { + depth--; + } diff --git a/fix-TestUseCompressedOopsErgo-run-failed.patch b/fix-TestUseCompressedOopsErgo-run-failed.patch deleted file mode 100755 index 81012b3d47469984be3e5a1dc2dba3062bac4de5..0000000000000000000000000000000000000000 --- a/fix-TestUseCompressedOopsErgo-run-failed.patch +++ /dev/null @@ -1,16 +0,0 @@ -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 - diff --git a/fix-make-bugs-when-git-and-hg-not-exist.patch b/fix-make-bugs-when-git-and-hg-not-exist.patch deleted file mode 100644 index 61c8892b3057da8b981e6044c40ba6bafc2f17b1..0000000000000000000000000000000000000000 --- a/fix-make-bugs-when-git-and-hg-not-exist.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a447db8644fe785db481a425fe3efa62cb11122f Mon Sep 17 00:00:00 2001 -Date: Mon, 25 Apr 2022 17:12:39 +0800 -Subject: [PATCH] Fix make bugs when git and hg not exist - ---- - make/common/MakeBase.gmk | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk -index 2ba3d04..c97a42a 100644 ---- a/make/common/MakeBase.gmk -+++ b/make/common/MakeBase.gmk -@@ -318,9 +318,9 @@ SCM_TIP_FILECMD := $(PRINTF) "$(SCM):%s" \ - # Emit the scm:id pair to $@ - define GetSourceTips - $(CD) $(SRC_ROOT) ; \ -- if [ -d $(SCM_DIR) -a "$(SCM_VERSION)" != "" ] ; then \ -+ if [ -d "$(SCM_DIR)" -a "$(SCM_VERSION)" != "" ] ; then \ - $(ID_COMMAND) >> $@ ; \ -- elif [ -f $(SCM_TIP_FILENAME) ] ; then \ -+ elif [ -f "$(SCM_TIP_FILENAME)" ] ; then \ - $(SCM_TIP_FILECMD) >> $@ ; \ - fi; - $(PRINTF) "\n" >> $@ --- -1.8.3.1 - diff --git a/fix-testme-Test6929067-run-faild.patch b/fix-testme-Test6929067-run-faild.patch deleted file mode 100755 index c357721526ab12da46861ff392e730261cd53324..0000000000000000000000000000000000000000 --- a/fix-testme-Test6929067-run-faild.patch +++ /dev/null @@ -1,51 +0,0 @@ -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 - diff --git a/fix_X509TrustManagerImpl_symantec_distrust.patch b/fix_X509TrustManagerImpl_symantec_distrust.patch deleted file mode 100644 index 5ff273d601590b1792daf6e352851a4fb7718929..0000000000000000000000000000000000000000 --- a/fix_X509TrustManagerImpl_symantec_distrust.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/jdk/make/data/cacerts/geotrustglobalca b/jdk/make/data/cacerts/geotrustglobalca -new file mode 100644 -index 000000000..7f8bf9a66 ---- /dev/null -+++ b/jdk/make/data/cacerts/geotrustglobalca -@@ -0,0 +1,27 @@ -+Owner: CN=GeoTrust Global CA, O=GeoTrust Inc., C=US -+Issuer: CN=GeoTrust Global CA, O=GeoTrust Inc., C=US -+Serial number: 23456 -+Valid from: Tue May 21 04:00:00 GMT 2002 until: Sat May 21 04:00:00 GMT 2022 -+Signature algorithm name: SHA1withRSA -+Subject Public Key Algorithm: 2048-bit RSA key -+Version: 3 -+-----BEGIN CERTIFICATE----- -+MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT -+MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i -+YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG -+EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg -+R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9 -+9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq -+fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv -+iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU -+1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+ -+bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW -+MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA -+ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l -+uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn -+Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS -+tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF -+PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un -+hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV -+5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw== -+-----END CERTIFICATE----- -diff --git a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java -index 54e1bfa0d..c1423dc5b 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 = 83; -+ 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 -- = "2D:04:88:6C:52:53:54:EB:38:2D:BC:E0:AF:B7:82:F4:9E:32:A8:1A:1B:A3:AE:CF:25:CB:C2:F6:0F:4E:E1:20"; -+ = "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") -@@ -111,7 +111,9 @@ public class VerifyCACerts { - "7E:37:CB:8B:4C:47:09:0C:AB:36:55:1B:A6:F4:5D:B8:40:68:0F:BA:16:6A:95:2D:B1:00:71:7F:43:05:3F:C2"); - put("digicerthighassuranceevrootca [jdk]", - "74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF"); -- put("geotrustprimaryca [jdk]", -+ put("geotrustglobalca [jdk]", -+ "FF:85:6A:2D:25:1D:CD:88:D3:66:56:F4:50:12:67:98:CF:AB:AA:DE:40:79:9C:72:2D:E4:D2:B5:DB:36:A7:3A"); -+ put("geotrustprimaryca [jdk]", - "37:D5:10:06:C5:12:EA:AB:62:64:21:F1:EC:8C:92:01:3F:C5:F8:2A:E9:8E:E5:33:EB:46:19:B8:DE:B4:D0:6C"); - put("geotrustprimarycag2 [jdk]", - "5E:DB:7A:C4:3B:82:A0:6A:87:61:E8:D7:BE:49:79:EB:F2:61:1F:7D:D7:9B:F9:1C:1C:6B:56:6A:21:9E:D7:66"); -@@ -237,7 +239,12 @@ public class VerifyCACerts { - // Exception list to 90 days expiry policy - // No error will be reported if certificate in this list expires - @SuppressWarnings("serial") -- private static final HashSet EXPIRY_EXC_ENTRIES = new HashSet(); -+ private static final HashSet EXPIRY_EXC_ENTRIES = new HashSet() { -+ { -+ // Valid until: Sat May 21 04:00:00 GMT 2022 -+ add("geotrustglobalca [jdk]"); -+ } -+ }; - - // Ninety days in milliseconds - private static final long NINETY_DAYS = 7776000000L; diff --git a/implementation_of_Blas_hotspot_function_in_Intrinsics.patch b/implementation_of_Blas_hotspot_function_in_Intrinsics.patch index e731e53bcf5c923cd8c9e7a42c9a1c904bca3dd4..cb2815fbb4b00c4e7c48c392d8c2813df5d7c2d9 100755 --- a/implementation_of_Blas_hotspot_function_in_Intrinsics.patch +++ b/implementation_of_Blas_hotspot_function_in_Intrinsics.patch @@ -1,3 +1,9 @@ +commit 9856171f660f6edb240bb4e7e95a87b60f4d2bc3 +Author: hubodao +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 index 7080ea10d..62a8ab7bd 100644 --- a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp @@ -264,55 +270,10 @@ diff --git a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp b/hotspot/src/ index c5ec637a1..125983179 100644 --- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp -@@ -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: /jre/lib///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 { +@@ -3204,6 +3204,218 @@ class StubGenerator: public StubCodeGenerator { return start; } - + + // Parameter conversion from JVM to native BLAS + // + // Register: @@ -524,6 +485,51 @@ 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: /jre/lib///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: @@ -1307,10 +1313,11 @@ index 5cbc0f012..10eeea217 100644 default: // If you get here, it may be that someone has added a new intrinsic // to the list in vmSymbols.hpp without implementing it here. -@@ -6354,6 +6362,144 @@ bool LibraryCallKit::inline_ddotF2jBLAS() { +@@ -6353,6 +6361,144 @@ bool LibraryCallKit::inline_ddotF2jBLAS() { + return true; } - /** ++/** + * double org.netlib.blas.Dgemm.dgemm(java.lang.String transa, + * java.lang.String transb, int m, int n, int k, + * double alpha, double[] a, int offset_a, int lda, @@ -1448,10 +1455,9 @@ index 5cbc0f012..10eeea217 100644 + return true; +} + -+/** + /** * Calculate CRC32 for ByteBuffer. * 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 index f1fe4d666..dc8f0c774 100644 --- a/hotspot/src/share/vm/opto/runtime.cpp @@ -1621,6 +1627,3 @@ index a4eeb910d..16075d9f4 100644 static address multiplyToLen() {return _multiplyToLen; } static address squareToLen() {return _squareToLen; } --- -2.12.3 - diff --git a/inline-optimize-for-aarch64.patch b/inline-optimize-for-aarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..230d237c1e25d1b4fb76b39e2010c11a11d3ba26 --- /dev/null +++ b/inline-optimize-for-aarch64.patch @@ -0,0 +1,13 @@ +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); diff --git a/jdk8u-jdk8u332-b09.tar.xz b/jdk8u-jdk8u312-b07.tar.xz similarity index 80% rename from jdk8u-jdk8u332-b09.tar.xz rename to jdk8u-jdk8u312-b07.tar.xz index 3e51ad8d51c90c7bbb1e5a5c5ecde2c6fc35aef5..856c1a17a25ea8a22eced7732bb412636a877dc0 100644 Binary files a/jdk8u-jdk8u332-b09.tar.xz and b/jdk8u-jdk8u312-b07.tar.xz differ diff --git a/openjdk-1.8.0.spec b/openjdk-1.8.0.spec index 129aaa314a3e2ad436a9cd877e61338fb3311193..d7ecf151f38eb3d56e80b128587d4f8e799d5c86 100644 --- a/openjdk-1.8.0.spec +++ b/openjdk-1.8.0.spec @@ -51,10 +51,12 @@ %global build_loop1 %{nil} %endif +%global disable_all_platform 0 + %global aarch64 aarch64 -%global jit_arches x86_64 %{aarch64} -%global sa_arches x86_64 %{aarch64} -%global jfr_arches x86_64 %{aarch64} +%global jit_arches x86_64 %{aarch64} loongarch64 +%global sa_arches x86_64 %{aarch64} loongarch64 +%global jfr_arches x86_64 %{aarch64} loongarch64 # By default, we build a debug build during main build on JIT architectures %global include_debug_build 1 @@ -115,6 +117,10 @@ %global archinstall aarch64 %global stapinstall arm64 %endif +%ifarch loongarch64 +%global archinstall loongarch64 +%global stapinstall loongarch64 +%endif %ifarch %{jit_arches} %global with_systemtap 1 @@ -146,13 +152,13 @@ %global origin_nice OpenJDK %global top_level_dir_name %{origin} %global repo jdk8u -%global revision jdk8u332-b09 +%global revision jdk8u312-b07 %global full_revision %{repo}-%{revision} # Define IcedTea version used for SystemTap tapsets and desktop files %global icedteaver 3.15.0 -%global updatever 332 -%global buildver b09 +%global updatever 312 +%global buildver b07 # priority must be 7 digits in total. The expression is workarounding tip %global priority 1800%{updatever} @@ -581,10 +587,12 @@ exit 0 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnet.so %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnio.so %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnpt.so +%if %{disable_all_platform} %ifarch %{aarch64} %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2kae.so %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/kaeprovider.conf %endif +%endif %ifarch %{sa_arches} %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsaproc.so %endif @@ -626,9 +634,11 @@ exit 0 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunjce_provider.jar %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunpkcs11.jar %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/zipfs.jar +%if %{disable_all_platform} %ifarch %{aarch64} %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/kae_openssl.jar %endif +%endif %ifarch %{jfr_arches} %{_jvmdir}/%{jredir -- %{?1}}/lib/jfr.jar %{_jvmdir}/%{jredir -- %{?1}}/lib/jfr/default.jfc @@ -916,7 +926,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 2 +Release: 11 # 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 # also included the epoch in their virtual provides. This created a @@ -995,6 +1005,7 @@ Patch63: 8033552.patch Patch67: 8165860.patch Patch68: 8194154.patch Patch70: 8164948.patch +Patch72: inline-optimize-for-aarch64.patch # 8u242 Patch75: Add-ability-to-configure-third-port-for-remote-JMX.patch @@ -1030,6 +1041,8 @@ Patch115: 8243670.patch Patch118: Fix-LineBuffer-vappend-when-buffer-too-small.patch Patch121: Remove-unused-GenericTaskQueueSet-T-F-tasks.patch Patch122: optimize-jmap-F-dump-xxx.patch +Patch123: recreate-.java_pid-file-when-deleted-for-attach-mechanism.patch +Patch124: Support-Git-commit-ID-in-the-SOURCE-field-of-the-release.patch Patch125: Extend-CDS-to-support-app-class-metadata-sharing.patch Patch127: add-DumpSharedSpace-guarantee-when-create-anonymous-classes.patch @@ -1080,6 +1093,7 @@ Patch183: revert-windows-bugfix.patch Patch184: set-vm.vendor-by-configure.patch Patch185: update-cacerts-and-VerifyCACerts.java-test.patch Patch186: update-to-keep-same-with-master.patch +Patch187: 8182036.patch Patch188: 8247691_incorrect_handling_of_VM_exceptions_in_C1_deopt_stub.patch Patch189: 8266187_Memory_leak_in_appendBootClassPath.patch Patch192: add_kae_implementation_add_default_conf_file.patch @@ -1097,11 +1111,13 @@ Patch202: Fix-RSACipher-memory-usage.patch Patch203: fix-lock-ordering-issue-when-calling-JVMTI-GetLoaded.patch Patch204: 8069191.patch Patch205: fix_g1uncommit_ygc_expand_crash.patch +Patch206: 8167014-jdeps-failed-with-Missing-message-warn-skippen-entry.patch Patch207: fix_bug_in_keypairgenerator.patch Patch208: C1-assert-is_virtual-failed-type-check.patch Patch209: 8197387-Run-the-jcmd-tool-as-the-root-user-to-access.patch Patch210: create-jfr-dump-file-with-pid-or-timestamp-if-specif.patch Patch212: enhance-the-TimeZone-s-path-solution-on-Euler.patch +Patch213: fix-wrong-commitID-in-release-file.patch Patch214: fix-appcds-s-option-AppCDSLockFile.patch Patch215: PS-introduce-UsePSRelaxedForwardee-to-enable-using-r.patch Patch216: Parallel-Full-GC-for-G1.patch @@ -1111,31 +1127,17 @@ Patch219: G1Uncommit-Introduce-G1PeriodGCNotRetry-control-whet.patch Patch220: JDK-debug-version-crash-when-using-AppCDS.patch # 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 Patch223: 8233280-Remove-GCLockerInvokesConcurrent-relative-logic-for-G1.patch Patch224: G1Ucommit-Refactor-Trigger-mechanism.patch Patch225: G1-Full-GC-parallel-mark.patch Patch226: G1Uncommit-add-G1UncommitLog-limit-before-G1Uncommit.patch +Patch227: Delete-expired-certificate-globalsignr2ca.patch Patch228: add-wrap_memcpy-to-libsaproc.patch Patch229: downgrade-the-symver-of-fcntl64.patch # 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 - -# 8u332 -Patch242: fix-make-bugs-when-git-and-hg-not-exist.patch -Patch243: Fix-compile-and-runtime-failures-for-minimal1-versio.patch -Patch244: fix_X509TrustManagerImpl_symantec_distrust.patch ############################################# # @@ -1471,6 +1473,7 @@ ln -s %{top_level_dir_name} jdk8 pushd %{top_level_dir_name} # OpenJDK patches +%if %{disable_all_platform} %patch8 -p1 %patch10 -p1 %patch18 -p1 @@ -1496,6 +1499,7 @@ pushd %{top_level_dir_name} %patch67 -p1 %patch68 -p1 %patch70 -p1 +%patch72 -p1 %patch75 -p1 %patch83 -p1 %patch85 -p1 @@ -1523,6 +1527,8 @@ pushd %{top_level_dir_name} %patch118 -p1 %patch121 -p1 %patch122 -p1 +%patch123 -p1 +%patch124 -p1 %patch125 -p1 %patch127 -p1 %patch133 -p1 @@ -1567,6 +1573,7 @@ pushd %{top_level_dir_name} %patch184 -p1 %patch185 -p1 %patch186 -p1 +%patch187 -p1 %patch188 -p1 %patch189 -p1 %patch192 -p1 @@ -1581,11 +1588,13 @@ pushd %{top_level_dir_name} %patch203 -p1 %patch204 -p1 %patch205 -p1 +%patch206 -p1 %patch207 -p1 %patch208 -p1 %patch209 -p1 %patch210 -p1 %patch212 -p1 +%patch213 -p1 %patch214 -p1 %patch215 -p1 %patch216 -p1 @@ -1593,27 +1602,16 @@ pushd %{top_level_dir_name} %patch218 -p1 %patch219 -p1 %patch220 -p1 +%patch221 -p1 %patch222 -p1 %patch223 -p1 %patch224 -p1 %patch225 -p1 %patch226 -p1 +%patch227 -p1 %patch228 -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 -%patch242 -p1 -%patch243 -p1 -%patch244 -p1 +%endif popd # System library fixes @@ -1715,15 +1713,19 @@ bash ${top_srcdir_abs_path}/configure \ --with-milestone="fcs" \ --with-update-version=%{updatever} \ --with-build-number=%{buildver} \ +%if %{disable_all_platform} --with-company-name="Bisheng" \ --with-vendor-name="Bisheng" \ +%endif --with-vendor-url="https://openeuler.org/" \ --with-vendor-bug-url="https://gitee.com/src-openeuler/openjdk-1.8.0/issues/" \ --with-vendor-vm-bug-url="https://gitee.com/src-openeuler/openjdk-1.8.0/issues/" \ --with-debug-level=$debugbuild \ --enable-unlimited-crypto \ --with-zlib=system \ +%if %{disable_all_platform} --enable-kae=yes \ +%endif --with-stdc++lib=dynamic \ --with-extra-cflags="$EXTRA_CFLAGS" \ --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \ @@ -1842,6 +1844,7 @@ done # javaCalls.cpp:58 should map to: # http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58 # Using line number 1 might cause build problems. +%ifnarch loongarch64 gdb -q "$JAVA_HOME/bin/java" < - 1:1.8.0.332-b09.2 -- add fix_X509TrustManagerImpl_symantec_distrust.patch - -* Wed Apr 27 2022 kuenking111 - 1:1.8.0.332-b09.1 -- add Fix-compile-and-runtime-failures-for-minimal1-versio.patch +* Mon Jun 20 2022 aoqi - 1:1.8.0.312-b07.12 +- init support of LoongArch64 -* Wed Apr 27 2022 kuenking111 - 1:1.8.0.332-b09.0 -- deleted Support-Git-commit-ID-in-the-SOURCE-field-of-the-release.patch -- deleted 8167014-jdeps-failed-with-Missing-message-warn-skippen-entry.patch -- deleted fix-wrong-commitID-in-release-file.patch -- deleted recreate-.java_pid-file-when-deleted-for-attach-mechanism.patch -- modified update-cacerts-and-VerifyCACerts.java-test.patch -- modified 8194154.patch -- modified add-missing-test-case.patch -- add fix-make-bugs-when-git-and-hg-not-exist.patch - -* Wed Mar 2 2022 kuenking111 - 1:1.8.0.322-b06.4 -- add 8268819-SA-Remove-libthread_db-dependency-on-Linux.patch - -* Thu Mar 1 2022 kuenking111 - 1:1.8.0.322-b06.3 -- modified 8233280-Remove-GCLockerInvokesConcurrent-relative-logic-for-G1.patch - -* Wed Feb 16 2022 kuenking111 - 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 - 1:1.8.0.322-b06.1 -- fix makes failure when gcc version is lower than 8 - -* Thu Feb 10 2022 eapen - 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 - 1:1.8.0.312-b07.11 +- adapted to newst cjc to fix issue with rpm 4.17 * Tue Dec 21 2021 kuenking111 - 1:1.8.0.312-b07.10 - delete stack protection diff --git a/penetration_testing_vulnerability_fix.patch b/penetration_testing_vulnerability_fix.patch deleted file mode 100755 index 1cbabca6975ac5a693d81e9a38be9a6054e3c48b..0000000000000000000000000000000000000000 --- a/penetration_testing_vulnerability_fix.patch +++ /dev/null @@ -1,124 +0,0 @@ -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; - } diff --git a/print-fd-and-file-path-when-a-zip-invalid-loc-header.patch b/print-fd-and-file-path-when-a-zip-invalid-loc-header.patch deleted file mode 100755 index 745d925bdbed42e4529136b75f50a12eb673a74b..0000000000000000000000000000000000000000 --- a/print-fd-and-file-path-when-a-zip-invalid-loc-header.patch +++ /dev/null @@ -1,49 +0,0 @@ -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 - diff --git a/update-cacerts-and-VerifyCACerts.java-test.patch b/update-cacerts-and-VerifyCACerts.java-test.patch index 424d2f552982a1c075673ec11a2466a51f457c0e..682fca9727feea29844678b4707132a61f2a8ef6 100644 --- a/update-cacerts-and-VerifyCACerts.java-test.patch +++ b/update-cacerts-and-VerifyCACerts.java-test.patch @@ -3,8 +3,6 @@ From: zhangyipeng Date: Tue, 20 Apr 2021 10:40:35 +0800 Subject: [PATCH] [Huawei]update cacerts and VerifyCACerts.java test -Offering: Cloud Compiler JDK - Signed-off-by: Wang Kun --- jdk/make/data/cacerts/addtrustexternalca | 32 ----------------- @@ -12,7 +10,6 @@ Signed-off-by: Wang Kun jdk/make/data/cacerts/luxtrustglobalrootca | 28 --------------- jdk/make/data/cacerts/quovadisrootca | 41 ---------------------- jdk/make/data/cacerts/utnuserfirstobjectca | 33 ----------------- - jdk/make/data/cacerts/geotrustglobalca | 27 ------------------- .../sun/security/lib/cacerts/VerifyCACerts.java | 29 ++------------------- 8 files changed, 3 insertions(+), 192 deletions(-) delete mode 100644 jdk/make/data/cacerts/addtrustexternalca @@ -22,7 +19,6 @@ Signed-off-by: Wang Kun delete mode 100644 jdk/make/data/cacerts/thawtepremiumserverca delete mode 100644 jdk/make/data/cacerts/utnuserfirstobjectca delete mode 100644 jdk/make/data/cacerts/verisigntsaca - delete mode 100644 jdk/make/data/cacerts/geotrustglobalca diff --git a/jdk/make/data/cacerts/addtrustexternalca b/jdk/make/data/cacerts/addtrustexternalca deleted file mode 100644 @@ -220,39 +216,6 @@ index 80a0b5c..0000000 -81OtbLUrohKqGU8J2l7nk8aOFAj+8DCAGKCGhU3IfdeLA/5u1fedFqySLKAj5ZyR -Uh+U3xeUc8OzwcFxBSAAeL0TUh2oPs0AH8g= ------END CERTIFICATE----- -diff --git a/jdk/make/data/cacerts/geotrustglobalca b/jdk/make/data/cacerts/geotrustglobalca -deleted file mode 100644 -index 7f8bf9a6..00000000 ---- a/jdk/make/data/cacerts/geotrustglobalca -+++ /dev/null -@@ -1,27 +0,0 @@ --Owner: CN=GeoTrust Global CA, O=GeoTrust Inc., C=US --Issuer: CN=GeoTrust Global CA, O=GeoTrust Inc., C=US --Serial number: 23456 --Valid from: Tue May 21 04:00:00 GMT 2002 until: Sat May 21 04:00:00 GMT 2022 --Signature algorithm name: SHA1withRSA --Subject Public Key Algorithm: 2048-bit RSA key --Version: 3 -------BEGIN CERTIFICATE----- --MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT --MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i --YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG --EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg --R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9 --9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq --fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv --iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU --1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+ --bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW --MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA --ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l --uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn --Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS --tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF --PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un --hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV --5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw== -------END CERTIFICATE----- diff --git a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java index dd107fc..791ddb6 100644 --- a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java @@ -261,14 +224,14 @@ index dd107fc..791ddb6 100644 + File.separator + "security" + File.separator + "cacerts"; // The numbers of certs now. -- private static final int COUNT = 89; -+ private static final int COUNT = 83; +- private static final int COUNT = 91; ++ private static final int COUNT = 86; // 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 -- = "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"; -+ = "2D:04:88:6C:52:53:54:EB:38:2D:BC:E0:AF:B7:82:F4:9E:32:A8:1A:1B:A3:AE:CF:25:CB:C2:F6:0F:4E:E1:20"; +- = "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"; ++ = "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"; // map of cert alias to SHA-256 fingerprint @SuppressWarnings("serial") @@ -285,15 +248,6 @@ index dd107fc..791ddb6 100644 put("baltimorecybertrustca [jdk]", "16:AF:57:A9:F6:76:B0:AB:12:60:95:AA:5E:BA:DE:F2:2A:B3:11:19:D6:44:AC:95:CD:4B:93:DB:F3:F2:6A:EB"); put("digicertglobalrootca [jdk]", -@@ -111,8 +111,6 @@ public class VerifyCACerts { - "7E:37:CB:8B:4C:47:09:0C:AB:36:55:1B:A6:F4:5D:B8:40:68:0F:BA:16:6A:95:2D:B1:00:71:7F:43:05:3F:C2"); - put("digicerthighassuranceevrootca [jdk]", - "74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF"); -- put("geotrustglobalca [jdk]", -- "FF:85:6A:2D:25:1D:CD:88:D3:66:56:F4:50:12:67:98:CF:AB:AA:DE:40:79:9C:72:2D:E4:D2:B5:DB:36:A7:3A"); - put("geotrustprimaryca [jdk]", - "37:D5:10:06:C5:12:EA:AB:62:64:21:F1:EC:8C:92:01:3F:C5:F8:2A:E9:8E:E5:33:EB:46:19:B8:DE:B4:D0:6C"); - put("geotrustprimarycag2 [jdk]", @@ -163,10 +147,6 @@ public class VerifyCACerts { "5D:56:49:9B:E4:D2:E0:8B:CF:CA:D0:8A:3E:38:72:3D:50:50:3B:DE:70:69:48:E4:2F:55:60:30:19:E5:28:AE"); put("letsencryptisrgx1 [jdk]", @@ -321,8 +275,8 @@ index dd107fc..791ddb6 100644 - add("luxtrustglobalrootca [jdk]"); - // Valid until: Wed Mar 17 11:33:33 PDT 2021 - add("quovadisrootca [jdk]"); -- // Valid until: Sat May 21 04:00:00 GMT 2022 -- add("geotrustglobalca [jdk]"); +- // Valid until: Thu Sep 30 14:01:15 GMT 2021 +- add("identrustdstx3 [jdk]"); - } - }; + private static final HashSet EXPIRY_EXC_ENTRIES = new HashSet(); @@ -330,4 +284,5 @@ index dd107fc..791ddb6 100644 // Ninety days in milliseconds private static final long NINETY_DAYS = 7776000000L; -- -2.19.0 +1.8.3.1 +