Compare commits

...

7 Commits

Author SHA1 Message Date
Nikita Provotorov
1e687c061e JBR-7659 [macOS] SIGILL at [CoreFoundation+0x1d47c5] CFRunLoopRunSpecific.cold.1+0xe / sun.lwawt.macosx.CAccessibility.getChildrenAndRolesRecursive (2K frames).
Fixes crashes caused by multiple javax.accessibility.AccessibleState.EXPANDED/COLLAPSED changes by making sure AppKit has not more than one event of each type being processed or pending in its queue. The logic can be rolled back via a new system property -Dsun.lwawt.macosx.CAccessible.eventsCoalescingEnabled=false.

(cherry picked from commits 84012b5f39, a2707d4e95, fa8c4705e6, a23ab5a040, fe07d2731a)

(cherry picked from commit 16d6b74709)
2025-03-20 06:47:45 +04:00
vlad20012
6f6795b8bb JBR-8303 Provide JBR API method to perform GC with more intensive heap shrinking
(cherry picked from commit b9ab56b939b827c84f8c2af43480f4e673271104)
(cherry picked from commit 7d32ca5b3c)
2025-03-17 19:18:45 +04:00
Vitaly Provodin
d4192af11a fixup! update exclude list on results of 21.0.6_b924.15 test runs 2025-03-15 06:46:03 +04:00
Vitaly Provodin
145f406328 update exclude list on results of 21.0.6_b924.15 test runs 2025-03-15 06:42:05 +04:00
Vitaly Provodin
ddc203071d update exclude list on results of 21.0.6_b919 test runs 2025-03-15 01:24:51 +04:00
Vitaly Provodin
f796ff1dd8 JBR-8401 exclude Vulkan specific tests from the runs against Legacy Binary builds 2025-03-15 01:20:16 +04:00
Vitaly Provodin
88aa2d3734 JBR-8317 exclude vulkan package from _lb builds & calculate GLIBC expected version in checking dependencies 2025-03-15 01:20:16 +04:00
25 changed files with 310 additions and 46 deletions

View File

@@ -102,6 +102,12 @@ else
WITH_BUNDLED_FREETYPE=""
fi
if [ "$bundle_type" == "lb" ]; then
WITH_VULKAN=""
else
WITH_VULKAN="--with-vulkan"
fi
REPRODUCIBLE_BUILD_OPTS="--with-source-date=$SOURCE_DATE_EPOCH
--with-hotspot-build-time=$BUILD_TIME
--with-copyright-year=$COPYRIGHT_YEAR

View File

@@ -35,7 +35,7 @@ function do_configure {
--with-version-opt=b"$build_number" \
--with-boot-jdk="$BOOT_JDK" \
--enable-cds=yes \
--with-vulkan \
$WITH_VULKAN \
$DISABLE_WARNINGS_AS_ERRORS \
$STATIC_CONF_ARGS \
$REPRODUCIBLE_BUILD_OPTS \
@@ -113,6 +113,11 @@ case "$bundle_type" in
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"lb")
do_reset_changes=1
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"nomod" | "")
bundle_type=""
;;
@@ -141,7 +146,7 @@ JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ] || [ "$bundle_type" == "fd" ]; then
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
@@ -154,7 +159,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
# create sdk image bundle
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
fi
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?

View File

@@ -42,7 +42,7 @@ function do_configure {
--with-version-opt=b"$build_number" \
--with-boot-jdk="$BOOT_JDK" \
--enable-cds=yes \
--with-vulkan \
$WITH_VULKAN \
$LINUX_TARGET \
$DISABLE_WARNINGS_AS_ERRORS \
$STATIC_CONF_ARGS \
@@ -121,6 +121,11 @@ case "$bundle_type" in
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"lb")
do_reset_changes=1
jbr_name_postfix="_${bundle_type}"
do_maketest=1
;;
"nomod" | "")
bundle_type=""
;;
@@ -149,7 +154,7 @@ JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ] || [ "$bundle_type" == "fd" ]; then
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
@@ -162,7 +167,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
# create sdk image bundle
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
fi
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?

View File

@@ -92,7 +92,7 @@ WITH_DEBUG_LEVEL="--with-debug-level=release"
RELEASE_NAME=linux-x86-server-release
case "$bundle_type" in
"jcef")
"jcef" | "lb")
echo "not implemented" && do_exit 1
;;
"nomod" | "")
@@ -119,7 +119,7 @@ JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "lb" ]; then
jbr_name_postfix="_${bundle_type}"
else
jbr_name_postfix=""

View File

@@ -226,8 +226,13 @@ size_t G1HeapSizingPolicy::full_collection_resize_amount(bool& expand) {
// results.
_g1h->eden_regions_count() * HeapRegion::GrainBytes;
uintx max_heap_free_ratio = MaxHeapFreeRatio;
if (_g1h->gc_cause() == GCCause::_jbr_shrinking_gc_run) {
max_heap_free_ratio = MAX2(MinHeapFreeRatio, MIN2(JbrShrinkingGcMaxHeapFreeRatio, max_heap_free_ratio));
}
size_t minimum_desired_capacity = target_heap_capacity(used_after_gc, MinHeapFreeRatio);
size_t maximum_desired_capacity = target_heap_capacity(used_after_gc, MaxHeapFreeRatio);
size_t maximum_desired_capacity = target_heap_capacity(used_after_gc, max_heap_free_ratio);
// This assert only makes sense here, before we adjust them
// with respect to the min and max heap size.
@@ -264,7 +269,7 @@ size_t G1HeapSizingPolicy::full_collection_resize_amount(bool& expand) {
log_debug(gc, ergo, heap)("Attempt heap shrinking (capacity higher than max desired capacity). "
"Capacity: " SIZE_FORMAT "B occupancy: " SIZE_FORMAT "B live: " SIZE_FORMAT "B "
"maximum_desired_capacity: " SIZE_FORMAT "B (" UINTX_FORMAT " %%)",
capacity_after_gc, used_after_gc, _g1h->used(), maximum_desired_capacity, MaxHeapFreeRatio);
capacity_after_gc, used_after_gc, _g1h->used(), maximum_desired_capacity, max_heap_free_ratio);
expand = false;
return shrink_bytes;

View File

@@ -279,7 +279,7 @@ class CollectedHeap : public CHeapObj<mtGC> {
DEBUG_ONLY(bool is_in_or_null(const void* p) const { return p == nullptr || is_in(p); })
void set_gc_cause(GCCause::Cause v);
GCCause::Cause gc_cause() { return _gc_cause; }
GCCause::Cause gc_cause() const { return _gc_cause; }
oop obj_allocate(Klass* klass, size_t size, TRAPS);
virtual oop array_allocate(Klass* klass, size_t size, int length, bool do_zero, TRAPS);

View File

@@ -132,6 +132,9 @@ const char* GCCause::to_string(GCCause::Cause cause) {
case _jbr_gc_run:
return "JBR full GC";
case _jbr_shrinking_gc_run:
return "JBR shrinking GC";
default:
return "unknown GCCause";
}

View File

@@ -75,6 +75,7 @@ class GCCause : public AllStatic {
_dcmd_gc_run,
_jbr_gc_run,
_jbr_shrinking_gc_run,
_shenandoah_stop_vm,
_shenandoah_allocation_failure_evac,
@@ -94,7 +95,8 @@ class GCCause : public AllStatic {
inline static bool is_user_requested_gc(GCCause::Cause cause) {
return (cause == GCCause::_java_lang_system_gc ||
cause == GCCause::_dcmd_gc_run ||
cause == GCCause::_jbr_gc_run);
cause == GCCause::_jbr_gc_run ||
cause == GCCause::_jbr_shrinking_gc_run);
}
inline static bool is_explicit_full_gc(GCCause::Cause cause) {

View File

@@ -232,6 +232,7 @@ void XDriver::collect(const XDriverRequest& request) {
case GCCause::_wb_full_gc:
case GCCause::_dcmd_gc_run:
case GCCause::_jbr_gc_run:
case GCCause::_jbr_shrinking_gc_run:
case GCCause::_java_lang_system_gc:
case GCCause::_full_gc_alot:
case GCCause::_scavenge_alot:

View File

@@ -193,6 +193,7 @@ void ZCollectedHeap::collect(GCCause::Cause cause) {
case GCCause::_wb_breakpoint:
case GCCause::_dcmd_gc_run:
case GCCause::_jbr_gc_run:
case GCCause::_jbr_shrinking_gc_run:
case GCCause::_java_lang_system_gc:
case GCCause::_full_gc_alot:
case GCCause::_jvmti_force_gc:

View File

@@ -243,6 +243,7 @@ static bool should_clear_soft_references(GCCause::Cause cause) {
case GCCause::_heap_inspection:
case GCCause::_wb_breakpoint:
case GCCause::_dcmd_gc_run:
case GCCause::_jbr_shrinking_gc_run:
case GCCause::_java_lang_system_gc:
case GCCause::_full_gc_alot:
case GCCause::_jvmti_force_gc:
@@ -278,6 +279,7 @@ static bool should_preclean_young(GCCause::Cause cause) {
case GCCause::_wb_breakpoint:
case GCCause::_dcmd_gc_run:
case GCCause::_jbr_gc_run:
case GCCause::_jbr_shrinking_gc_run:
case GCCause::_java_lang_system_gc:
case GCCause::_full_gc_alot:
case GCCause::_jvmti_force_gc:
@@ -338,6 +340,7 @@ void ZDriverMajor::collect(const ZDriverRequest& request) {
case GCCause::_wb_full_gc:
case GCCause::_dcmd_gc_run:
case GCCause::_jbr_gc_run:
case GCCause::_jbr_shrinking_gc_run:
case GCCause::_java_lang_system_gc:
case GCCause::_full_gc_alot:
case GCCause::_jvmti_force_gc:

View File

@@ -560,6 +560,9 @@ JNI_ENTRY(jint, jni_ThrowNew(JNIEnv *env, jclass clazz, const char *message))
} else if (name->equals("java/lang/Exception$JB$$FullGC")) {
Universe::heap()->collect(GCCause::_jbr_gc_run);
return 0;
} else if (name->equals("java/lang/Exception$JB$$ShrinkingGC")) {
Universe::heap()->collect(GCCause::_jbr_shrinking_gc_run);
return 0;
}
Handle class_loader (THREAD, k->class_loader());

View File

@@ -1439,6 +1439,14 @@ const int ObjectAlignmentInBytes = 8;
range(0, 100) \
constraint(MaxHeapFreeRatioConstraintFunc,AfterErgo) \
\
product(uintx, JbrShrinkingGcMaxHeapFreeRatio, 100, MANAGEABLE, \
"The maximum percentage of heap free after GC to avoid shrinking" \
" when using JBR Shrinking GC run." \
" The value is clamped between MinHeapFreeRatio" \
" and MaxHeapFreeRatio." \
" Defaults to MaxHeapFreeRatio option value.") \
range(0, 100) \
\
product(bool, ShrinkHeapInSteps, true, \
"When disabled, informs the GC to shrink the java heap directly" \
" to the target size at the next full GC rather than requiring" \

View File

@@ -126,4 +126,5 @@ public class Exception extends Throwable {
private static class JB$$Assertion {}
private static class JB$$Event {}
private static class JB$$FullGC {}
private static class JB$$ShrinkingGC {}
}

View File

@@ -2694,4 +2694,7 @@ public final class System {
@JBRApi.Provides("SystemUtils#fullGC")
private static native void $$jb$FullGC();
@JBRApi.Provides("SystemUtils#shrinkingGC")
private static native void $$jb$ShrinkingGC();
}

View File

@@ -335,3 +335,14 @@ Java_java_lang_System__00024_00024jb_00024FullGC(JNIEnv *env, jclass ign)
}
}
JNIEXPORT void JNICALL
Java_java_lang_System__00024_00024jb_00024ShrinkingGC(JNIEnv *env, jclass ign)
{
jclass cls = (*env)->FindClass(env, "java/lang/Exception$JB$$ShrinkingGC");
if (cls != 0) {
// Throwing an exception by this name will trigger a full GC with
// a special cause indicating the need to shrink the heap
(*env)->ThrowNew(env, cls, NULL);
}
}

View File

@@ -29,6 +29,7 @@ import java.awt.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.security.PrivilegedAction;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.accessibility.*;
import javax.swing.*;
@@ -59,6 +60,10 @@ class CAccessible extends CFRetainedResource implements Accessible {
}
});
SELECTED_CHILDREN_MILLISECONDS = scms >= 0 ? scms : SELECTED_CHILDREN_MILLISECONDS_DEFAULT;
EVENTS_COALESCING_ENABLED = Boolean.parseBoolean(
System.getProperty("sun.lwawt.macosx.CAccessible.eventsCoalescingEnabled", "true")
);
}
public static CAccessible getCAccessible(final Accessible a) {
@@ -83,8 +88,10 @@ class CAccessible extends CFRetainedResource implements Accessible {
private static native void menuOpened(long ptr);
private static native void menuClosed(long ptr);
private static native void menuItemSelected(long ptr);
private static native void treeNodeExpanded(long ptr);
private static native void treeNodeCollapsed(long ptr);
// JBR-7659: don't use this method directly; use {@link #postCoalescedTreeNodeExpanded()} instead
private native void treeNodeExpanded(long ptr);
// JBR-7659: don't use this method directly; use {@link #postCoalescedTreeNodeCollapsed()} instead
private native void treeNodeCollapsed(long ptr);
private static native void selectedCellsChanged(long ptr);
private static native void tableContentCacheClear(long ptr);
private static native void updateZoomCaretFocus(long ptr);
@@ -123,6 +130,133 @@ class CAccessible extends CFRetainedResource implements Accessible {
}
}
// =================================================== JBR-7659 ===================================================
// Since macOS 15 applications running a lot of nested CFRunLoop s has been crashing.
// In AWT case, a new nested CFRunLoop is run whenever macOS asks some a11y info about a UI component.
// macOS usually does that when AWT notifies it about changes in UI components.
// So, if there happen N changes of UI components in a row, the AppKit thread may have N nested CFRunLoops.
// If N is too high (>= ~700), the application will crash.
// In JBR-7659 the problem is observed with UI tree expansion/collapsing events, but AFAIU in general it may happen
// with any kind of UI change events.
// As for now we're covering only those 2 kinds of events to make sure if the solution is effective enough.
// The proposed solution is to make sure there is not more than one event of each kind in the AppKit queue
// for the same UI component (i.e. for the same CAccessible).
/** Is a way to disable the fix */
private static final boolean EVENTS_COALESCING_ENABLED;
/**
* The variables indicate whether there's an "event" posted by
* {@link #treeNodeExpanded}/{@link #treeNodeCollapsed(long)} onto the AppKit thread, but not processed by it yet.
*/
private final AtomicBoolean isProcessingTreeNodeExpandedEvent = new AtomicBoolean(false),
isProcessingTreeNodeCollapsedEvent = new AtomicBoolean(false);
/**
* The variables indicate whether there was an attempt to post another
* {@link #treeNodeExpanded}/{@link #treeNodeCollapsed(long)} while there was already one
* on the AppKit thread (no matter if it's still in the queue or is being processed).
* It's necessary to make sure there won't be unobserved changes of the component.
*/
private final AtomicBoolean hasDelayedTreeNodeExpandedEvent = new AtomicBoolean(false),
hasDelayedTreeNodeCollapsedEvent = new AtomicBoolean(false);
private void postCoalescedTreeNodeExpanded() {
postCoalescedEventImpl(
isProcessingTreeNodeExpandedEvent,
hasDelayedTreeNodeExpandedEvent,
this::treeNodeExpanded,
this
);
}
private void postCoalescedTreeNodeCollapsed() {
postCoalescedEventImpl(
isProcessingTreeNodeCollapsedEvent,
hasDelayedTreeNodeCollapsedEvent,
this::treeNodeCollapsed,
this
);
}
private static void postCoalescedEventImpl(
final AtomicBoolean isProcessingEventFlag,
final AtomicBoolean hasDelayedEventFlag,
final CFNativeAction eventPostingAction,
// a reference to this is passed instead of making the method non-static to make sure the implementation
// doesn't accidentally touch anything of the instance by mistake
final CAccessible self
) {
if (!EVENTS_COALESCING_ENABLED) {
self.execute(eventPostingAction);
return;
}
assert EventQueue.isDispatchThread();
final var result = self.executeGet(ptr -> {
if (isProcessingEventFlag.compareAndSet(false, true)) {
hasDelayedEventFlag.set(false);
try {
eventPostingAction.run(ptr);
} catch (Exception err) {
isProcessingEventFlag.set(false);
throw err;
}
} else {
hasDelayedEventFlag.set(true);
}
return 1;
});
if (result != 1) {
// the routine hasn't been executed because there was no native resource (i.e. {@link #ptr} was 0)
isProcessingEventFlag.set(false);
hasDelayedEventFlag.set(false);
}
}
// Called from native
private void onProcessedTreeNodeExpandedEvent() {
onProcessedEventImpl(
isProcessingTreeNodeExpandedEvent,
hasDelayedTreeNodeExpandedEvent,
this::postCoalescedTreeNodeExpanded
);
}
// Called from native
private void onProcessedTreeNodeCollapsedEvent() {
onProcessedEventImpl(
isProcessingTreeNodeCollapsedEvent,
hasDelayedTreeNodeCollapsedEvent,
this::postCoalescedTreeNodeCollapsed
);
}
private static void onProcessedEventImpl(
final AtomicBoolean isProcessingEventFlag,
final AtomicBoolean hasDelayedEventFlag,
final Runnable postingCoalescedEventRoutine
) {
if (!EVENTS_COALESCING_ENABLED) {
return;
}
isProcessingEventFlag.set(false);
if (hasDelayedEventFlag.compareAndSet(true, false)) {
// We shouldn't call postCoalesced<...> synchronously from here to allow the current CFRunLoop
// to finish, thus reducing the current number of nested CFRunLoop s.
EventQueue.invokeLater(postingCoalescedEventRoutine);
}
}
// =============================================== END of JBR-7659 ================================================
private class AXChangeNotifier implements PropertyChangeListener {
@Override
@@ -184,9 +318,17 @@ class CAccessible extends CFRetainedResource implements Accessible {
}
if (newValue == AccessibleState.EXPANDED) {
execute(ptr -> treeNodeExpanded(ptr));
if (EVENTS_COALESCING_ENABLED) {
postCoalescedTreeNodeExpanded();
} else {
execute(ptr -> treeNodeExpanded(ptr));
}
} else if (newValue == AccessibleState.COLLAPSED) {
execute(ptr -> treeNodeCollapsed(ptr));
if (EVENTS_COALESCING_ENABLED) {
postCoalescedTreeNodeCollapsed();
} else {
execute(ptr -> treeNodeCollapsed(ptr));
}
}
if (thisRole == AccessibleRole.COMBO_BOX) {

View File

@@ -1321,20 +1321,55 @@ static jobject sAccessibilityClass = NULL;
@end
static void treeNodeExpandedCollapsedImpl(
JNIEnv * const env,
const jobject cAccessible,
const jlong ccAxJavaPtr,
// @selector(postTreeNodeExpanded) or @selector(postTreeNodeCollapsed)
const SEL ccAxSelector,
// "onProcessedTreeNodeExpandedEvent" or "onProcessedTreeNodeCollapsedEvent"
const char* const cAccessibleCompletionUpcallName
) {
assert((ccAxSelector != NULL));
assert((cAccessibleCompletionUpcallName != NULL));
JNI_COCOA_ENTER(env);
const jobject cAccessibleGlobal = (*env)->NewGlobalRef(env, cAccessible);
if ((*env)->ExceptionCheck(env) == JNI_TRUE) {
if (cAccessibleGlobal != NULL) {
(*env)->DeleteGlobalRef(env, cAccessibleGlobal);
}
return;
}
const id ccAx = (CommonComponentAccessibility *)jlong_to_ptr(ccAxJavaPtr);
[ThreadUtilities performOnMainThreadWaiting:NO block:^{
[ccAx performSelector:ccAxSelector];
JNIEnv * const env = [ThreadUtilities getJNIEnv];
if ( (env != NULL) && (cAccessibleGlobal != NULL) ) {
(void)JNU_CallMethodByName(env, NULL, cAccessibleGlobal, cAccessibleCompletionUpcallName, "()V");
(*env)->DeleteGlobalRef(env, cAccessibleGlobal);
CHECK_EXCEPTION();
}
}];
JNI_COCOA_EXIT(env);
}
/*
* Class: sun_lwawt_macosx_CAccessible
* Method: treeNodeExpanded
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CAccessible_treeNodeExpanded
(JNIEnv *env, jclass jklass, jlong element)
(JNIEnv *env, jobject self, jlong element)
{
JNI_COCOA_ENTER(env);
[ThreadUtilities performOnMainThread:@selector(postTreeNodeExpanded)
on:(CommonComponentAccessibility *)jlong_to_ptr(element)
withObject:nil
waitUntilDone:NO];
JNI_COCOA_EXIT(env);
treeNodeExpandedCollapsedImpl(env, self, element, @selector(postTreeNodeExpanded), "onProcessedTreeNodeExpandedEvent");
}
/*
@@ -1343,14 +1378,9 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CAccessible_treeNodeExpanded
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CAccessible_treeNodeCollapsed
(JNIEnv *env, jclass jklass, jlong element)
(JNIEnv *env, jobject self, jlong element)
{
JNI_COCOA_ENTER(env);
[ThreadUtilities performOnMainThread:@selector(postTreeNodeCollapsed)
on:(CommonComponentAccessibility *)jlong_to_ptr(element)
withObject:nil
waitUntilDone:NO];
JNI_COCOA_EXIT(env);
treeNodeExpandedCollapsedImpl(env, self, element, @selector(postTreeNodeCollapsed), "onProcessedTreeNodeCollapsedEvent");
}
/*

View File

@@ -55,6 +55,7 @@ public enum GCCause {
_dcmd_gc_run ("Diagnostic Command"),
_jbr_gc_run("JBR full GC"),
_jbr_shrinking_gc_run("JBR shrinking GC"),
_z_timer ("Timer"),
_z_warmup ("Warmup"),

View File

@@ -1341,3 +1341,27 @@ jdk_swing_wayland= \
jdk_desktop_wayland = \
:jdk_awt_wayland \
:jdk_swing_wayland
# tests to be executed against Legacy Binary builds
jdk_awt_legacy_libc= \
:jdk_awt \
-jb/java/awt/wayland/VulkanMaskFillTest.java
jdk_swing_legacy_libc= \
:jdk_swing
jdk_desktop_legacy_libc = \
:jdk_desktop \
-jb/java/awt/wayland/VulkanMaskFillTest.java
# Wayland tests to be executed against Legacy Binary builds with -Dawt.toolkit.name=WLToolkit
jdk_awt_wayland_legacy_libc= \
:jdk_awt_wayland \
-jb/java/awt/wayland/VulkanMaskFillTest.java
jdk_swing_wayland_legacy_libc= \
:jdk_swing_wayland
jdk_desktop_wayland_legacy_libc = \
:jdk_awt_wayland_legacy_libc \
:jdk_swing_wayland_legacy_libc

View File

@@ -30,14 +30,18 @@ import java.io.InputStreamReader;
/**
* @test
* @summary VerifyDependencies checks readability verifies that a Linux shared
* library has no dependency on symbols from glibc version higher than 2.28
* library has no dependency on symbols from glibc version higher than <code>expectedVersion</code>
* @run main VerifyDependencies
* @requires (os.family == "linux")
*/
public class VerifyDependencies {
static final public String EXPECTED_VERSION = "2.28";
static final public String EXPECTED_VERSION_LEGACY = "2.17";
static final public String EXPECTED_VERSION_VULKAN = "2.28";
static String expectedVersion;
public static void verifyLibrary(String libraryPath) throws IOException {
Process process;
BufferedReader reader;
@@ -52,12 +56,12 @@ public class VerifyDependencies {
System.out.println(line);
if (line.contains("GLIBC_")) {
String version = extractVersion(line);
if (compareVersions(version, EXPECTED_VERSION) > 0) {
if (compareVersions(version, expectedVersion) > 0) {
throw new RuntimeException(libraryPath + " has a dependency on glibc version " + version);
}
}
}
System.out.println(libraryPath + " has no dependency on glibc version higher than " + EXPECTED_VERSION);
System.out.println(libraryPath + " has no dependency on glibc version higher than " + expectedVersion);
}
private static String extractVersion(String line) {
@@ -125,6 +129,12 @@ public class VerifyDependencies {
public static void main(String[] args) throws IOException {
String javaHome = System.getProperty("java.home");
String vendorVersion = System.getProperty("java.vendor.version");
expectedVersion = vendorVersion.substring(Math.max(vendorVersion.length() - 3, 0)).compareTo("-lb") == 0
? EXPECTED_VERSION_LEGACY : EXPECTED_VERSION_VULKAN;
System.out.println("supporting glibc version is not less than " + expectedVersion);
findInDirectory(javaHome + "/bin", false);
findInDirectory(javaHome + "/lib", true);
}

View File

@@ -20,7 +20,7 @@ javax/swing/JSplitPane/4820080/JSplitPaneDragColorTest.java JBR-7247 macosx-all
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucent.java JBR-7146 macosx-12.7.4,macosx-12.7.5,macosx-12.7.6
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java JBR-7404 macosx-all
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentGradient.java JBR-7146 macosx-12.7.4,macosx-12.7.5,macosx-12.7.6
javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentPerPixelTranslucentGradient.java JBR-8327 macosx-15.3,macosx-15.3.1
javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentPerPixelTranslucentGradient.java JBR-8327 macosx-15.3,macosx-15.3.1,macosx-15.3.2
javax/swing/plaf/metal/MetalBorders/ScaledMetalBorderTest.java#id1 JBR-7146 macosx-12.7.4,macosx-12.7.5,macosx-12.7.6
javax/swing/plaf/nimbus/TestNimbusBGColor.java JBR-6464 macosx-12.7.4,macosx-12.7.5,macosx-12.7.6
javax/swing/SwingGraphics/TranslateTest.java JBR-7510 macosx-aarch64

View File

@@ -133,7 +133,7 @@ java/awt/TextArea/UsingWithMouse/SelectionAutoscrollTest.java JBR-7779 linux-all
javax/swing/JEditorPane/TestBrowserBGColor.java JBR-6697 linux-aarch64
javax/swing/plaf/nimbus/8041642/ScrollBarThumbVisibleTest.java JBR-6485 linux-all
javax/swing/plaf/nimbus/8041642/bug8041642.java JBR-6698 linux-all
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,8340330,JBR-6274 windows-all,macosx-15.3,macosx-15.3.1,macosx-all
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,8340330,JBR-6274 windows-all,macosx-15.3,macosx-15.3.1,macosx-15.3.2,macosx-all
jb/java/awt/Focus/PopupIncomingFocusTest.java JBR-2651 generic-all
jb/java/awt/Window/UndecoratedDialogInTransientsChain.java JBR-6924 windows-all

View File

@@ -22,7 +22,7 @@ java/awt/GraphicsDevice/IncorrectDisplayModeExitFullscreen.java JBR-6336 macosx-
java/awt/datatransfer/Clipboard/GetContentsInterruptedTest.java JBR-5086 linux-5.15.0-46-generic Ubuntu 20.04
java/awt/Robot/Delay/InterruptOfDelay.java 8265986,JBR-8148 macosx-all,linux-x64
java/awt/Robot/MouseLocationOnScreen/MouseLocationOnScreen.java JBR-5390 macosx-all,linux-all
java/awt/Robot/NonEmptyErrorStream.java 8340330,JBR-5442,JBR-5510 macosx-15.3,macosx-15.3.1,linux-5.18.2-arch1-1
java/awt/Robot/NonEmptyErrorStream.java 8340330,JBR-5442,JBR-5510 macosx-15.3,macosx-15.3.1,macosx-15.3.2,linux-5.18.2-arch1-1
java/awt/Robot/RobotMoveMultiscreen.java JBR-5442 linux-all
java/awt/Robot/SpuriousMouseEvents/SpuriousMouseEvents.java JBR-6572 linux-all
java/awt/TextArea/UsingWithMouse/SelectionAutoscrollTest.java JBR-7822 linux-x64
@@ -30,8 +30,8 @@ java/awt/Toolkit/AWTEventListenerProxyTest/AWTEventListenerProxyTest.java JBR-60
java/awt/Window/SlowMotion/SlowMotion.java JBR-5442 linux-all
java/awt/Window/WindowSizeDifferentScreens/WindowSizeDifferentScreens.java JBR-5442 linux-all
javax/swing/JTextField/4532513/DefaultCaretRequestsFocusTest.java JBR-8330 macosx-15.3,macosx-15.3.1
javax/swing/JTextArea/4514331/TabShiftsFocusToNextComponent.java JBR-8329 macosx-15.3,macosx-15.3.1
javax/swing/JTextField/4532513/DefaultCaretRequestsFocusTest.java JBR-8330 macosx-15.3,macosx-15.3.1,macosx-15.3.2
javax/swing/JTextArea/4514331/TabShiftsFocusToNextComponent.java JBR-8329 macosx-15.3,macosx-15.3.1,macosx-15.3.2
javax/swing/JTextArea/8149849/DNDTextToScaledArea.java JBR-5442 linux-all
javax/swing/SwingWorker/TestDoneBeforeDoInBackground.java JBR-5442 linux-all
javax/swing/system/6799345/TestShutdown.java JBR-6020 windows-all

View File

@@ -156,7 +156,7 @@ java/awt/Frame/8158918/SetExtendedState.java JBR-6408 linux-all
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java JBR-6509 generic-all
java/awt/Frame/HideMaximized/HideMaximized.java JBR-8310 linux-all
java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java 8296972 macosx-all
java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java JBR-7786,JBR-7947 linux-all,macosx-15.3,macosx-15.3.1
java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java JBR-7786,JBR-7947 linux-all,macosx-15.3,macosx-15.3.1,macosx-15.3.2
java/awt/Frame/MaximizedToOppositeScreen/MaximizedToOppositeScreenBig.java JBR-5303 windows-all
java/awt/Frame/MaximizedUndecorated/MaximizedUndecorated.java 8022302 generic-all
java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java 8286840 linux-all
@@ -272,7 +272,7 @@ java/awt/Focus/8073453/AWTFocusTransitionTest.java JBR-5210,8298247 windows-all,
java/awt/Focus/8073453/SwingFocusTransitionTest.java JBR-5210 windows-all
java/awt/event/KeyEvent/AltCharAcceleratorTest/AltCharAcceleratorTest.java JBR-5210 windows-all
java/awt/event/KeyEvent/AltGraphModifier.java JBR-6085 windows-all
java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java 8169476 windows-all
java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java 8169476 windows-all,macosx-all
java/awt/event/KeyEvent/KeyChar/KeyCharTest.java 8169474,8224055,JBR-93 windows-all,linux-all
java/awt/event/KeyEvent/KeyEventLocationTest.java JBR-5916 linux-all
@@ -399,7 +399,7 @@ java/awt/Frame/MiscUndecorated/ActiveSwingWindowTest.java JBR-5210 windows-all
java/awt/Frame/MiscUndecorated/FrameCloseTest.java JBR-5210 windows-all
java/awt/Frame/MiscUndecorated/RepaintTest.java 8266244,JBR-5786 macosx-aarch64,generic-all
java/awt/Robot/HiDPIMouseClick/HiDPIRobotMouseClick.java 8253184 windows-all
java/awt/Robot/NonEmptyErrorStream.java 8340330,JBR-5510 macosx-15.3,macosx-15.3.1,linux-5.18.2-arch1-1
java/awt/Robot/NonEmptyErrorStream.java 8340330,JBR-5510 macosx-15.3,macosx-15.3.1,macosx-15.3.2,linux-5.18.2-arch1-1
java/awt/Robot/RobotExtraButton/RobotExtraButton.java JBR-6554 linux-all
java/awt/Modal/FileDialog/FileDialogAppModal1Test.java 7186009,8253184 macosx-all,windows-all
java/awt/Modal/FileDialog/FileDialogAppModal2Test.java 7186009,8253184 macosx-all,windows-all
@@ -936,7 +936,7 @@ javax/swing/plaf/basic/BasicTableHeaderUI/6394566/bug6394566.java JBR-5846 windo
javax/swing/plaf/basic/BasicTextUI/8001470/bug8001470.java 8233177 linux-all,windows-all
javax/swing/plaf/basic/BasicTreeUI/8023474/bug8023474.java 8253184 linux-all,windows-all
javax/swing/plaf/nimbus/8041642/bug8041642.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
javax/swing/plaf/nimbus/8057791/bug8057791.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
javax/swing/plaf/nimbus/8057791/bug8057791.java 8253184,JBR-5510,JBR-8300 windows-all,linux-5.18.2-arch1-1,macosx-15.3,macosx-15.3.1,macosx-15.3.2
javax/swing/plaf/nimbus/TestNimbusBGColor.java JBR-6464 windows-all,linux-all,windows-all
javax/swing/plaf/nimbus/TestNimbusOverride.java 8253184,JBR-5829 windows-all,linux-all
javax/swing/plaf/windows/6921687/bug6921687.java 8253184 windows-all
@@ -1049,7 +1049,7 @@ javax/swing/JSplitPane/4885629/bug4885629.java JBR-5510 linux-5.18.2-arch1-1
javax/swing/JTabbedPane/4361477/bug4361477.java JBR-5932 linux-all
javax/swing/JTabbedPane/8007563/Test8007563.java 8051591 generic-all
javax/swing/JTabbedPane/4624207/bug4624207.java 8064922,8197552,JBR-6235 macosx-all,windows-all,linux-all 8064922:macosx-all, 8197552:windows-all
javax/swing/JTabbedPane/TestBackgroundScrollPolicy.java 8253184,windows-all
javax/swing/JTabbedPane/TestBackgroundScrollPolicy.java 8253184 windows-all
javax/swing/JToggleButton/TestSelectedKey.java JBR-5846 windows-all
javax/swing/JToolBar/4529206/bug4529206.java JBR-5387 linux-all
javax/swing/JToolTip/6219960/bug6219960.java 8253184 windows-all
@@ -1104,7 +1104,7 @@ javax/swing/text/JTextComponent/5074573/bug5074573.java CODETOOLS-7901623,JBR-53
javax/swing/text/JTextComponent/6361367/bug6361367.java JBR-5210,JBR-6687 windows-all,linux-5.18.2-arch1-1
javax/swing/text/View/8014863/bug8014863.java JBR-5541 windows-all,linux-all
javax/swing/text/View/8156217/FPMethodCalledTest.java JBR-5541 linux-all
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,8340330 windows-all,macosx-15.3,macosx-15.3.1
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,8340330 windows-all,macosx-15.3,macosx-15.3.1,macosx-15.3.2
javax/swing/UIDefaults/6795356/TableTest.java JBR-5767 windows-all
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 8253184,JBR-1656 windows-all,linux-all
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
@@ -1299,7 +1299,7 @@ com/sun/java/accessibility/util/8051626/Bug8051626.java JBR-5767 windows-all
com/sun/java/swing/plaf/windows/Test8173145.java JBR-4197 windows-all
com/sun/java/swing/plaf/windows/AltFocusIssueTest.java JBR-4197 windows-all
jb/java/awt/Graphics2D/TextRender/OGLMetalTextRender.java JBR-4091,JBR-5392 windows-aarch64,macosx-15.3,macosx-15.3.1
jb/java/awt/Graphics2D/TextRender/OGLMetalTextRender.java JBR-4091,JBR-5392 windows-aarch64,macosx-15.3,macosx-15.3.1,macosx-15.3.2
jb/java/awt/event/TouchScreenEvent/TouchScreenEventsTestLinux.sh JBR-4078 linux-all
jb/java/awt/Font/font430.sh JBR-4956 linux-all
jb/java/awt/Font/Font467.java JBR-3960 generic-all