Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
af09859
8311644: Server should not send bad_certificate alert when the client…
GoeLin Aug 13, 2025
50dbf7c
8327753: Convert javax/swing/JOptionPane/8024926/bug8024926.java appl…
GoeLin Aug 13, 2025
a05cf4d
8328000: Convert /java/awt/im/8154816/bug8154816.java applet test to …
GoeLin Aug 13, 2025
7cb31f3
8328012: Convert InputMethod (/java/awt/im) applet tests to main
GoeLin Aug 13, 2025
6dae810
8328378: Convert java/awt/FileDialog/FileDialogForDirectories test to…
GoeLin Aug 13, 2025
5772eee
8328382: Convert java/awt/FileDialog/FileDialogForPackages test to main
GoeLin Aug 13, 2025
58059ee
8079786: [macosx] Test java/awt/Frame/DisposeParentGC/DisposeParentGC…
GoeLin Aug 13, 2025
caec079
8334457: Test javax/swing/JTabbedPane/bug4666224.java fail on macOS w…
GoeLin Aug 13, 2025
16e6e2a
8350456: Test javax/crypto/CryptoPermissions/InconsistentEntries.java…
GoeLin Aug 13, 2025
03ab6e4
8326705: Test CertMsgCheck.java fails to find alert certificate_required
GoeLin Aug 13, 2025
b34a3ee
8355779: When no "signature_algorithms_cert" extension is present we …
GoeLin Aug 13, 2025
c730336
8350830: Values converted incorrectly when reading TLS session tickets
GoeLin Aug 13, 2025
02a45b0
8357253: Test test/jdk/sun/security/ssl/SSLSessionImpl/ResumeClientTL…
GoeLin Aug 13, 2025
d2dfbd8
8341178: TypeRawPtr::add_offset may be "miscompiled" due to UB
Aug 13, 2025
e07ae66
8336702: C2 compilation fails with "all memory state should have been…
Aug 13, 2025
13cb6a4
8338482: com/sun/jdi/ThreadMemoryLeakTest.java requires that compress…
GoeLin Aug 14, 2025
93c3567
8335577: runtime/cds/appcds/TestParallelGCWithCDS.java still fails wi…
GoeLin Aug 14, 2025
ee25441
8353847: Remove extra args to System.out.printf in open/test/jdk/java…
GoeLin Aug 14, 2025
8b80b72
8346255: java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.jav…
GoeLin Aug 14, 2025
fe828df
8341370: Test java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometime…
GoeLin Aug 14, 2025
44d183c
8357285: JSR166 Test case testShutdownNow_delayedTasks failed
GoeLin Aug 14, 2025
31915b8
8185429: [macos] After a modal dialog is closed, no window becomes ac…
Aug 14, 2025
000a277
8352677: Opensource JMenu tests - series2
Aug 14, 2025
c984e22
8348135: Fix couple of problem listing entries in test/hotspot/jtreg/…
GoeLin Aug 15, 2025
7d76cb7
8352860: Open source events tests batch0
Aug 15, 2025
491b574
8353126: Open source events tests batch1
Aug 15, 2025
3949aae
8325397: sun/java2d/Disposer/TestDisposerRace.java fails in linux-aar…
GoeLin Aug 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/hotspot/share/opto/loopnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,14 +701,24 @@ SafePointNode* PhaseIdealLoop::find_safepoint(Node* back_control, Node* x, Ideal

// We can only use that safepoint if there's no side effect between the backedge and the safepoint.

// mm is used for book keeping
// mm is the memory state at the safepoint (when it's a MergeMem)
// no_side_effect_since_safepoint() goes over the memory state at the backedge. It resets the mm input for each
// component of the memory state it encounters so it points to the base memory. Once no_side_effect_since_safepoint()
// is done, if no side effect after the safepoint was found, mm should transform to the base memory: the states at
// the backedge and safepoint are the same so all components of the memory state at the safepoint should have been
// reset.
MergeMemNode* mm = nullptr;
#ifdef ASSERT
if (mem->is_MergeMem()) {
mm = mem->clone()->as_MergeMem();
_igvn._worklist.push(mm);
for (MergeMemStream mms(mem->as_MergeMem()); mms.next_non_empty(); ) {
if (mms.alias_idx() != Compile::AliasIdxBot && loop != get_loop(ctrl_or_self(mms.memory()))) {
// Loop invariant memory state won't be reset by no_side_effect_since_safepoint(). Do it here.
// Escape Analysis can add state to mm that it doesn't add to the backedge memory Phis, breaking verification
// code that relies on mm. Clear that extra state here.
if (mms.alias_idx() != Compile::AliasIdxBot &&
(loop != get_loop(ctrl_or_self(mms.memory())) ||
(mms.adr_type()->isa_oop_ptr() && mms.adr_type()->is_known_instance()))) {
mm->set_memory_at(mms.alias_idx(), mem->as_MergeMem()->base_memory());
}
}
Expand Down
20 changes: 13 additions & 7 deletions src/hotspot/share/opto/type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3125,8 +3125,8 @@ const TypeRawPtr *TypeRawPtr::make( enum PTR ptr ) {
return (TypeRawPtr*)(new TypeRawPtr(ptr,0))->hashcons();
}

const TypeRawPtr *TypeRawPtr::make( address bits ) {
assert( bits, "Use TypePtr for null" );
const TypeRawPtr *TypeRawPtr::make(address bits) {
assert(bits != nullptr, "Use TypePtr for null");
return (TypeRawPtr*)(new TypeRawPtr(Constant,bits))->hashcons();
}

Expand Down Expand Up @@ -3215,15 +3215,21 @@ const TypePtr* TypeRawPtr::add_offset(intptr_t offset) const {
case TypePtr::BotPTR:
case TypePtr::NotNull:
return this;
case TypePtr::Null:
case TypePtr::Constant: {
address bits = _bits+offset;
if ( bits == 0 ) return TypePtr::NULL_PTR;
return make( bits );
uintptr_t bits = (uintptr_t)_bits;
uintptr_t sum = bits + offset;
if (( offset < 0 )
? ( sum > bits ) // Underflow?
: ( sum < bits )) { // Overflow?
return BOTTOM;
} else if ( sum == 0 ) {
return TypePtr::NULL_PTR;
} else {
return make( (address)sum );
}
}
default: ShouldNotReachHere();
}
return nullptr; // Lint noise
}

//------------------------------eq---------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,40 @@ private static void signalNextIfShared(Node h) {
}
}

/**
* Repeatedly invokes acquire, if its execution throws an Error or a Runtime Exception,
* using an Unsafe.park-based backoff
* @param node which to reacquire
* @param arg the acquire argument
*/
private final void reacquire(Node node, long arg) {
try {
acquire(node, arg, false, false, false, 0L);
} catch (Error | RuntimeException firstEx) {
// While we currently do not emit an JFR events in this situation, mainly
// because the conditions under which this happens are such that it
// cannot be presumed to be possible to actually allocate an event, and
// using a preconstructed one would have limited value in serviceability.
// Having said that, the following place would be the more appropriate
// place to put such logic:
// emit JFR event

for (long nanos = 1L;;) {
U.park(false, nanos); // must use Unsafe park to sleep
if (nanos < 1L << 30) // max about 1 second
nanos <<= 1;

try {
acquire(node, arg, false, false, false, 0L);
} catch (Error | RuntimeException ignored) {
continue;
}

throw firstEx;
}
}
}

/**
* Main acquire method, invoked by all exported acquire methods.
*
Expand Down Expand Up @@ -1294,7 +1328,7 @@ else if ((node.status & COND) != 0) {
}
LockSupport.setCurrentBlocker(null);
node.clearStatus();
acquire(node, savedState, false, false, false, 0L);
reacquire(node, savedState);
if (interrupted)
Thread.currentThread().interrupt();
}
Expand Down Expand Up @@ -1341,7 +1375,7 @@ public final void await() throws InterruptedException {
}
LockSupport.setCurrentBlocker(null);
node.clearStatus();
acquire(node, savedState, false, false, false, 0L);
reacquire(node, savedState);
if (interrupted) {
if (cancelled) {
unlinkCancelledWaiters(node);
Expand Down Expand Up @@ -1384,7 +1418,7 @@ public final long awaitNanos(long nanosTimeout)
LockSupport.parkNanos(this, nanos);
}
node.clearStatus();
acquire(node, savedState, false, false, false, 0L);
reacquire(node, savedState);
if (cancelled) {
unlinkCancelledWaiters(node);
if (interrupted)
Expand Down Expand Up @@ -1428,7 +1462,7 @@ public final boolean awaitUntil(Date deadline)
LockSupport.parkUntil(this, abstime);
}
node.clearStatus();
acquire(node, savedState, false, false, false, 0L);
reacquire(node, savedState);
if (cancelled) {
unlinkCancelledWaiters(node);
if (interrupted)
Expand Down Expand Up @@ -1473,7 +1507,7 @@ public final boolean await(long time, TimeUnit unit)
LockSupport.parkNanos(this, nanos);
}
node.clearStatus();
acquire(node, savedState, false, false, false, 0L);
reacquire(node, savedState);
if (cancelled) {
unlinkCancelledWaiters(node);
if (interrupted)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,40 @@ private static void signalNextIfShared(Node h) {
}
}

/**
* Repeatedly invokes acquire, if its execution throws an Error or a Runtime Exception,
* using an Unsafe.park-based backoff
* @param node which to reacquire
* @param arg the acquire argument
*/
private final void reacquire(Node node, int arg) {
try {
acquire(node, arg, false, false, false, 0L);
} catch (Error | RuntimeException firstEx) {
// While we currently do not emit an JFR events in this situation, mainly
// because the conditions under which this happens are such that it
// cannot be presumed to be possible to actually allocate an event, and
// using a preconstructed one would have limited value in serviceability.
// Having said that, the following place would be the more appropriate
// place to put such logic:
// emit JFR event

for (long nanos = 1L;;) {
U.park(false, nanos); // must use Unsafe park to sleep
if (nanos < 1L << 30) // max about 1 second
nanos <<= 1;

try {
acquire(node, arg, false, false, false, 0L);
} catch (Error | RuntimeException ignored) {
continue;
}

throw firstEx;
}
}
}

/**
* Main acquire method, invoked by all exported acquire methods.
*
Expand Down Expand Up @@ -1673,7 +1707,7 @@ else if ((node.status & COND) != 0) {
}
LockSupport.setCurrentBlocker(null);
node.clearStatus();
acquire(node, savedState, false, false, false, 0L);
reacquire(node, savedState);
if (interrupted)
Thread.currentThread().interrupt();
}
Expand Down Expand Up @@ -1720,7 +1754,7 @@ public final void await() throws InterruptedException {
}
LockSupport.setCurrentBlocker(null);
node.clearStatus();
acquire(node, savedState, false, false, false, 0L);
reacquire(node, savedState);
if (interrupted) {
if (cancelled) {
unlinkCancelledWaiters(node);
Expand Down Expand Up @@ -1763,7 +1797,7 @@ public final long awaitNanos(long nanosTimeout)
LockSupport.parkNanos(this, nanos);
}
node.clearStatus();
acquire(node, savedState, false, false, false, 0L);
reacquire(node, savedState);
if (cancelled) {
unlinkCancelledWaiters(node);
if (interrupted)
Expand Down Expand Up @@ -1807,7 +1841,7 @@ public final boolean awaitUntil(Date deadline)
LockSupport.parkUntil(this, abstime);
}
node.clearStatus();
acquire(node, savedState, false, false, false, 0L);
reacquire(node, savedState);
if (cancelled) {
unlinkCancelledWaiters(node);
if (interrupted)
Expand Down Expand Up @@ -1852,7 +1886,7 @@ public final boolean await(long time, TimeUnit unit)
LockSupport.parkNanos(this, nanos);
}
node.clearStatus();
acquire(node, savedState, false, false, false, 0L);
reacquire(node, savedState);
if (cancelled) {
unlinkCancelledWaiters(node);
if (interrupted)
Expand Down
10 changes: 5 additions & 5 deletions src/java.base/share/classes/sun/security/ssl/Alert.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2024, 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
Expand Down Expand Up @@ -123,13 +123,13 @@ SSLException createSSLException(String reason, Throwable cause) {
}

if (cause instanceof IOException) {
return new SSLException(reason, cause);
return new SSLException("(" + description + ") " + reason, cause);
} else if ((this == UNEXPECTED_MESSAGE)) {
return new SSLProtocolException(reason, cause);
return new SSLProtocolException("(" + description + ") " + reason, cause);
} else if (handshakeOnly) {
return new SSLHandshakeException(reason, cause);
return new SSLHandshakeException("(" + description + ") " + reason, cause);
} else {
return new SSLException(reason, cause);
return new SSLException("(" + description + ") " + reason, cause);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ private void onCertificate(ServerHandshakeContext shc,
if (shc.sslConfig.clientAuthType !=
ClientAuthType.CLIENT_AUTH_REQUESTED) {
// unexpected or require client authentication
throw shc.conContext.fatal(Alert.BAD_CERTIFICATE,
throw shc.conContext.fatal(Alert.HANDSHAKE_FAILURE,
"Empty client certificate chain");
} else {
return;
Expand Down Expand Up @@ -1163,7 +1163,7 @@ private void onConsumeCertificate(ServerHandshakeContext shc,
shc.handshakeConsumers.remove(
SSLHandshake.CERTIFICATE_VERIFY.id);
if (shc.sslConfig.clientAuthType == CLIENT_AUTH_REQUIRED) {
throw shc.conContext.fatal(Alert.BAD_CERTIFICATE,
throw shc.conContext.fatal(Alert.CERTIFICATE_REQUIRED,
"Empty client certificate chain");
} else {
// optional client authentication
Expand All @@ -1187,7 +1187,7 @@ private void onConsumeCertificate(ClientHandshakeContext chc,
T13CertificateMessage certificateMessage )throws IOException {
if (certificateMessage.certEntries == null ||
certificateMessage.certEntries.isEmpty()) {
throw chc.conContext.fatal(Alert.BAD_CERTIFICATE,
throw chc.conContext.fatal(Alert.DECODE_ERROR,
"Empty server certificate chain");
}

Expand Down
Loading
Loading