Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion make/hotspot/lib/CompileGtest.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ else
GTEST_COPY_DEBUG_SYMBOLS := false
endif

GTEST_LIBJVM_CFLAGS := $(JVM_CFLAGS)
# Decoder does not work with debuginfo of the gtest libjvm when sections are used,
# so we get wrong file names. That's why we filter out the section flags.
ifeq ($(ENABLE_LINKTIME_GC), true)
ifeq ($(TOOLCHAIN_TYPE), gcc)
GTEST_LIBJVM_CFLAGS := $(filter-out -ffunction-sections -fdata-sections, $(JVM_CFLAGS))
endif
endif

################################################################################
## Build libgtest
################################################################################
Expand Down Expand Up @@ -94,7 +103,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
EXTRA_OBJECT_FILES := $(BUILD_LIBJVM_ALL_OBJS), \
DEFAULT_CFLAGS := false, \
CFLAGS := $(JVM_CFLAGS) \
CFLAGS := $(GTEST_LIBJVM_CFLAGS) \
-I$(GTEST_FRAMEWORK_SRC)/googletest/include \
-I$(GTEST_FRAMEWORK_SRC)/googlemock/include \
$(addprefix -I, $(GTEST_TEST_SRC)), \
Expand Down
58 changes: 38 additions & 20 deletions make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -787,10 +787,7 @@ private static Map<String, Object> extractZoneNames(Map<String, Object> map, Str
String tzKey = Optional.ofNullable((String)handlerSupplMeta.get(tzid))
.orElse(tzid);
// Follow link, if needed
String tzLink = null;
for (var k = tzKey; tzdbLinks.containsKey(k);) {
k = tzLink = tzdbLinks.get(k);
}
String tzLink = getTZDBLink(tzKey);
if (tzLink == null && tzdbLinks.containsValue(tzKey)) {
// reverse link search
// this is needed as in tzdb, "America/Buenos_Aires" links to
Expand All @@ -810,6 +807,13 @@ private static Map<String, Object> extractZoneNames(Map<String, Object> map, Str
data = map.get(TIMEZONE_ID_PREFIX + tzLink);
}

String meta = handlerMetaZones.get(tzKey);
if (meta == null && tzLink != null) {
// Check for tzLink
meta = handlerMetaZones.get(tzLink);
}
String metaKey = meta != null ? METAZONE_ID_PREFIX + meta : null;

if (data instanceof String[] tznames) {
// Hack for UTC. UTC is an alias to Etc/UTC in CLDR
if (tzid.equals("Etc/UTC") && !map.containsKey(TIMEZONE_ID_PREFIX + "UTC")) {
Expand All @@ -819,24 +823,16 @@ private static Map<String, Object> extractZoneNames(Map<String, Object> map, Str
} else {
// TZDB short names
tznames = Arrays.copyOf(tznames, tznames.length);
fillTZDBShortNames(tzid, tznames);
fillTZDBShortNames(tzKey, tznames);
names.put(tzid, tznames);
if (meta != null && map.get(metaKey) instanceof String[] metaNames) {
recordMetazone(names, meta, tzKey, metaNames);
}
}
} else {
String meta = handlerMetaZones.get(tzKey);
if (meta == null && tzLink != null) {
// Check for tzLink
meta = handlerMetaZones.get(tzLink);
}
if (meta != null) {
String metaKey = METAZONE_ID_PREFIX + meta;
data = map.get(metaKey);
if (data instanceof String[] tznames) {
// TZDB short names
tznames = Arrays.copyOf((String[])names.getOrDefault(metaKey, tznames), 6);
fillTZDBShortNames(tzid, tznames);
// Keep the metazone prefix here.
names.putIfAbsent(metaKey, tznames);
if (map.get(metaKey) instanceof String[] metaNames) {
recordMetazone(names, meta, tzKey, metaNames);
names.put(tzid, meta);
if (tzLink != null && availableIds.contains(tzLink)) {
names.put(tzLink, meta);
Expand Down Expand Up @@ -1484,12 +1480,12 @@ private static String flipIfNeeded(boolean inVanguard, String format) {
* Fill the TZDB short names if there is no name provided by the CLDR
*/
private static void fillTZDBShortNames(String tzid, String[] names) {
var val = tzdbShortNamesMap.get(tzdbLinks.getOrDefault(tzid, tzid));
var val = tzdbShortNamesMap.getOrDefault(tzid, tzdbShortNamesMap.get(getTZDBLink(tzid)));
if (val != null) {
var format = val.split(NBSP)[0];
var rule = val.split(NBSP)[1];
IntStream.of(1, 3, 5).forEach(i -> {
if (names[i] == null) {
if (names[i] == null || names[i].isEmpty()) {
if (format.contains("%s")) {
names[i] = switch (i) {
case 1 -> format.formatted(tzdbSubstLetters.get(rule + NBSP + STD));
Expand All @@ -1511,6 +1507,28 @@ private static void fillTZDBShortNames(String tzid, String[] names) {
}
}

private static void recordMetazone(Map<String, Object> names, String meta, String tzid, String[] tznames) {
String zone001 = handlerMetaZones.zidMap().get(meta);
var tzLink = getTZDBLink(tzid);

// Record the metazone names only from the default
// (001) zone, with short names filled from TZDB
if (canonicalTZMap.getOrDefault(tzid, tzid).equals(zone001) ||
tzLink != null && canonicalTZMap.getOrDefault(tzLink, tzLink).equals(zone001)) {
tznames = Arrays.copyOf(tznames, tznames.length);
fillTZDBShortNames(tzid, tznames);
names.put(METAZONE_ID_PREFIX + meta, tznames);
}
}

private static String getTZDBLink(String tzid) {
String tzLink = null;
for (var k = tzid; tzdbLinks.containsKey(k);) {
k = tzLink = tzdbLinks.get(k);
}
return tzLink;
}

/*
* Convert TZDB offsets to JDK's offsets, eg, "-08" to "GMT-08:00".
* If it cannot recognize the pattern, return the argument as is.
Expand Down
15 changes: 0 additions & 15 deletions make/modules/jdk.jdwp.agent/Lib.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \
NAME := jdwp, \
OPTIMIZATION := LOW, \
CFLAGS := -DJDWP_LOGGING $(ICONV_CFLAGS), \
DISABLED_WARNINGS_gcc_eventFilter.c := unused-variable, \
DISABLED_WARNINGS_gcc_SDE.c := unused-function, \
DISABLED_WARNINGS_gcc_threadControl.c := unused-but-set-variable \
unused-variable, \
DISABLED_WARNINGS_gcc_utf_util.c := unused-but-set-variable, \
DISABLED_WARNINGS_clang_error_messages.c := format-nonliteral, \
DISABLED_WARNINGS_clang_eventFilter.c := unused-variable, \
DISABLED_WARNINGS_clang_EventRequestImpl.c := self-assign, \
DISABLED_WARNINGS_clang_inStream.c := sometimes-uninitialized, \
DISABLED_WARNINGS_clang_log_messages.c := format-nonliteral, \
DISABLED_WARNINGS_clang_SDE.c := unused-function, \
DISABLED_WARNINGS_clang_threadControl.c := unused-but-set-variable \
unused-variable, \
DISABLED_WARNINGS_clang_utf_util.c := unused-but-set-variable, \
DISABLED_WARNINGS_microsoft_debugInit.c := 5287, \
LDFLAGS := $(ICONV_LDFLAGS), \
EXTRA_HEADER_DIRS := \
include \
Expand Down
7 changes: 0 additions & 7 deletions src/hotspot/cpu/ppc/assembler_ppc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1573,10 +1573,6 @@ class Assembler : public AbstractAssembler {
static bool is_nop(int x) {
return x == 0x60000000;
}
// endgroup opcode for Power6
static bool is_endgroup(int x) {
return is_ori(x) && inv_ra_field(x) == 1 && inv_rs_field(x) == 1 && inv_d1_field(x) == 0;
}


private:
Expand Down Expand Up @@ -1652,9 +1648,6 @@ class Assembler : public AbstractAssembler {
inline void ori_opt( Register d, int ui16);
inline void oris_opt(Register d, int ui16);

// endgroup opcode for Power6
inline void endgroup();

// count instructions
inline void cntlzw( Register a, Register s);
inline void cntlzw_( Register a, Register s);
Expand Down
2 changes: 0 additions & 2 deletions src/hotspot/cpu/ppc/assembler_ppc.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ inline void Assembler::mr( Register d, Register s) { Assembler::orr(d, s,
inline void Assembler::ori_opt( Register d, int ui16) { if (ui16!=0) Assembler::ori( d, d, ui16); }
inline void Assembler::oris_opt(Register d, int ui16) { if (ui16!=0) Assembler::oris(d, d, ui16); }

inline void Assembler::endgroup() { Assembler::ori(R1, R1, 0); }

// count instructions
inline void Assembler::cntlzw( Register a, Register s) { emit_int32(CNTLZW_OPCODE | rta(a) | rs(s) | rc(0)); }
inline void Assembler::cntlzw_( Register a, Register s) { emit_int32(CNTLZW_OPCODE | rta(a) | rs(s) | rc(1)); }
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/cpu/ppc/disassembler_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ address Disassembler::decode_instruction0(address here, outputStream * st, addre
} else if (instruction == 0xbadbabe) {
st->print(".data 0xbadbabe");
next = here + Assembler::instr_len(here);
} else if (Assembler::is_endgroup(instruction)) {
st->print("endgroup");
next = here + Assembler::instr_len(here);
} else {
next = here;
}
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ void MacroAssembler::set_dest_of_bc_far_at(address instruction_addr, address des
// variant 3, far cond branch to the next instruction, already patched to nops:
//
// nop
// endgroup
// nop
// SKIP/DEST:
//
return;
Expand All @@ -499,7 +499,7 @@ void MacroAssembler::set_dest_of_bc_far_at(address instruction_addr, address des
if (is_bc_far_variant2_at(instruction_addr) && dest == instruction_addr + 8) {
// Far branch to next instruction: Optimize it by patching nops (produce variant 3).
masm.nop();
masm.endgroup();
masm.nop();
} else {
if (is_bc_far_variant1_at(instruction_addr)) {
// variant 1, the 1st instruction contains the destination address:
Expand Down
8 changes: 0 additions & 8 deletions src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ class MacroAssembler: public Assembler {
// Move register if destination register and target register are different
inline void mr_if_needed(Register rd, Register rs);
inline void fmr_if_needed(FloatRegister rd, FloatRegister rs);
// This is dedicated for emitting scheduled mach nodes. For better
// readability of the ad file I put it here.
// Endgroups are not needed if
// - the scheduler is off
// - the scheduler found that there is a natural group end, in that
// case it reduced the size of the instruction used in the test
// yielding 'needed'.
inline void endgroup_if_needed(bool needed);

// Memory barriers.
inline void membar(int bits);
Expand Down
13 changes: 4 additions & 9 deletions src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2025 SAP SE. All rights reserved.
* Copyright (c) 2002, 2026, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2026 SAP SE. 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 @@ -71,11 +71,6 @@ inline void MacroAssembler::mr_if_needed(Register rd, Register rs) {
inline void MacroAssembler::fmr_if_needed(FloatRegister rd, FloatRegister rs) {
if (rs != rd) fmr(rd, rs);
}
inline void MacroAssembler::endgroup_if_needed(bool needed) {
if (needed) {
endgroup();
}
}

inline void MacroAssembler::membar(int bits) {
// Comment: Usage of elemental_membar(bits) is not recommended for Power 8.
Expand Down Expand Up @@ -239,13 +234,13 @@ inline bool MacroAssembler::is_bc_far_variant3_at(address instruction_addr) {
// Variant 3, far cond branch to the next instruction, already patched to nops:
//
// nop
// endgroup
// nop
// SKIP/DEST:
//
const int instruction_1 = *(int*)(instruction_addr);
const int instruction_2 = *(int*)(instruction_addr + 4);
return is_nop(instruction_1) &&
is_endgroup(instruction_2);
is_nop(instruction_2);
}

// set dst to -1, 0, +1 as follows: if CR0bi is "greater than", dst is set to 1,
Expand Down
14 changes: 0 additions & 14 deletions src/hotspot/cpu/ppc/ppc.ad
Original file line number Diff line number Diff line change
Expand Up @@ -14211,20 +14211,6 @@ instruct tlsLoadP(threadRegP dst) %{

//---Some PPC specific nodes---------------------------------------------------

// Stop a group.
instruct endGroup() %{
ins_cost(0);

ins_is_nop(true);

format %{ "End Bundle (ori r1, r1, 0)" %}
size(4);
ins_encode %{
__ endgroup();
%}
ins_pipe(pipe_class_default);
%}

// Nop instructions

instruct fxNop() %{
Expand Down
8 changes: 4 additions & 4 deletions src/java.base/unix/native/libnio/ch/Net.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2026, 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 @@ -929,13 +929,13 @@ Java_sun_nio_ch_Net_pollConnect(JNIEnv *env, jobject this, jobject fdo, jlong ti
errno = 0;
result = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &n);
if (result < 0) {
handleSocketError(env, errno);
handleSocketErrorWithMessage(env, errno, "getsockopt failed");
return JNI_FALSE;
} else if (error) {
handleSocketError(env, error);
handleSocketErrorWithMessage(env, error, "connect failed");
return JNI_FALSE;
} else if ((poller.revents & POLLHUP) != 0) {
handleSocketError(env, ENOTCONN);
handleSocketErrorWithMessage(env, ENOTCONN, "peer closed connection after accepting");
return JNI_FALSE;
}
// connected
Expand Down
2 changes: 1 addition & 1 deletion src/java.desktop/share/legal/libpng.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## libpng v1.6.57
## libpng v1.6.58

### libpng License
<pre>
Expand Down
7 changes: 7 additions & 0 deletions src/java.desktop/share/native/libsplashscreen/libpng/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6379,6 +6379,13 @@ Version 1.6.57 [April 8, 2026]
Fixed integer overflow in rowbytes computation in read transforms.
(Contributed by Mohammad Seet.)

Version 1.6.58 [April 15, 2026]
Fixed a regression introduced in version 1.6.56 that caused `png_get_PLTE`
to return stale palette data after applying gamma and background transforms
in-place.
(Reported by ralfjunker <ralfjunker@users.noreply.github.com>.)


Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
Subscription is required; visit
<https://lists.sourceforge.net/lists/listinfo/png-mng-implement>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
README for libpng version 1.6.57
README for libpng version 1.6.58
================================

See the note about version numbers near the top of `png.h`.
Expand Down
4 changes: 2 additions & 2 deletions src/java.desktop/share/native/libsplashscreen/libpng/png.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "pngpriv.h"

/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_57 Your_png_h_is_not_version_1_6_57;
typedef png_libpng_version_1_6_58 Your_png_h_is_not_version_1_6_58;

/* Sanity check the chunks definitions - PNG_KNOWN_CHUNKS from pngpriv.h and the
* corresponding macro definitions. This causes a compile time failure if
Expand Down Expand Up @@ -849,7 +849,7 @@ png_get_copyright(png_const_structrp png_ptr)
return PNG_STRING_COPYRIGHT
#else
return PNG_STRING_NEWLINE \
"libpng version 1.6.57" PNG_STRING_NEWLINE \
"libpng version 1.6.58" PNG_STRING_NEWLINE \
"Copyright (c) 2018-2026 Cosmin Truta" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
Expand Down
Loading
Loading