Skip to content

Commit aef567b

Browse files
authored
Merge branch 'openjdk:master' into backport-mrserb-bc0379ea-master
2 parents 6397e2e + abda9d8 commit aef567b

File tree

204 files changed

+5673
-2039
lines changed

Some content is hidden

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

204 files changed

+5673
-2039
lines changed

.github/workflows/submit.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919
jobs:
2020
prerequisites:
2121
name: Prerequisites
22-
runs-on: "ubuntu-20.04"
22+
runs-on: "ubuntu-22.04"
2323
outputs:
2424
should_run: ${{ steps.check_submit.outputs.should_run }}
2525
bundle_id: ${{ steps.check_bundle_id.outputs.bundle_id }}
@@ -115,7 +115,7 @@ jobs:
115115

116116
linux_x64_build:
117117
name: Linux x64
118-
runs-on: "ubuntu-20.04"
118+
runs-on: "ubuntu-22.04"
119119
needs: prerequisites
120120
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x64 != 'false'
121121

@@ -191,7 +191,7 @@ jobs:
191191
192192
linux_x64_test:
193193
name: Linux x64
194-
runs-on: "ubuntu-20.04"
194+
runs-on: "ubuntu-22.04"
195195
needs:
196196
- prerequisites
197197
- linux_x64_build
@@ -203,13 +203,16 @@ jobs:
203203
- jdk/tier1
204204
- langtools/tier1
205205
- hotspot/tier1
206+
- jdk/security_infra
206207
include:
207208
- test: jdk/tier1
208209
suites: jdk_tier1
209210
- test: langtools/tier1
210211
suites: langtools_tier1
211212
- test: hotspot/tier1
212213
suites: hotspot_tier1
214+
- test: jdk/security_infra
215+
suites: jdk_security_infra
213216

214217
env:
215218
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}"
@@ -305,7 +308,7 @@ jobs:
305308

306309
linux_additional_build:
307310
name: Linux additional
308-
runs-on: "ubuntu-20.04"
311+
runs-on: "ubuntu-22.04"
309312
needs:
310313
- prerequisites
311314
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_additional != 'false'
@@ -461,7 +464,7 @@ jobs:
461464

462465
linux_x86_build:
463466
name: Linux x86
464-
runs-on: "ubuntu-20.04"
467+
runs-on: "ubuntu-22.04"
465468
needs: prerequisites
466469
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_linux_x86 != 'false'
467470

@@ -547,7 +550,7 @@ jobs:
547550
548551
linux_x86_test:
549552
name: Linux x86
550-
runs-on: "ubuntu-20.04"
553+
runs-on: "ubuntu-22.04"
551554
needs:
552555
- prerequisites
553556
- linux_x86_build
@@ -559,13 +562,16 @@ jobs:
559562
- jdk/tier1
560563
- langtools/tier1
561564
- hotspot/tier1
565+
- jdk/security_infra
562566
include:
563567
- test: jdk/tier1
564568
suites: jdk_tier1
565569
- test: langtools/tier1
566570
suites: langtools_tier1
567571
- test: hotspot/tier1
568572
suites: hotspot_tier1
573+
- test: jdk/security_infra
574+
suites: jdk_security_infra
569575

570576
# Reduced 32-bit build uses the same boot JDK as 64-bit build
571577
env:
@@ -1034,13 +1040,16 @@ jobs:
10341040
- jdk/tier1
10351041
- langtools/tier1
10361042
- hotspot/tier1
1043+
- jdk/security_infra
10371044
include:
10381045
- test: jdk/tier1
10391046
suites: jdk_tier1
10401047
- test: langtools/tier1
10411048
suites: langtools_tier1
10421049
- test: hotspot/tier1
10431050
suites: hotspot_tier1
1051+
- test: jdk/security_infra
1052+
suites: jdk_security_infra
10441053

10451054
env:
10461055
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}"
@@ -1192,13 +1201,16 @@ jobs:
11921201
- jdk/tier1
11931202
- langtools/tier1
11941203
- hotspot/tier1
1204+
- jdk/security_infra
11951205
include:
11961206
- test: jdk/tier1
11971207
suites: jdk_tier1
11981208
- test: langtools/tier1
11991209
suites: langtools_tier1
12001210
- test: hotspot/tier1
12011211
suites: hotspot_tier1
1212+
- test: jdk/security_infra
1213+
suites: jdk_security_infra
12021214

12031215
env:
12041216
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}"
@@ -1448,13 +1460,16 @@ jobs:
14481460
- jdk/tier1
14491461
- langtools/tier1
14501462
- hotspot/tier1
1463+
- jdk/security_infra
14511464
include:
14521465
- test: jdk/tier1
14531466
suites: jdk_tier1
14541467
- test: langtools/tier1
14551468
suites: langtools_tier1
14561469
- test: hotspot/tier1
14571470
suites: hotspot_tier1
1471+
- test: jdk/security_infra
1472+
suites: jdk_security_infra
14581473

14591474
env:
14601475
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MAJOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MINOR_VERSION }}.${{ fromJson(needs.prerequisites.outputs.dependencies).JDK_MICRO_VERSION }}"
@@ -1569,7 +1584,7 @@ jobs:
15691584

15701585
artifacts:
15711586
name: Post-process artifacts
1572-
runs-on: "ubuntu-20.04"
1587+
runs-on: "ubuntu-22.04"
15731588
if: always()
15741589
continue-on-error: true
15751590
needs:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/build/
22
/dist/
33
/.idea/
4+
/.vscode/
45
nbproject/private/
56
/webrev
67
/.src-rev

.jcheck/conf

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

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

common/autoconf/version-numbers

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 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
@@ -26,7 +26,7 @@
2626
JDK_MAJOR_VERSION=1
2727
JDK_MINOR_VERSION=8
2828
JDK_MICRO_VERSION=0
29-
JDK_UPDATE_VERSION=442
29+
JDK_UPDATE_VERSION=462
3030
LAUNCHER_NAME=openjdk
3131
PRODUCT_NAME=OpenJDK
3232
PRODUCT_SUFFIX="Runtime Environment"

hotspot/src/os/posix/vm/os_posix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ bool os::ThreadCrashProtection::call(os::CrashProtectionCallback& cb) {
876876

877877
Thread::muxAcquire(&_crash_mux, "CrashProtection");
878878

879-
_protected_thread = ThreadLocalStorage::thread();
879+
_protected_thread = Thread::current_or_null();
880880
assert(_protected_thread != NULL, "Cannot crash protect a NULL thread");
881881

882882
// we cannot rely on sigsetjmp/siglongjmp to save/restore the signal mask

hotspot/src/os/windows/vm/os_windows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4890,7 +4890,7 @@ bool os::ThreadCrashProtection::call(os::CrashProtectionCallback& cb) {
48904890

48914891
Thread::muxAcquire(&_crash_mux, "CrashProtection");
48924892

4893-
_protected_thread = ThreadLocalStorage::thread();
4893+
_protected_thread = Thread::current_or_null();
48944894
assert(_protected_thread != NULL, "Cannot crash protect a NULL thread");
48954895

48964896
bool success = true;

hotspot/src/share/vm/jfr/recorder/repository/jfrEmergencyDump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static const char* create_emergency_chunk_path(const char* repository_path) {
306306
return NULL;
307307
}
308308
// append the individual substrings
309-
jio_snprintf(chunk_path, chunkname_max_len, "%s%s%s%s", repository_path_len, os::file_separator(), date_time_buffer, chunk_file_jfr_ext);
309+
jio_snprintf(chunk_path, chunkname_max_len, "%s%s%s%s", repository_path, os::file_separator(), date_time_buffer, chunk_file_jfr_ext);
310310
return chunk_path;
311311
}
312312

hotspot/src/share/vm/opto/addnode.cpp

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 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
@@ -941,6 +941,14 @@ static bool can_overflow(const TypeInt* t, jint c) {
941941
(c > 0 && (java_add(t_hi, c) < t_hi)));
942942
}
943943

944+
// Check if addition of a long with type 't' and a constant 'c' can overflow.
945+
static bool can_overflow(const TypeLong* t, jlong c) {
946+
jlong t_lo = t->_lo;
947+
jlong t_hi = t->_hi;
948+
return ((c < 0 && (java_add(t_lo, c) > t_lo)) ||
949+
(c > 0 && (java_add(t_hi, c) < t_hi)));
950+
}
951+
944952
//=============================================================================
945953
//------------------------------Idealize---------------------------------------
946954
// MINs show up in range-check loop limit calculations. Look for
@@ -1052,6 +1060,31 @@ Node *MinINode::Ideal(PhaseGVN *phase, bool can_reshape) {
10521060
//
10531061
// Note: we assume that SubL was already replaced by an AddL, and that the stride
10541062
// has its sign flipped: SubL(limit, stride) -> AddL(limit, -stride).
1063+
//
1064+
// Proof MaxL collapsed version equivalent to original (MinL version similar):
1065+
// is_sub_con ensures that con1, con2 ∈ [min_int, 0[
1066+
//
1067+
// Original:
1068+
// - AddL2 underflow => x + con2 ∈ ]max_long - min_int, max_long], ALWAYS BAILOUT as x + con1 + con2 surely fails can_overflow (*)
1069+
// - AddL2 no underflow => x + con2 ∈ [min_long, max_long]
1070+
// - MaxL2 clamp => min_int
1071+
// - AddL1 underflow: NOT POSSIBLE: cannot underflow since min_int + con1 ∈ [2 * min_int, min_int] always > min_long
1072+
// - AddL1 no underflow => min_int + con1 ∈ [2 * min_int, min_int]
1073+
// - MaxL1 clamp => min_int (RESULT 1)
1074+
// - MaxL1 no clamp: NOT POSSIBLE: min_int + con1 ∈ [2 * min_int, min_int] always <= min_int, so clamp always taken
1075+
// - MaxL2 no clamp => x + con2 ∈ [min_int, max_long]
1076+
// - AddL1 underflow: NOT POSSIBLE: cannot underflow since x + con2 + con1 ∈ [2 * min_int, max_long] always > min_long
1077+
// - AddL1 no underflow => x + con2 + con1 ∈ [2 * min_int, max_long]
1078+
// - MaxL1 clamp => min_int (RESULT 2)
1079+
// - MaxL1 no clamp => x + con2 + con1 ∈ ]min_int, max_long] (RESULT 3)
1080+
//
1081+
// Collapsed:
1082+
// - AddL2 (cannot underflow) => con2 + con1 ∈ [2 * min_int, 0]
1083+
// - AddL1 underflow: NOT POSSIBLE: would have bailed out at can_overflow (*)
1084+
// - AddL1 no underflow => x + con2 + con1 ∈ [min_long, max_long]
1085+
// - MaxL clamp => min_int (RESULT 1 and RESULT 2)
1086+
// - MaxL no clamp => x + con2 + con1 ∈ ]min_int, max_long] (RESULT 3)
1087+
//
10551088
static bool is_clamp(PhaseGVN* phase, Node* n, Node* c) {
10561089
// Check that the two clamps have the correct values.
10571090
jlong clamp = (n->Opcode() == Op_MaxL) ? min_jint : max_jint;
@@ -1083,6 +1116,10 @@ Node* fold_subI_no_underflow_pattern(Node* n, PhaseGVN* phase) {
10831116
Node* x = add2->in(1);
10841117
Node* con2 = add2->in(2);
10851118
if (is_sub_con(phase, n, con2)) {
1119+
// Collapsed graph not equivalent if potential over/underflow -> bailing out (*)
1120+
if (can_overflow(phase->type(x)->is_long(), con1->get_long() + con2->get_long())) {
1121+
return NULL;
1122+
}
10861123
Node* new_con = phase->transform(new (phase->C) AddLNode(con1, con2));
10871124
Node* new_sub = phase->transform(new (phase->C) AddLNode(x, new_con));
10881125
n->set_req_X(1, new_sub, phase);

hotspot/src/share/vm/opto/ifnode.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,18 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) {
145145
Node* v = u->fast_out(k); // User of the phi
146146
// CNC - Allow only really simple patterns.
147147
// In particular I disallow AddP of the Phi, a fairly common pattern
148-
if( v == cmp ) continue; // The compare is OK
149-
if( (v->is_ConstraintCast()) &&
150-
v->in(0)->in(0) == iff )
151-
continue; // CastPP/II of the IfNode is OK
148+
if (v == cmp) continue; // The compare is OK
149+
if (v->is_ConstraintCast()) {
150+
// If the cast is derived from data flow edges, it may not have a control edge.
151+
// If so, it should be safe to split. But follow-up code can not deal with
152+
// this (l. 359). So skip.
153+
if (v->in(0) == NULL) {
154+
return NULL;
155+
}
156+
if (v->in(0)->in(0) == iff) {
157+
continue; // CastPP/II of the IfNode is OK
158+
}
159+
}
152160
// Disabled following code because I cannot tell if exactly one
153161
// path dominates without a real dominator check. CNC 9/9/1999
154162
//uint vop = v->Opcode();

hotspot/src/share/vm/opto/loopnode.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ Node *LoopLimitNode::Ideal(PhaseGVN *phase, bool can_reshape) {
12201220

12211221
const TypeInt* init_t = phase->type(in(Init) )->is_int();
12221222
const TypeInt* limit_t = phase->type(in(Limit))->is_int();
1223-
int stride_p;
1223+
jlong stride_p;
12241224
jlong lim, ini;
12251225
julong max;
12261226
if (stride_con > 0) {
@@ -1229,10 +1229,10 @@ Node *LoopLimitNode::Ideal(PhaseGVN *phase, bool can_reshape) {
12291229
ini = init_t->_lo;
12301230
max = (julong)max_jint;
12311231
} else {
1232-
stride_p = -stride_con;
1232+
stride_p = -(jlong)stride_con;
12331233
lim = init_t->_hi;
12341234
ini = limit_t->_lo;
1235-
max = (julong)min_jint;
1235+
max = (julong)(juint)min_jint; // double cast to get 0x0000000080000000, not 0xffffffff80000000
12361236
}
12371237
julong range = lim - ini + stride_p;
12381238
if (range <= max) {

0 commit comments

Comments
 (0)