!543 upgrade to jdk8u412-ga

From: @kuenking111 
Reviewed-by: @alexanderbill 
Signed-off-by: @alexanderbill
This commit is contained in:
openeuler-ci-bot 2024-04-30 07:13:58 +00:00 committed by Gitee
commit 5879cc9974
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
19 changed files with 1798 additions and 49 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

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,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

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

@ -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

@ -166,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}
@ -936,7 +936,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver}
Release: 3
Release: 0
# 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
@ -1185,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
@ -1309,6 +1308,18 @@ 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
#############################################
#
# Upstreamable patches
@ -1828,7 +1839,6 @@ pushd %{top_level_dir_name}
%patch289 -p1
%patch290 -p1
%patch291 -p1
%patch292 -p1
%patch293 -p1
%patch294 -p1
%patch295 -p1
@ -1943,6 +1953,15 @@ 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
%endif
%ifarch loongarch64
@ -2601,6 +2620,33 @@ cjc.mainProgram(arg)
%endif
%changelog
* 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

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]",