!564 sync master to openEuler-22.03-LTS-SP4

From: @eapen 
Reviewed-by: @kuenking111 
Signed-off-by: @kuenking111
This commit is contained in:
openeuler-ci-bot 2024-06-14 08:42:36 +00:00 committed by Gitee
commit dd0eae9e8e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
23 changed files with 119770 additions and 77 deletions

View File

@ -1954,13 +1954,13 @@ index 6413e155b..b59832f73 100644
/*
* @test
- * @bug 7152176
+ * @bug 7152176 8014628
- * @bug 7152176 8168518
+ * @bug 7152176 8168518 8014628
* @summary More krb5 tests
* @library ../../../../java/security/testlibrary/
* @compile -XDignore.symbol.file ReplayCacheTestProc.java
@@ -95,8 +95,13 @@ public class ReplayCacheTestProc {
kdc.addPrincipalRandKey(peer(i));
@@ -126,8 +126,13 @@ public class ReplayCacheTestProc {
kdc.addPrincipalRandKey(service(i));
}
+ // Native lib might not support aes-sha2
@ -1972,8 +1972,8 @@ index 6413e155b..b59832f73 100644
kdc.writeKtab(OneKDC.KTAB);
- KDC.saveConfig(OneKDC.KRB5_CONF, kdc);
if (mode != -1) {
// A special native server to check basic sanity
// User-provided libs
String userLibs = System.getProperty("test.libs");
diff --git a/jdk/test/sun/security/krb5/etype/ETypeOrder.java b/jdk/test/sun/security/krb5/etype/ETypeOrder.java
index 9437b16ed..be36d6372 100644
--- a/jdk/test/sun/security/krb5/etype/ETypeOrder.java

View File

@ -259,7 +259,7 @@ diff --git a/hotspot/src/os/windows/vm/os_windows.inline.hpp b/hotspot/src/os/wi
index 5dac11c90..83c51935d 100644
--- a/hotspot/src/os/windows/vm/os_windows.inline.hpp
+++ b/hotspot/src/os/windows/vm/os_windows.inline.hpp
@@ -96,6 +96,10 @@ inline int os::close(int fd) {
@@ -96,4 +96,8 @@ inline int os::close(int fd) {
return ::close(fd);
}
@ -267,9 +267,7 @@ index 5dac11c90..83c51935d 100644
+ win32::exit_process_or_thread(win32::EPT_PROCESS, num);
+}
+
#define CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED(f) \
os::win32::call_test_func_with_wrapper(f)
#endif // OS_WINDOWS_VM_OS_WINDOWS_INLINE_HPP
diff --git a/hotspot/src/share/vm/runtime/java.cpp b/hotspot/src/share/vm/runtime/java.cpp
index 5b82a7a36..c72a5a766 100644
--- a/hotspot/src/share/vm/runtime/java.cpp

View File

@ -0,0 +1,176 @@
diff --git a/hotspot/src/share/vm/code/codeBlob.cpp b/hotspot/src/share/vm/code/codeBlob.cpp
index aff2aaf0c..83a7659a3 100644
--- a/hotspot/src/share/vm/code/codeBlob.cpp
+++ b/hotspot/src/share/vm/code/codeBlob.cpp
@@ -337,6 +337,9 @@ MethodHandlesAdapterBlob* MethodHandlesAdapterBlob::create(int buffer_size) {
// This means that CodeCacheMinimumFreeSpace is used, if necessary
const bool is_critical = true;
blob = new (size, is_critical) MethodHandlesAdapterBlob(size);
+ if (blob == NULL) {
+ vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "CodeCache: no room for method handle adapter blob");
+ }
}
// Track memory usage statistic after releasing CodeCache_lock
MemoryService::track_code_cache_memory_usage();
diff --git a/hotspot/src/share/vm/prims/methodHandles.cpp b/hotspot/src/share/vm/prims/methodHandles.cpp
index 231d62d29..63f333db2 100644
--- a/hotspot/src/share/vm/prims/methodHandles.cpp
+++ b/hotspot/src/share/vm/prims/methodHandles.cpp
@@ -1469,19 +1469,6 @@ static JNINativeMethod MH_methods[] = {
{CC "invokeExact", CC "([" OBJ ")" OBJ, FN_PTR(MH_invokeExact_UOE)}
};
-/**
- * Helper method to register native methods.
- */
-static bool register_natives(JNIEnv* env, jclass clazz, const JNINativeMethod* methods, jint nMethods) {
- int status = env->RegisterNatives(clazz, methods, nMethods);
- if (status != JNI_OK || env->ExceptionOccurred()) {
- warning("JSR 292 method handle code is mismatched to this JVM. Disabling support.");
- env->ExceptionClear();
- return false;
- }
- return true;
-}
-
/**
* This one function is exported, used by NativeLookup.
*/
@@ -1492,34 +1479,27 @@ JVM_ENTRY(void, JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass MHN_class))
}
assert(!MethodHandles::enabled(), "must not be enabled");
- bool enable_MH = true;
+ if (!EnableInvokeDynamic || SystemDictionary::MethodHandle_klass() == NULL) return;
- jclass MH_class = NULL;
- if (SystemDictionary::MethodHandle_klass() == NULL) {
- enable_MH = false;
- } else {
- oop mirror = SystemDictionary::MethodHandle_klass()->java_mirror();
- MH_class = (jclass) JNIHandles::make_local(env, mirror);
- }
+ oop mirror = SystemDictionary::MethodHandle_klass()->java_mirror();
+ jclass MH_class = (jclass) JNIHandles::make_local(env, mirror);
- if (enable_MH) {
+ {
ThreadToNativeFromVM ttnfv(thread);
- if (enable_MH) {
- enable_MH = register_natives(env, MHN_class, MHN_methods, sizeof(MHN_methods)/sizeof(JNINativeMethod));
- }
- if (enable_MH) {
- enable_MH = register_natives(env, MH_class, MH_methods, sizeof(MH_methods)/sizeof(JNINativeMethod));
- }
+ int status = env->RegisterNatives(MHN_class, MHN_methods, sizeof(MHN_methods)/sizeof(JNINativeMethod));
+ guarantee(status == JNI_OK && !env->ExceptionOccurred(),
+ "register java.lang.invoke.MethodHandleNative natives");
+
+ status = env->RegisterNatives(MH_class, MH_methods, sizeof(MH_methods)/sizeof(JNINativeMethod));
+ guarantee(status == JNI_OK && !env->ExceptionOccurred(),
+ "register java.lang.invoke.MethodHandle natives");
}
if (TraceInvokeDynamic) {
tty->print_cr("MethodHandle support loaded (using LambdaForms)");
}
- if (enable_MH) {
- MethodHandles::generate_adapters();
- MethodHandles::set_enabled(true);
- }
+ MethodHandles::set_enabled(true);
}
JVM_END
diff --git a/hotspot/src/share/vm/runtime/init.cpp b/hotspot/src/share/vm/runtime/init.cpp
index f709db941..71caac72b 100644
--- a/hotspot/src/share/vm/runtime/init.cpp
+++ b/hotspot/src/share/vm/runtime/init.cpp
@@ -136,6 +136,7 @@ jint init_globals() {
}
javaClasses_init(); // must happen after vtable initialization
stubRoutines_init2(); // note: StubRoutines need 2-phase init
+ MethodHandles::generate_adapters();
#if INCLUDE_NMT
// Solaris stack is walkable only after stubRoutines are set up.
diff --git a/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp b/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp
index 7b592d9fa..68ff3afe9 100644
--- a/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp
+++ b/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp
@@ -36,6 +36,7 @@
StubCodeDesc* volatile StubCodeDesc::_list = NULL;
int StubCodeDesc::_count = 0;
+bool StubCodeDesc::_frozen = false;
StubCodeDesc* StubCodeDesc::desc_for(address pc) {
@@ -58,6 +59,10 @@ const char* StubCodeDesc::name_for(address pc) {
return p == NULL ? NULL : p->name();
}
+void StubCodeDesc::freeze() {
+ assert(!_frozen, "repeated freeze operation");
+ _frozen = true;
+}
void StubCodeDesc::print_on(outputStream* st) const {
st->print("%s", group());
diff --git a/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp b/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp
index dc2b5165b..ec157cfec 100644
--- a/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp
+++ b/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp
@@ -37,9 +37,10 @@
// this may have to change if searching becomes too slow.
class StubCodeDesc: public CHeapObj<mtCode> {
- protected:
+ private:
static StubCodeDesc* volatile _list; // the list of all descriptors
static int _count; // length of list
+ static bool _frozen; // determines whether _list modifications are allowed
StubCodeDesc* _next; // the next element in the linked list
const char* _group; // the group to which the stub code belongs
@@ -68,6 +69,7 @@ class StubCodeDesc: public CHeapObj<mtCode> {
static const char* name_for(address pc); // returns the name of the code containing pc or NULL
StubCodeDesc(const char* group, const char* name, address begin) {
+ assert(!_frozen, "no modifications allowed");
assert(name != NULL, "no name specified");
_next = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list);
_group = group;
@@ -78,6 +80,8 @@ class StubCodeDesc: public CHeapObj<mtCode> {
OrderAccess::release_store_ptr(&_list, this);
};
+ static void freeze();
+
const char* group() const { return _group; }
const char* name() const { return _name; }
int index() const { return _index; }
@@ -117,7 +121,7 @@ class StubCodeGenerator: public StackObj {
// later via an address pointing into it.
class StubCodeMark: public StackObj {
- protected:
+ private:
StubCodeGenerator* _cgen;
StubCodeDesc* _cdesc;
diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp
index 50543ac73..95dbb77fb 100644
--- a/hotspot/src/share/vm/runtime/thread.cpp
+++ b/hotspot/src/share/vm/runtime/thread.cpp
@@ -3615,6 +3615,9 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
quicken_jni_functions();
+ // No more stub generation allowed after that point.
+ StubCodeDesc::freeze();
+
// Set flag that basic initialization has completed. Used by exceptions and various
// debug stuff, that does not work until all basic classes have been initialized.
set_init_completed();

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,135 @@
Date: Sat, 30 Mar 2024 07:13:14 +0000
Subject: 8143408: Crash during InstanceKlass unloading when
clearing dependency context
---
.../src/share/vm/code/dependencyContext.cpp | 40 ++++++++++---------
.../src/share/vm/code/dependencyContext.hpp | 4 ++
hotspot/src/share/vm/oops/instanceKlass.cpp | 16 +++++---
3 files changed, 36 insertions(+), 24 deletions(-)
diff --git a/hotspot/src/share/vm/code/dependencyContext.cpp b/hotspot/src/share/vm/code/dependencyContext.cpp
index 5c0af1e3..6cb0c330 100644
--- a/hotspot/src/share/vm/code/dependencyContext.cpp
+++ b/hotspot/src/share/vm/code/dependencyContext.cpp
@@ -218,6 +218,18 @@ int DependencyContext::remove_all_dependents() {
return marked;
}
+void DependencyContext::wipe() {
+ assert_locked_or_safepoint(CodeCache_lock);
+ nmethodBucket* b = dependencies();
+ set_dependencies(NULL);
+ set_has_stale_entries(false);
+ while (b != NULL) {
+ nmethodBucket* next = b->next();
+ delete b;
+ b = next;
+ }
+}
+
#ifndef PRODUCT
void DependencyContext::print_dependent_nmethods(bool verbose) {
int idx = 0;
@@ -271,28 +283,31 @@ class TestDependencyContext {
intptr_t _dependency_context;
+ DependencyContext dependencies() {
+ DependencyContext depContext(&_dependency_context);
+ return depContext;
+ }
+
TestDependencyContext() : _dependency_context(DependencyContext::EMPTY) {
CodeCache_lock->lock_without_safepoint_check();
- DependencyContext depContext(&_dependency_context);
-
_nmethods[0] = reinterpret_cast<nmethod*>(0x8 * 0);
_nmethods[1] = reinterpret_cast<nmethod*>(0x8 * 1);
_nmethods[2] = reinterpret_cast<nmethod*>(0x8 * 2);
- depContext.add_dependent_nmethod(_nmethods[2]);
- depContext.add_dependent_nmethod(_nmethods[1]);
- depContext.add_dependent_nmethod(_nmethods[0]);
+ dependencies().add_dependent_nmethod(_nmethods[2]);
+ dependencies().add_dependent_nmethod(_nmethods[1]);
+ dependencies().add_dependent_nmethod(_nmethods[0]);
}
~TestDependencyContext() {
- wipe();
+ dependencies().wipe();
CodeCache_lock->unlock();
}
static void testRemoveDependentNmethod(int id, bool delete_immediately) {
TestDependencyContext c;
- DependencyContext depContext(&c._dependency_context);
+ DependencyContext depContext = c.dependencies();
assert(!has_stale_entries(depContext), "check");
nmethod* nm = c._nmethods[id];
@@ -327,17 +342,6 @@ class TestDependencyContext {
return ctx.has_stale_entries();
}
- void wipe() {
- DependencyContext ctx(&_dependency_context);
- nmethodBucket* b = ctx.dependencies();
- ctx.set_dependencies(NULL);
- ctx.set_has_stale_entries(false);
- while (b != NULL) {
- nmethodBucket* next = b->next();
- delete b;
- b = next;
- }
- }
};
void TestDependencyContext_test() {
diff --git a/hotspot/src/share/vm/code/dependencyContext.hpp b/hotspot/src/share/vm/code/dependencyContext.hpp
index 533112b8..414ce0c0 100644
--- a/hotspot/src/share/vm/code/dependencyContext.hpp
+++ b/hotspot/src/share/vm/code/dependencyContext.hpp
@@ -143,6 +143,10 @@ class DependencyContext : public StackObj {
void expunge_stale_entries();
+ // Unsafe deallocation of nmethodBuckets. Used in IK::release_C_heap_structures
+ // to clean up the context possibly containing live entries pointing to unloaded nmethods.
+ void wipe();
+
#ifndef PRODUCT
void print_dependent_nmethods(bool verbose);
bool is_dependent_nmethod(nmethod* nm);
diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp
index 1bff1309..df44e531 100644
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp
@@ -2628,12 +2628,16 @@ void InstanceKlass::release_C_heap_structures() {
}
}
- // release dependencies
- {
- DependencyContext ctx(&_dep_context);
- int marked = ctx.remove_all_dependents();
- assert(marked == 0, "all dependencies should be already invalidated");
- }
+ // Release dependencies.
+ // It is desirable to use DC::remove_all_dependents() here, but, unfortunately,
+ // it is not safe (see JDK-8143408). The problem is that the klass dependency
+ // context can contain live dependencies, since there's a race between nmethod &
+ // klass unloading. If the klass is dead when nmethod unloading happens, relevant
+ // dependencies aren't removed from the context associated with the class (see
+ // nmethod::flush_dependencies). It ends up during klass unloading as seemingly
+ // live dependencies pointing to unloaded nmethods and causes a crash in
+ // DC::remove_all_dependents() when it touches unloaded nmethod.
+ dependencies().wipe();
// Deallocate breakpoint records
if (breakpoints() != 0x0) {
--
2.17.1

View File

@ -0,0 +1,144 @@
Date: Sat, 30 Mar 2024 07:12:06 +0000
Subject: 8149343: assert(rp->num_q() == no_of_gc_workers) failed:
sanity
---
.../gc_implementation/g1/g1CollectedHeap.cpp | 20 +++++++++++--------
.../share/vm/memory/referenceProcessor.cpp | 9 +++++++--
.../share/vm/memory/referenceProcessor.hpp | 4 +++-
.../TestDynamicNumberOfGCThreads.java | 8 ++++++++
4 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
index 84d5d4d8..5b156f99 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
@@ -5462,7 +5462,7 @@ public:
_workers(workers),
_active_workers(n_workers)
{
- assert(n_workers > 0, "shouldn't call this otherwise");
+ g1h->ref_processor_stw()->set_active_mt_degree(n_workers);
}
// Executes the given task using concurrent marking worker threads.
@@ -5595,7 +5595,9 @@ public:
_queues(task_queues),
_terminator(workers, _queues),
_n_workers(workers)
- { }
+ {
+ g1h->ref_processor_cm()->set_active_mt_degree(workers);
+ }
void work(uint worker_id) {
ResourceMark rm;
@@ -5760,8 +5762,10 @@ void G1CollectedHeap::process_discovered_references(uint no_of_gc_workers) {
_gc_tracer_stw->gc_id());
} else {
// Parallel reference processing
- assert(rp->num_q() == no_of_gc_workers, "sanity");
- assert(no_of_gc_workers <= rp->max_num_q(), "sanity");
+ assert(no_of_gc_workers <= rp->max_num_q(),
+ err_msg(
+ "Mismatch between the number of GC workers %u and the maximum number of Reference process queues %u",
+ no_of_gc_workers, rp->max_num_q()));
G1STWRefProcTaskExecutor par_task_executor(this, workers(), _task_queues, no_of_gc_workers);
stats = rp->process_discovered_references(&is_alive,
@@ -5796,10 +5800,10 @@ void G1CollectedHeap::enqueue_discovered_references(uint no_of_gc_workers) {
} else {
// Parallel reference enqueueing
- assert(no_of_gc_workers == workers()->active_workers(),
- "Need to reset active workers");
- assert(rp->num_q() == no_of_gc_workers, "sanity");
- assert(no_of_gc_workers <= rp->max_num_q(), "sanity");
+ assert(no_of_gc_workers <= rp->max_num_q(),
+ err_msg(
+ "Mismatch between the number of GC workers %u and the maximum number of Reference process queues %u",
+ no_of_gc_workers, rp->max_num_q()));
G1STWRefProcTaskExecutor par_task_executor(this, workers(), _task_queues, no_of_gc_workers);
rp->enqueue_discovered_references(&par_task_executor);
diff --git a/hotspot/src/share/vm/memory/referenceProcessor.cpp b/hotspot/src/share/vm/memory/referenceProcessor.cpp
index b916e696..823fd49c 100644
--- a/hotspot/src/share/vm/memory/referenceProcessor.cpp
+++ b/hotspot/src/share/vm/memory/referenceProcessor.cpp
@@ -136,7 +136,7 @@ void ReferenceProcessor::verify_no_references_recorded() {
guarantee(!_discovering_refs, "Discovering refs?");
for (uint i = 0; i < _max_num_q * number_of_subclasses_of_ref(); i++) {
guarantee(_discovered_refs[i].is_empty(),
- "Found non-empty discovered list");
+ err_msg("Found non-empty discovered list at %u", i));
}
}
#endif
@@ -780,6 +780,11 @@ private:
bool _clear_referent;
};
+void ReferenceProcessor::set_active_mt_degree(uint v) {
+ _num_q = v;
+ _next_id = 0;
+}
+
// Balances reference queues.
// Move entries from all queues[0, 1, ..., _max_num_q-1] to
// queues[0, 1, ..., _num_q-1] because only the first _num_q
@@ -862,7 +867,7 @@ void ReferenceProcessor::balance_queues(DiscoveredList ref_lists[])
}
#ifdef ASSERT
size_t balanced_total_refs = 0;
- for (uint i = 0; i < _max_num_q; ++i) {
+ for (uint i = 0; i < _num_q; ++i) {
balanced_total_refs += ref_lists[i].length();
if (TraceReferenceGC && PrintGCDetails) {
gclog_or_tty->print("%d ", ref_lists[i].length());
diff --git a/hotspot/src/share/vm/memory/referenceProcessor.hpp b/hotspot/src/share/vm/memory/referenceProcessor.hpp
index 470503ee..da148a6c 100644
--- a/hotspot/src/share/vm/memory/referenceProcessor.hpp
+++ b/hotspot/src/share/vm/memory/referenceProcessor.hpp
@@ -270,7 +270,7 @@ class ReferenceProcessor : public CHeapObj<mtGC> {
uint num_q() { return _num_q; }
uint max_num_q() { return _max_num_q; }
- void set_active_mt_degree(uint v) { _num_q = v; }
+ void set_active_mt_degree(uint v);
DiscoveredList* discovered_refs() { return _discovered_refs; }
@@ -385,9 +385,11 @@ class ReferenceProcessor : public CHeapObj<mtGC> {
// round-robin mod _num_q (not: _not_ mode _max_num_q)
uint next_id() {
uint id = _next_id;
+ assert(!_discovery_is_mt, "Round robin should only be used in serial discovery");
if (++_next_id == _num_q) {
_next_id = 0;
}
+ assert(_next_id < _num_q, err_msg("_next_id %u _num_q %u _max_num_q %u", _next_id, _num_q, _max_num_q));
return id;
}
DiscoveredList* get_discovered_list(ReferenceType rt);
diff --git a/hotspot/test/gc/ergonomics/TestDynamicNumberOfGCThreads.java b/hotspot/test/gc/ergonomics/TestDynamicNumberOfGCThreads.java
index f4a6625a..2005a67e 100644
--- a/hotspot/test/gc/ergonomics/TestDynamicNumberOfGCThreads.java
+++ b/hotspot/test/gc/ergonomics/TestDynamicNumberOfGCThreads.java
@@ -63,6 +63,14 @@ public class TestDynamicNumberOfGCThreads {
System.arraycopy(baseArgs, 0, finalArgs, extraArgs.length, baseArgs.length);
pb_enabled = ProcessTools.createJavaProcessBuilder(finalArgs);
verifyDynamicNumberOfGCThreads(new OutputAnalyzer(pb_enabled.start()));
+
+ // Turn on parallel reference processing
+ String[] parRefProcArg = {"-XX:+ParallelRefProcEnabled", "-XX:-ShowMessageBoxOnError"};
+ String[] parRefArgs = new String[baseArgs.length + parRefProcArg.length];
+ System.arraycopy(parRefProcArg, 0, parRefArgs, 0, parRefProcArg.length);
+ System.arraycopy(baseArgs, 0, parRefArgs, parRefProcArg.length, baseArgs.length);
+ pb_enabled = ProcessTools.createJavaProcessBuilder(parRefArgs);
+ verifyDynamicNumberOfGCThreads(new OutputAnalyzer(pb_enabled.start()));
}
static class GCTest {
--
2.17.1

View File

@ -0,0 +1,24 @@
Date: Sat, 30 Mar 2024 07:11:17 +0000
Subject: 8220175: serviceability/dcmd/framework/VMVersionTest.java
fails with a timeout
---
hotspot/src/os/linux/vm/perfMemory_linux.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hotspot/src/os/linux/vm/perfMemory_linux.cpp b/hotspot/src/os/linux/vm/perfMemory_linux.cpp
index b45032ed..4746531f 100644
--- a/hotspot/src/os/linux/vm/perfMemory_linux.cpp
+++ b/hotspot/src/os/linux/vm/perfMemory_linux.cpp
@@ -659,7 +659,7 @@ static int get_namespace_pid(int vmid) {
if (fp) {
int pid, nspid;
int ret;
- while (!feof(fp)) {
+ while (!feof(fp) && !ferror(fp)) {
ret = fscanf(fp, "NSpid: %d %d", &pid, &nspid);
if (ret == 1) {
break;
--
2.17.1

View File

@ -0,0 +1,21 @@
Subject: 8223485: C2:PhaseIdealLoop::create_new_if_for_predicate() computes wrong IDOM
---
hotspot/src/share/vm/opto/loopPredicate.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hotspot/src/share/vm/opto/loopPredicate.cpp b/hotspot/src/share/vm/opto/loopPredicate.cpp
index a21702e98..b2a3e86eb 100644
--- a/hotspot/src/share/vm/opto/loopPredicate.cpp
+++ b/hotspot/src/share/vm/opto/loopPredicate.cpp
@@ -143,7 +143,7 @@ ProjNode* PhaseIdealLoop::create_new_if_for_predicate(ProjNode* cont_proj, Node*
// When called from beautify_loops() idom is not constructed yet.
if (_idom != NULL) {
Node* ridom = idom(rgn);
- Node* nrdom = dom_lca(ridom, new_iff);
+ Node* nrdom = dom_lca_internal(ridom, new_iff);
set_idom(rgn, nrdom, dom_depth(rgn));
}
--
2.19.1

View File

@ -0,0 +1,38 @@
Subject: 8223486: split-if update_uses accesses stale idom data
---
hotspot/src/share/vm/opto/split_if.cpp | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/hotspot/src/share/vm/opto/split_if.cpp b/hotspot/src/share/vm/opto/split_if.cpp
index 94d680c11..636af191d 100644
--- a/hotspot/src/share/vm/opto/split_if.cpp
+++ b/hotspot/src/share/vm/opto/split_if.cpp
@@ -486,7 +486,9 @@ void PhaseIdealLoop::do_split_if( Node *iff ) {
}
_igvn.remove_dead_node(new_iff);
// Lazy replace IDOM info with the region's dominator
- lazy_replace( iff, region_dom );
+ lazy_replace(iff, region_dom);
+ lazy_update(region, region_dom); // idom must be update before handle_uses
+ region->set_req(0, NULL); // Break the self-cycle. Required for lazy_update to work on region
// Now make the original merge point go dead, by handling all its uses.
small_cache region_cache;
@@ -529,13 +531,8 @@ void PhaseIdealLoop::do_split_if( Node *iff ) {
--k;
} // End of while merge point has phis
- assert(region->outcnt() == 1, "Only self reference should remain"); // Just Self on the Region
- region->set_req(0, NULL); // Break the self-cycle
+ _igvn.remove_dead_node(region);
- // Any leftover bits in the splitting block must not have depended on local
- // Phi inputs (these have already been split-up). Hence it's safe to hoist
- // these guys to the dominating point.
- lazy_replace( region, region_dom );
#ifndef PRODUCT
if( VerifyLoopOptimizations ) verify();
#endif
--
2.19.1

View File

@ -0,0 +1,60 @@
Subject: 8256488: Use ldpq/stpq instead of ld4/st4 for small copies in StubGenerator::copy_memory
--
.../cpu/aarch64/vm/stubGenerator_aarch64.cpp | 30 ++++++++++++++++---
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
index f61028d5007..cf66df296e4 100644
--- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
@@ -1149,10 +1149,10 @@ class StubGenerator: public StubCodeGenerator {
Register count, Register tmp, int step) {
copy_direction direction = step < 0 ? copy_backwards : copy_forwards;
bool is_backwards = step < 0;
- int granularity = uabs(step);
+ unsigned granularity = uabs(step);
const Register t0 = r3, t1 = r4;
- // <= 96 bytes do inline. Direction doesn't matter because we always
+ // <= 80 (or 96 for SIMD) bytes do inline. Direction doesn't matter because we always
// load all the data before writing anything
Label copy4, copy8, copy16, copy32, copy80, copy128, copy_big, finish;
const Register t2 = r5, t3 = r6, t4 = r7, t5 = r8;
@@ -1207,9 +1207,31 @@ class StubGenerator: public StubCodeGenerator {
// (96 bytes if SIMD because we do 32 byes per instruction)
__ bind(copy80);
if (UseSIMDForMemoryOps) {
- __ ld4(v0, v1, v2, v3, __ T16B, Address(s, 0));
+ __ ldpq(v0, v1, Address(s, 0));
+ __ ldpq(v2, v3, Address(s, 32));
+ // Unaligned pointers can be an issue for copying.
+ // The issue has more chances to happen when granularity of data is
+ // less than 4(sizeof(jint)). Pointers for arrays of jint are at least
+ // 4 byte aligned. Pointers for arrays of jlong are 8 byte aligned.
+ // The most performance drop has been seen for the range 65-80 bytes.
+ // For such cases using the pair of ldp/stp instead of the third pair of
+ // ldpq/stpq fixes the performance issue.
+ if (granularity < sizeof (jint)) {
+ Label copy96;
+ __ cmp(count, u1(80/granularity));
+ __ br(Assembler::HI, copy96);
+ __ ldp(t0, t1, Address(send, -16));
+
+ __ stpq(v0, v1, Address(d, 0));
+ __ stpq(v2, v3, Address(d, 32));
+ __ stp(t0, t1, Address(dend, -16));
+ __ b(finish);
+
+ __ bind(copy96);
+ }
__ ldpq(v4, v5, Address(send, -32));
- __ st4(v0, v1, v2, v3, __ T16B, Address(d, 0));
+ __ stpq(v0, v1, Address(d, 0));
+ __ stpq(v2, v3, Address(d, 32));
__ stpq(v4, v5, Address(dend, -32));
} else {
__ ldp(t0, t1, Address(s, 0));
--
2.19.1

View File

@ -0,0 +1,29 @@
DependencyContext::mark_dependent_nmethods crash in Dynamic cds mode
---
hotspot/src/share/vm/oops/instanceKlass.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp
index df44e5319..833cf9afe 100644
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp
@@ -2462,8 +2462,6 @@ void InstanceKlass::remove_unshareable_info() {
constants()->remove_unshareable_info();
- assert(_dep_context == DependencyContext::EMPTY, "dependency context is not shareable");
-
for (int i = 0; i < methods()->length(); i++) {
Method* m = methods()->at(i);
m->remove_unshareable_info();
@@ -2487,6 +2485,7 @@ void InstanceKlass::remove_unshareable_info() {
// do array classes also.
array_klasses_do(remove_unshareable_in_class);
// These are not allocated from metaspace. They are safe to set to NULL.
+ _dep_context = DependencyContext::EMPTY;
_member_names = NULL;
_osr_nmethods_head = NULL;
_init_thread = NULL;
--
2.22.0

View File

@ -0,0 +1,41 @@
Subject: fix GCC 12 fails to compile AArch64 due to -Wstringop-overflow
---
hotspot/make/linux/makefiles/gcc.make | 2 +-
hotspot/src/share/vm/opto/type.cpp | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/hotspot/make/linux/makefiles/gcc.make b/hotspot/make/linux/makefiles/gcc.make
index 7dde7f096..d122f0eae 100644
--- a/hotspot/make/linux/makefiles/gcc.make
+++ b/hotspot/make/linux/makefiles/gcc.make
@@ -212,7 +212,7 @@ ifeq ($(USE_CLANG), true)
WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
endif
-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wreturn-type
+WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wreturn-type -Wno-stringop-overflow
ifeq ($(USE_CLANG),)
# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
diff --git a/hotspot/src/share/vm/opto/type.cpp b/hotspot/src/share/vm/opto/type.cpp
index 58572f137..92d4e6b70 100644
--- a/hotspot/src/share/vm/opto/type.cpp
+++ b/hotspot/src/share/vm/opto/type.cpp
@@ -2553,8 +2553,11 @@ TypeOopPtr::TypeOopPtr(TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int o
_offset >= InstanceMirrorKlass::offset_of_static_fields()) {
// Static fields
assert(o != NULL, "must be constant");
- ciInstanceKlass* k = o->as_instance()->java_lang_Class_klass()->as_instance_klass();
- ciField* field = k->get_field_by_offset(_offset, true);
+ ciField* field = NULL;
+ if (o != NULL) {
+ ciInstanceKlass* k = o->as_instance()->java_lang_Class_klass()->as_instance_klass();
+ field = k->get_field_by_offset(_offset, true);
+ }
assert(field != NULL, "missing field");
BasicType basic_elem_type = field->layout_type();
_is_ptr_to_narrowoop = UseCompressedOops && (basic_elem_type == T_OBJECT ||
--
2.22.0

117691
LoongArch64-support.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -91,7 +91,7 @@ index 00000000..9b614024
--- /dev/null
+++ b/version.txt
@@ -0,0 +1 @@
+8.402.8.0.13
+8.412.8.0.13
--
2.23.0

View File

@ -33,12 +33,12 @@ index 1aab2b30..662b002a 100644
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4
index 51df988f..1cce0e4f 100644
index f54942ac..790e28aa 100644
--- a/common/autoconf/platform.m4
+++ b/common/autoconf/platform.m4
@@ -96,6 +96,12 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
@@ -102,6 +102,12 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
VAR_CPU_ENDIAN=little
;;
+ riscv64)
+ VAR_CPU=riscv64
@ -49,19 +49,19 @@ index 51df988f..1cce0e4f 100644
*)
AC_MSG_ERROR([unsupported cpu $1])
;;
@@ -381,6 +387,7 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
@@ -387,6 +393,7 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
sparc*) ZERO_ARCHDEF=SPARC ;;
x86_64*) ZERO_ARCHDEF=AMD64 ;;
x86) ZERO_ARCHDEF=IA32 ;;
+ riscv*) ZERO_ARCHDEF=RISCV ;;
+ riscv*) ZERO_ARCHDEF=RISCV ;;
*) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
esac
AC_SUBST(ZERO_ARCHDEF)
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
index 2d3880b3..6ec35ec1 100644
index 54cfcdd1..88eb8acd 100644
--- a/hotspot/src/os/linux/vm/os_linux.cpp
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
@@ -367,7 +367,7 @@ void os::init_system_properties_values() {
@@ -363,7 +363,7 @@ void os::init_system_properties_values() {
// 1: ...
// ...
// 7: The default directories, normally /lib and /usr/lib.
@ -70,38 +70,38 @@ index 2d3880b3..6ec35ec1 100644
#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
#else
#define DEFAULT_LIBPATH "/lib:/usr/lib"
@@ -1953,6 +1953,9 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
@@ -1949,6 +1949,9 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
#ifndef EM_AARCH64
#define EM_AARCH64 183 /* ARM AARCH64 */
#endif
+ #ifndef EM_RISCV
+ #define EM_RISCV 243 /* RISC-V */
+ #endif
static const arch_t arch_array[]={
{EM_386, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"},
#ifndef EM_LOONGARCH
#define EM_LOONGARCH 258 /* LoongArch */
#endif
@@ -1976,6 +1979,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
{EM_PARISC, EM_PARISC, ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"},
{EM_68K, EM_68K, ELFCLASS32, ELFDATA2MSB, (char*)"M68k"},
{EM_AARCH64, EM_AARCH64, ELFCLASS64, ELFDATA2LSB, (char*)"AARCH64"},
{EM_LOONGARCH, EM_LOONGARCH, ELFCLASS64, ELFDATA2LSB, (char*)"LoongArch"},
+ {EM_RISCV, EM_RISCV, ELFCLASSNONE, ELFDATA2MSB, (char*)"RISCV"},
};
#if (defined IA32)
@@ -2008,9 +2012,11 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
static Elf32_Half running_arch_code=EM_68K;
#elif (defined AARCH64)
@@ -2010,9 +2014,11 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
static Elf32_Half running_arch_code=EM_AARCH64;
#elif (defined LOONGARCH)
static Elf32_Half running_arch_code=EM_LOONGARCH;
+ #elif (defined RISCV)
+ static Elf32_Half running_arch_code=EM_RISCV;
#else
#error Method os::dll_load requires that one of following is defined:\
- IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64
+ IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64, RISCV
- IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64, LOONGARCH
+ IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64, LOONGARCH, RISCV
#endif
// Identify compatability class for VM's architecture and library's architecture
@@ -2043,10 +2049,12 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
@@ -2045,10 +2051,12 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
}
#ifndef S390
@ -114,5 +114,3 @@ index 2d3880b3..6ec35ec1 100644
#endif // !S390
if (lib_arch.compat_class != arch_array[running_arch_index].compat_class) {
--
2.17.1

View File

@ -0,0 +1,45 @@
Subject: Fix GCC 12 build jdk8 fastdebug error
---
.../vm/gc_implementation/g1/concurrentMark.cpp | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
index df901a52d..1347a7e16 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
@@ -2914,13 +2914,23 @@ void ConcurrentMark::print_reachable(const char* str,
return;
}
- char file_name[JVM_MAXPATHLEN];
+ // fix gcc 12 build jdk8 fastdebug compiler error:
+ // directive writing up to 4096 bytes into a region of size between 0 and 4096 [-Werror=format-overflow=]
+ // about old code:
+ // char file_name[JVM_MAXPATHLEN];
+ // Leave L 2911~2915 code unchanged, so not affect original logic.
+ char *file_name = (char *) NEW_C_HEAP_ARRAY(char, strlen(G1PrintReachableBaseFile) + 2 + strlen(str), mtGC);
+ if (NULL == file_name) {
+ gclog_or_tty->print_cr(" #### error: NEW_C_HEAP_ARRAY failed.");
+ return;
+ }
sprintf(file_name, "%s.%s", G1PrintReachableBaseFile, str);
gclog_or_tty->print_cr(" dumping to file %s", file_name);
fileStream fout(file_name);
if (!fout.is_open()) {
gclog_or_tty->print_cr(" #### error: could not open file");
+ FREE_C_HEAP_ARRAY(char, file_name, mtGC);
return;
}
@@ -2936,6 +2946,7 @@ void ConcurrentMark::print_reachable(const char* str,
gclog_or_tty->print_cr(" done");
gclog_or_tty->flush();
+ FREE_C_HEAP_ARRAY(char, file_name, mtGC);
}
#endif // PRODUCT
--
2.22.0

View File

@ -1,23 +0,0 @@
From 102b398cc59e95cb4f5327b9c8fc9a3c5594acce Mon Sep 17 00:00:00 2001
From: eapen <zhangyipeng7@huawei.com>
Date: Tue, 29 Nov 2022 09:23:01 +0800
Subject: [PATCH 29/33] I68TO2: fix the length value of ciBlock in ciMethodBlocks.cpp
---
hotspot/src/share/vm/ci/ciMethodBlocks.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hotspot/src/share/vm/ci/ciMethodBlocks.cpp b/hotspot/src/share/vm/ci/ciMethodBlocks.cpp
index 614e75d..3ce828e 100644
--- a/hotspot/src/share/vm/ci/ciMethodBlocks.cpp
+++ b/hotspot/src/share/vm/ci/ciMethodBlocks.cpp
@@ -372,7 +372,7 @@ static const char *flagnames[] = {
void ciBlock::dump() {
tty->print(" [%d .. %d), {", _start_bci, _limit_bci);
- for (int i = 0; i < 8; i++) {
+ for (int i = 0; i < 7; i++) {
if ((_flags & (1 << i)) != 0) {
tty->print(" %s", flagnames[i]);
}
--
1.8.3.1

View File

@ -40,16 +40,16 @@ index 54e1bfa0d..c1423dc5b 100644
// The numbers of certs now.
- private static final int COUNT = 83;
+ private static final int COUNT = 100;
+ private static final int COUNT = 102;
// 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";
+ = "30:6A:9A:00:BF:95:59:BC:FB:4C:ED:89:F6:DB:50:25:8D:F6:D6:F0:BC:C8:FC:A3:E6:AF:62:7A:FD:F6:89:51";
+ = "2F:92:41:50:3B:2B:F2:AD:86:54:AB:2B:D4:AB:A2:92:8B:B6:1C:2B:58:A1:E3:1A:CE:43:43:FB:3E:94:2E:7E";
// map of cert alias to SHA-256 fingerprint
@SuppressWarnings("serial")
private static final Map<String, String> FINGERPRINT_MAP
@@ -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]",

View File

@ -6480,8 +6480,8 @@ index 9733e17c..d1b13922 100644
--- a/jdk/test/TEST.groups
+++ b/jdk/test/TEST.groups
@@ -180,6 +180,9 @@ jdk_security = \
jdk_security_infra = \
security/infra/java/security/cert/CertPathValidator/certification
security/infra/java/security/cert/CertPathValidator/certification \
sun/security/lib/cacerts
+jdk_kae_security = \
+ org/openeuler/security/openssl

View File

@ -54,9 +54,9 @@
%global aarch64 aarch64
%global riscv64 riscv64
%global ppc64le ppc64le
%global jit_arches x86_64 %{aarch64} ppc64le
%global sa_arches x86_64 %{aarch64}
%global jfr_arches x86_64 %{aarch64} ppc64le
%global jit_arches x86_64 %{aarch64} loongarch64 ppc64le
%global sa_arches x86_64 %{aarch64} loongarch64
%global jfr_arches x86_64 %{aarch64} loongarch64 ppc64le
# By default, we build a debug build during main build on JIT architectures
%global include_debug_build 1
@ -121,6 +121,12 @@
%global archinstall riscv64
%global stapinstall %{nil}
%endif
%ifarch loongarch64
%global archinstall loongarch64
%global stapinstall loongarch64
%endif
%ifarch ppc64le
%global archinstall ppc64le
%global stapinstall powerpc64le
@ -160,13 +166,13 @@
%global origin_nice OpenJDK
%global top_level_dir_name %{origin}
%global repo jdk8u
%global revision jdk8u402-b06
%global revision jdk8u412-b08
%global full_revision %{repo}-%{revision}
# Define IcedTea version used for SystemTap tapsets and desktop files
%global icedteaver 3.15.0
%global updatever 402
%global buildver b06
%global updatever 412
%global buildver b08
# priority must be 7 digits in total. The expression is workarounding tip
%global priority 1800%{updatever}
@ -930,7 +936,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver}
Release: 1
Release: 5
# 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
@ -1179,7 +1185,6 @@ Patch288: 8200720-Print-additional-information-in-thread-dump-.patch
Patch289: support-numactl-for-hadoop-yarn.patch
Patch290: 8232069-enable-shutdown-UseCompressedClassPointers-U.patch
Patch291: 8065402-G1-does-not-expand-marking-stack-when-mark-s.patch
Patch292: fix-the-length-value-of-ciBlock-in-ciMethodBlocks.cp.patch
Patch293: 8140594-Various-minor-code-improvements-compiler.patch
Patch294: Fix-the-crash-that-occurs-when-the-process-exits-due.patch
Patch295: Fix-AsyncGCLog-s-content-consistent-bug.patch
@ -1303,6 +1308,20 @@ Patch416: 8260923-Add-more-tests-for-SSLSocket-input-output-sh.patch
Patch417: 8057967-CallSite-dependency-tracking-scales-devastat.patch
Patch418: 8079205-CallSite-dependency-tracking-is-broken-after.patch
#402
Patch421: 8220175-serviceability-dcmd-framework-VMVersionTest..patch
Patch422: 8149343-assert-rp-num_q-no_of_gc_workers-failed-sani.patch
Patch423: 8139595-MethodHandles-remove_dependent_nmethod-is-no.patch
Patch424: 8143408-Crash-during-InstanceKlass-unloading-when-cl.patch
Patch425: GCC-12-reports-some-compiler-warnings.patch
Patch426: fix-GCC-12-build-jdk8-fastdebug-error.patch
Patch427: 8223485-C2-PhaseIdealLoop-create_new_if_for_predicat.patch
Patch428: 8223486-split-if-update_uses-accesses-stale-idom-dat.patch
#412
Patch429: 8256488-Use-ldpq-stpq-instead-of-ld4-st4-for-small-c.patch
Patch430: DependencyContext-mark_dependent_nmethods-crash-in-Dynamic-cds-mode.patch
Patch431: 8138922-StubCodeDesc-constructor-publishes-partially-constructed.patch
#############################################
#
# Upstreamable patches
@ -1352,6 +1371,14 @@ Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
# riscv64 support
Patch2000: add-riscv64-support.patch
############################################
#
# LoongArch64 specific patches
#
############################################
Patch4000: LoongArch64-support.patch
#############################################
#
# Dependencies
@ -1403,6 +1430,9 @@ BuildRequires: nss-softokn-freebl-devel >= 3.16.1
BuildRequires: systemtap-sdt-devel
%endif
# Didn't pick this up while building
BuildRequires: libffi-devel
# this is always built, also during debug-only build
# when it is built in debug-only this package is just placeholder
%{java_rpo %{nil}}
@ -1640,8 +1670,8 @@ ln -s %{top_level_dir_name} jdk8
pushd %{top_level_dir_name}
# OpenJDK patches
%ifnarch loongarch64 ppc64le
%ifnarch ppc64le
%patch8 -p1
%patch10 -p1
%patch18 -p1
@ -1811,7 +1841,6 @@ pushd %{top_level_dir_name}
%patch289 -p1
%patch290 -p1
%patch291 -p1
%patch292 -p1
%patch293 -p1
%patch294 -p1
%patch295 -p1
@ -1926,11 +1955,26 @@ pushd %{top_level_dir_name}
%patch416 -p1
%patch417 -p1
%patch418 -p1
%patch421 -p1
%patch422 -p1
%patch423 -p1
%patch424 -p1
%patch425 -p1
%patch426 -p1
%patch427 -p1
%patch428 -p1
%patch429 -p1
%patch430 -p1
%patch431 -p1
%endif
%ifarch loongarch64
%patch4000 -p1
%endif
%ifarch riscv64
%patch2000 -p1
%endif
%endif
popd
# System library fixes
@ -2027,6 +2071,9 @@ fi
# Variable used in hs_err hook on build failures
top_srcdir_abs_path=$(pwd)/%{top_level_dir_name}
ARCH=$(uname -m)
BOOTJDKPATH=/usr/lib/jvm/java-%{majorver}-openjdk
mkdir -p %{buildoutputdir -- $suffix}
pushd %{buildoutputdir -- $suffix}
@ -2046,7 +2093,7 @@ bash ${top_srcdir_abs_path}/configure \
--with-milestone="fcs" \
--with-update-version=%{updatever} \
--with-build-number=%{buildver} \
%ifnarch ppc64le
%ifnarch loongarch64 ppc64le
--with-company-name="Bisheng" \
--with-vendor-name="Bisheng" \
%endif
@ -2176,6 +2223,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" <<EOF | tee gdb.out
handle SIGSEGV pass nostop noprint
handle SIGILL pass nostop noprint
@ -2187,6 +2235,7 @@ quit
end
run -version
EOF
%endif
#grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
# Check src.zip has all sources. See RHBZ#1130490
@ -2575,8 +2624,55 @@ cjc.mainProgram(arg)
%endif
%changelog
* Wed Mar 6 2024 jiahua.yu <jiahua.yu@shingroup.cn> - 1:1.8.0.402-b06.1
- init support for arch ppc64le
* Thu May 23 2024 Dingli Zhang <dingli@iscas.ac.cn> -1:1.8.0.412-b08.5
- Fix build on riscv64 in prep stage
* Wed May 15 2024 songliyang <songliyang@kylinos.cn> -1:1.8.0.412-b08.4
- fix LoongArch64-support.patch error that apply patch on loongarch64 in prep stage
- fix loongson vendor error
* Tue May 7 2024 kuenking111 <wangkun49@huawei.com> -1:1.8.0.412-b08.3
- add DependencyContext-mark_dependent_nmethods-crash-in-Dynamic-cds-mode.patch
- add 8138922-StubCodeDesc-constructor-publishes-partially-constructed.patch
* Tue May 07 2024 zhangxianting <zhangxianting@uniontech.com> -1:1.8.0.412-b08.2
- fix LoongArch64-support.patch for prep error
* Sun Apr 28 2024 Autistic_boyya <wangzhongyi7@huawei.com> -1:1.8.0.412-b08.1
- add 8256488-Use-ldpq-stpq-instead-of-ld4-st4-for-small-c.patch
* Thu Apr 18 2024 Autistic_boyya <wangzhongyi7@huawei.com> -1:1.8.0.412-b08.0
- del 8322725-tz-Update-Timezone-Data-to-2023d.patch
- del 8325150-tz-Update-Timezone-Data-to-2024a.patch
- del fix-the-length-value-of-ciBlock-in-ciMethodBlocks.cp.patch
- modified 8014628-Support-AES-Encryption-with-HMAC-SHA2-for-Ke.patch
- modified 8057743-process-Synchronize-exiting-of-threads-and-p.patch
- modified add-missing-test-case.patch
- modified fix_X509TrustManagerImpl_symantec_distrust.patch
- modified kae-phase2.patch
- modified support-numactl-for-hadoop-yarn.patch
- modified update-cacerts-and-VerifyCACerts.java-test.patch
* Tue Apr 2 2024 kuenking111 <wangkun49@huawei.com> - 1:1.8.0.402-b06.5
- add fix-GCC-12-build-jdk8-fastdebug-error.patch
* Sat Mar 30 2024 Benshuai5D <benshuai5d@163.com> - 1:1.8.0.402-b06.4
- add 8322725-tz-Update-Timezone-Data-to-2023d.patch
- add 8325150-tz-Update-Timezone-Data-to-2024a.patch
- add 8220175-serviceability-dcmd-framework-VMVersionTest..patch
- add 8149343-assert-rp-num_q-no_of_gc_workers-failed-sani.patch
- add 8139595-MethodHandles-remove_dependent_nmethod-is-no.patch
- add 8143408-Crash-during-InstanceKlass-unloading-when-cl.patch
- add GCC-12-reports-some-compiler-warnings.patch
* Tue Mar 12 2024 jiahua.yu <jiahua.yu@shingroup.cn> - 1:1.8.0.402-b06.3
- Init support for arch ppc64le
* Mon Feb 26 2024 misaka00251 <liuxin@iscas.ac.cn> - 1:1.8.0.402-b06.2
- Fix build on riscv64
* Wed Jan 31 2024 Leslie Zhai <zhaixiang@loongson.cn> - 1:1.8.0.402-b06.1
- Init support of LoogArch64
* Wed Jan 17 2024 Autistic_boyya <wangzhongyi7@huawei.com> - 1:1.8.0.402-b06.0
- modified 0019-8040213-C2-does-not-put-all-modified-nodes-on-IGVN-w.patch

View File

@ -353,7 +353,7 @@ index dde3975..dd40c2c 100644
+ argv_for_execvp = (const char**)raw_argv;
+}
+
_JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, void *args) {
static jint JNI_CreateJavaVM_inner(JavaVM **vm, void **penv, void *args) {
#ifndef USDT2
HS_DTRACE_PROBE3(hotspot_jni, CreateJavaVM__entry, vm, penv, args);
diff --git a/hotspot/src/share/vm/prims/jni.h b/hotspot/src/share/vm/prims/jni.h

View File

@ -257,17 +257,17 @@ index dd107fc..791ddb6 100644
+ File.separator + "security" + File.separator + "cacerts";
// The numbers of certs now.
- private static final int COUNT = 106;
- private static final int COUNT = 108;
+ private static final int COUNT = 83;
// 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
- = "61:5F:6D:C5:9C:A3:8A:65:3F:CB:F9:F5:26:04:23:F4:53:A6:8C:B3:8B:2B:0A:F0:66:7D:9E:67:B9:4D:AC:B7";
- = "81:D4:84:F6:92:78:A4:82:25:06:DC:42:25:C9:5D:6C:63:E4:99:CE:BC:ED:66:B3:8C:BA:E6:BA:6B:34:0F:01";
+ = "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";
// map of cert alias to SHA-256 fingerprint
@SuppressWarnings("serial")
private static final Map<String, String> FINGERPRINT_MAP
@@ -93,12 +93,6 @@ public class VerifyCACerts {
"E7:93:C9:B0:2F:D8:AA:13:E2:1C:31:22:8A:CC:B0:81:19:64:3B:74:9C:89:89:64:B1:74:6D:46:C3:D4:CB:D2");
put("usertrusteccca [jdk]",