Skip to content

Commit 3c565ad

Browse files
authored
Merge branch 'openjdk:master' into backport-sendaoYan-3c1010b5-master
2 parents c796143 + cdbdbdc commit 3c565ad

File tree

50 files changed

+1010
-179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1010
-179
lines changed

.jcheck/conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[general]
22
project=jdk-updates
33
jbs=JDK
4-
version=25.0.2
4+
version=25.0.3
55

66
[checks]
77
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright

make/conf/version-numbers.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828

2929
DEFAULT_VERSION_FEATURE=25
3030
DEFAULT_VERSION_INTERIM=0
31-
DEFAULT_VERSION_UPDATE=2
31+
DEFAULT_VERSION_UPDATE=3
3232
DEFAULT_VERSION_PATCH=0
3333
DEFAULT_VERSION_EXTRA1=0
3434
DEFAULT_VERSION_EXTRA2=0
3535
DEFAULT_VERSION_EXTRA3=0
36-
DEFAULT_VERSION_DATE=2026-01-20
36+
DEFAULT_VERSION_DATE=2026-04-21
3737
DEFAULT_VERSION_CLASSFILE_MAJOR=69 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
3838
DEFAULT_VERSION_CLASSFILE_MINOR=0
3939
DEFAULT_VERSION_DOCS_API_SINCE=11

make/ide/vscode/hotspot/CreateVSCodeProject.gmk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ define CreateFromTemplate
8484
$(SED) -e 's!{{TOPDIR}}!$(call SedEscape,$(call FixPath,$(TOPDIR)))!g' \
8585
-e 's!{{TOPDIR_RELATIVE}}!$(call SedEscape,$(call FixPath,$(strip \
8686
$(call RelativePath,$(OUTPUTDIR),$(TOPDIR)))))!g' \
87+
-e 's!{{TOPDIR_BASE}}!$(notdir $(TOPDIR))!g' \
88+
-e 's!{{OUTPUT_BASE}}!$(notdir $(OUTPUTDIR))!g' \
8789
-e 's!{{WORKSPACE_ROOT}}!$(call SedEscape,$(call FixPath,$(WORKSPACE_ROOT)))!g' \
8890
-e 's!{{OUTPUTDIR}}!$(call SedEscape,$(call FixPath,$(OUTPUTDIR)))!g' \
8991
-e 's!{{CONF_NAME}}!$(CONF_NAME)!g' \

make/ide/vscode/hotspot/template-workspace.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"folders": [
33
{
4-
"name": "Source root",
4+
"name": "Source root ({{TOPDIR_BASE}})",
55
"path": "{{TOPDIR}}"
66
},
77
// {{EXTRA_WORKSPACE_ROOT}}
88
{
9-
"name": "Build artifacts",
9+
"name": "Build artifacts ({{OUTPUT_BASE}})",
1010
"path": "{{OUTPUTDIR}}"
1111
}
1212
],

src/hotspot/cpu/x86/stubGenerator_x86_64.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,8 @@ class StubGenerator: public StubCodeGenerator {
393393
XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, XMMRegister xmm8);
394394
void ghash_last_8_avx2(Register subkeyHtbl);
395395

396+
void check_key_offset(Register key, int offset, int load_size);
397+
396398
// Load key and shuffle operation
397399
void ev_load_key(XMMRegister xmmdst, Register key, int offset, XMMRegister xmm_shuf_mask);
398400
void ev_load_key(XMMRegister xmmdst, Register key, int offset, Register rscratch);

src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1759,25 +1759,43 @@ void StubGenerator::roundDeclast(XMMRegister xmm_reg) {
17591759
__ vaesdeclast(xmm8, xmm8, xmm_reg, Assembler::AVX_512bit);
17601760
}
17611761

1762+
// Check incoming byte offset against the int[] len. key is the pointer to the int[0].
1763+
// This check happens often, so it is important for it to be very compact.
1764+
void StubGenerator::check_key_offset(Register key, int offset, int load_size) {
1765+
#ifdef ASSERT
1766+
Address key_length(key, arrayOopDesc::length_offset_in_bytes() - arrayOopDesc::base_offset_in_bytes(T_INT));
1767+
assert((offset + load_size) % 4 == 0, "Alignment is good: %d + %d", offset, load_size);
1768+
int end_offset = (offset + load_size) / 4;
1769+
Label L_good;
1770+
__ cmpl(key_length, end_offset);
1771+
__ jccb(Assembler::greaterEqual, L_good);
1772+
__ hlt();
1773+
__ bind(L_good);
1774+
#endif
1775+
}
17621776

17631777
// Utility routine for loading a 128-bit key word in little endian format
17641778
void StubGenerator::load_key(XMMRegister xmmdst, Register key, int offset, XMMRegister xmm_shuf_mask) {
1779+
check_key_offset(key, offset, 16);
17651780
__ movdqu(xmmdst, Address(key, offset));
17661781
__ pshufb(xmmdst, xmm_shuf_mask);
17671782
}
17681783

17691784
void StubGenerator::load_key(XMMRegister xmmdst, Register key, int offset, Register rscratch) {
1785+
check_key_offset(key, offset, 16);
17701786
__ movdqu(xmmdst, Address(key, offset));
17711787
__ pshufb(xmmdst, ExternalAddress(key_shuffle_mask_addr()), rscratch);
17721788
}
17731789

17741790
void StubGenerator::ev_load_key(XMMRegister xmmdst, Register key, int offset, XMMRegister xmm_shuf_mask) {
1791+
check_key_offset(key, offset, 16);
17751792
__ movdqu(xmmdst, Address(key, offset));
17761793
__ pshufb(xmmdst, xmm_shuf_mask);
17771794
__ evshufi64x2(xmmdst, xmmdst, xmmdst, 0x0, Assembler::AVX_512bit);
17781795
}
17791796

17801797
void StubGenerator::ev_load_key(XMMRegister xmmdst, Register key, int offset, Register rscratch) {
1798+
check_key_offset(key, offset, 16);
17811799
__ movdqu(xmmdst, Address(key, offset));
17821800
__ pshufb(xmmdst, ExternalAddress(key_shuffle_mask_addr()), rscratch);
17831801
__ evshufi64x2(xmmdst, xmmdst, xmmdst, 0x0, Assembler::AVX_512bit);
@@ -3205,12 +3223,12 @@ void StubGenerator::ghash16_encrypt_parallel16_avx512(Register in, Register out,
32053223

32063224
//AES round 9
32073225
roundEncode(AESKEY2, B00_03, B04_07, B08_11, B12_15);
3208-
ev_load_key(AESKEY2, key, 11 * 16, rbx);
32093226
//AES rounds up to 11 (AES192) or 13 (AES256)
32103227
//AES128 is done
32113228
__ cmpl(NROUNDS, 52);
32123229
__ jcc(Assembler::less, last_aes_rnd);
32133230
__ bind(aes_192);
3231+
ev_load_key(AESKEY2, key, 11 * 16, rbx);
32143232
roundEncode(AESKEY1, B00_03, B04_07, B08_11, B12_15);
32153233
ev_load_key(AESKEY1, key, 12 * 16, rbx);
32163234
roundEncode(AESKEY2, B00_03, B04_07, B08_11, B12_15);

src/hotspot/share/prims/jvmtiAgentList.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ void JvmtiAgentList::load_xrun_agents() {
201201
// Invokes Agent_OnAttach for agents loaded dynamically during runtime.
202202
void JvmtiAgentList::load_agent(const char* agent_name, bool is_absolute_path,
203203
const char* options, outputStream* st) {
204+
if (JvmtiEnvBase::get_phase() != JVMTI_PHASE_LIVE) {
205+
st->print_cr("Dynamic agent loading is only permitted in the live phase");
206+
return;
207+
}
208+
204209
JvmtiAgent* const agent = new JvmtiAgent(agent_name, options, is_absolute_path, /* dynamic agent */ true);
205210
if (agent->load(st)) {
206211
add(agent);

src/java.base/share/classes/java/text/CompactNumberFormat.java

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,38 +247,43 @@ public final class CompactNumberFormat extends NumberFormat {
247247

248248
/**
249249
* List of positive prefix patterns of this formatter's
250-
* compact number patterns.
250+
* compact number patterns. This field is a read-only
251+
* constant once initialized.
251252
*/
252253
private transient List<Patterns> positivePrefixPatterns;
253254

254255
/**
255256
* List of negative prefix patterns of this formatter's
256-
* compact number patterns.
257+
* compact number patterns. This field is a read-only
258+
* constant once initialized.
257259
*/
258260
private transient List<Patterns> negativePrefixPatterns;
259261

260262
/**
261263
* List of positive suffix patterns of this formatter's
262-
* compact number patterns.
264+
* compact number patterns. This field is a read-only
265+
* constant once initialized.
263266
*/
264267
private transient List<Patterns> positiveSuffixPatterns;
265268

266269
/**
267270
* List of negative suffix patterns of this formatter's
268-
* compact number patterns.
271+
* compact number patterns. This field is a read-only
272+
* constant once initialized.
269273
*/
270274
private transient List<Patterns> negativeSuffixPatterns;
271275

272276
/**
273277
* List of divisors of this formatter's compact number patterns.
274278
* Divisor can be either Long or BigInteger (if the divisor value goes
275-
* beyond long boundary)
279+
* beyond long boundary). This field is a read-only constant
280+
* once initialized.
276281
*/
277282
private transient List<Number> divisors;
278283

279284
/**
280285
* List of place holders that represent minimum integer digits at each index
281-
* for each count.
286+
* for each count. This field is a read-only constant once initialized.
282287
*/
283288
private transient List<Patterns> placeHolderPatterns;
284289

@@ -371,7 +376,7 @@ public final class CompactNumberFormat extends NumberFormat {
371376

372377
/**
373378
* The map for plural rules that maps LDML defined tags (e.g. "one") to
374-
* its rule.
379+
* its rule. This field is a read-only constant once initialized.
375380
*/
376381
private transient Map<String, String> rulesMap;
377382

@@ -1512,7 +1517,7 @@ private void applyPattern(String count, String pattern, int index) {
15121517
}
15131518
}
15141519

1515-
private final transient DigitList digitList = new DigitList();
1520+
private transient DigitList digitList = new DigitList();
15161521
private static final int STATUS_INFINITE = 0;
15171522
private static final int STATUS_POSITIVE = 1;
15181523
private static final int STATUS_LENGTH = 2;
@@ -2504,8 +2509,14 @@ public String toString() {
25042509
@Override
25052510
public CompactNumberFormat clone() {
25062511
CompactNumberFormat other = (CompactNumberFormat) super.clone();
2512+
2513+
// Cloning reference fields. Other fields (e.g., "positivePrefixPatterns")
2514+
// are not cloned since they are read-only constants after initialization.
25072515
other.compactPatterns = compactPatterns.clone();
25082516
other.symbols = (DecimalFormatSymbols) symbols.clone();
2517+
other.decimalFormat = (DecimalFormat) decimalFormat.clone();
2518+
other.defaultDecimalFormat = (DecimalFormat) defaultDecimalFormat.clone();
2519+
other.digitList = (DigitList) digitList.clone();
25092520
return other;
25102521
}
25112522

src/java.base/share/classes/java/util/GregorianCalendar.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -1214,8 +1214,10 @@ public void roll(int field, int amount) {
12141214
d.setHours(hourOfDay);
12151215
time = calsys.getTime(d);
12161216

1217-
// If we stay on the same wall-clock time, try the next or previous hour.
1218-
if (internalGet(HOUR_OF_DAY) == d.getHours()) {
1217+
// If the rolled amount is not a full HOUR/HOUR_OF_DAY (12/24-hour) cycle and
1218+
// if we stay on the same wall-clock time, try the next or previous hour.
1219+
if (((field == HOUR_OF_DAY && amount % 24 != 0) || (field == HOUR && amount % 12 != 0))
1220+
&& internalGet(HOUR_OF_DAY) == d.getHours()) {
12191221
hourOfDay = getRolledValue(rolledValue, amount > 0 ? +1 : -1, min, max);
12201222
if (field == HOUR && internalGet(AM_PM) == PM) {
12211223
hourOfDay += 12;

src/java.desktop/share/classes/sun/font/CompositeFont.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -88,7 +88,7 @@ public CompositeFont(String name, String[] compFileNames,
8888

8989
/*
9090
* See if this is a windows locale which has a system EUDC font.
91-
* If so add it as the final fallback component of the composite.
91+
* If so add it as the first fallback component of the composite.
9292
* The caller could be responsible for this, but for now it seems
9393
* better that it is handled internally to the CompositeFont class.
9494
*/
@@ -114,8 +114,8 @@ public CompositeFont(String name, String[] compFileNames,
114114
components[msCnt] = fm.getEUDCFont();
115115
deferredInitialisation = new boolean[numSlots];
116116
if (defer) {
117-
for (int i=0; i<numSlots-1; i++) {
118-
deferredInitialisation[i] = true;
117+
for (int i = 0; i < numSlots; i++) {
118+
deferredInitialisation[i] = (i != msCnt);
119119
}
120120
}
121121
} else {

0 commit comments

Comments
 (0)