Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to tag jdk-11.0.26+1 #1864

Merged
merged 20 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ on:
jobs:
build-macos:
name: build
runs-on: macos-13
runs-on: macos-12

strategy:
fail-fast: false
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-x64
xcode-toolset-version: '14.3.1'
xcode-toolset-version: '13.4.1'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.macos-x64 == 'true'
Expand All @@ -234,7 +234,7 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-aarch64
xcode-toolset-version: '14.3.1'
xcode-toolset-version: '13.4.1'
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
Expand Down Expand Up @@ -298,7 +298,7 @@ jobs:
with:
platform: macos-x64
bootjdk-platform: macos-x64
runs-on: macos-13
runs-on: macos-12

test-windows-x64:
name: windows-x64
Expand Down Expand Up @@ -341,7 +341,7 @@ jobs:
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: Bearer ${{ github.token }}' \
-H 'X-GitHub-Api-Version: 2022-11-28' \
'${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts')"
'${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts?per_page=100')"
BUNDLE_ARTIFACT_IDS="$(echo "$ALL_ARTIFACT_IDS" | jq -r -c '.artifacts | map(select(.name|startswith("bundles-"))) | .[].id')"
for id in $BUNDLE_ARTIFACT_IDS; do
echo "Removing $id"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
run: |
# On macOS we need to install some dependencies for testing
brew install make
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
sudo xcode-select --switch /Applications/Xcode_13.4.1.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
if: runner.os == 'macOS'
Expand Down
2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
project=jdk-updates
jbs=JDK
version=11.0.25
version=11.0.26

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
Expand Down
3 changes: 3 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# JDK Vulnerabilities

Please follow the process outlined in the [OpenJDK Vulnerability Policy](https://openjdk.org/groups/vulnerability/report) to disclose vulnerabilities in the JDK.
6 changes: 3 additions & 3 deletions make/autoconf/version-numbers
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@

DEFAULT_VERSION_FEATURE=11
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=25
DEFAULT_VERSION_UPDATE=26
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2024-10-15
DEFAULT_VERSION_DATE=2025-01-21
DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11"
DEFAULT_PROMOTED_VERSION_PRE=
DEFAULT_PROMOTED_VERSION_PRE=ea

LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK
Expand Down
4 changes: 3 additions & 1 deletion make/hotspot/lib/JvmFlags.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ JVM_CFLAGS_TARGET_DEFINES += \
#

ifeq ($(DEBUG_LEVEL), release)
# release builds disable uses of assert macro from <assert.h>.
JVM_CFLAGS_DEBUGLEVEL := -DNDEBUG
# For hotspot, release builds differ internally between "optimized" and "product"
# in that "optimize" does not define PRODUCT.
ifneq ($(HOTSPOT_DEBUG_LEVEL), optimized)
JVM_CFLAGS_DEBUGLEVEL := -DPRODUCT
JVM_CFLAGS_DEBUGLEVEL += -DPRODUCT
endif
else ifeq ($(DEBUG_LEVEL), fastdebug)
JVM_CFLAGS_DEBUGLEVEL := -DASSERT
Expand Down
50 changes: 26 additions & 24 deletions make/jdk/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 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 @@ -363,33 +363,35 @@ int parseYear(String year, int defaultYear) {
}

Month parseMonth(String mon) {
switch (mon) {
case "Jan": return Month.JANUARY;
case "Feb": return Month.FEBRUARY;
case "Mar": return Month.MARCH;
case "Apr": return Month.APRIL;
case "May": return Month.MAY;
case "Jun": return Month.JUNE;
case "Jul": return Month.JULY;
case "Aug": return Month.AUGUST;
case "Sep": return Month.SEPTEMBER;
case "Oct": return Month.OCTOBER;
case "Nov": return Month.NOVEMBER;
case "Dec": return Month.DECEMBER;
}
int len = mon.length();

if (mon.regionMatches(true, 0, "January", 0, len)) return Month.JANUARY;
if (mon.regionMatches(true, 0, "February", 0, len)) return Month.FEBRUARY;
if (mon.regionMatches(true, 0, "March", 0, len)) return Month.MARCH;
if (mon.regionMatches(true, 0, "April", 0, len)) return Month.APRIL;
if (mon.regionMatches(true, 0, "May", 0, len)) return Month.MAY;
if (mon.regionMatches(true, 0, "June", 0, len)) return Month.JUNE;
if (mon.regionMatches(true, 0, "July", 0, len)) return Month.JULY;
if (mon.regionMatches(true, 0, "August", 0, len)) return Month.AUGUST;
if (mon.regionMatches(true, 0, "September", 0, len)) return Month.SEPTEMBER;
if (mon.regionMatches(true, 0, "October", 0, len)) return Month.OCTOBER;
if (mon.regionMatches(true, 0, "November", 0, len)) return Month.NOVEMBER;
if (mon.regionMatches(true, 0, "December", 0, len)) return Month.DECEMBER;

throw new IllegalArgumentException("Unknown month: " + mon);
}

DayOfWeek parseDayOfWeek(String dow) {
switch (dow) {
case "Mon": return DayOfWeek.MONDAY;
case "Tue": return DayOfWeek.TUESDAY;
case "Wed": return DayOfWeek.WEDNESDAY;
case "Thu": return DayOfWeek.THURSDAY;
case "Fri": return DayOfWeek.FRIDAY;
case "Sat": return DayOfWeek.SATURDAY;
case "Sun": return DayOfWeek.SUNDAY;
}
int len = dow.length();

if (dow.regionMatches(true, 0, "Monday", 0, len)) return DayOfWeek.MONDAY;
if (dow.regionMatches(true, 0, "Tuesday", 0, len)) return DayOfWeek.TUESDAY;
if (dow.regionMatches(true, 0, "Wednesday", 0, len)) return DayOfWeek.WEDNESDAY;
if (dow.regionMatches(true, 0, "Thursday", 0, len)) return DayOfWeek.THURSDAY;
if (dow.regionMatches(true, 0, "Friday", 0, len)) return DayOfWeek.FRIDAY;
if (dow.regionMatches(true, 0, "Saturday", 0, len)) return DayOfWeek.SATURDAY;
if (dow.regionMatches(true, 0, "Sunday", 0, len)) return DayOfWeek.SUNDAY;

throw new IllegalArgumentException("Unknown day-of-week: " + dow);
}

Expand Down
35 changes: 26 additions & 9 deletions src/hotspot/share/asm/codeBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,26 +1046,32 @@ class CodeString: public CHeapObj<mtCode> {
friend class CodeStrings;
const char * _string;
CodeString* _next;
CodeString* _prev;
intptr_t _offset;

~CodeString() {
assert(_next == NULL, "wrong interface for freeing list");
assert(_next == NULL && _prev == NULL, "wrong interface for freeing list");
os::free((void*)_string);
}

bool is_comment() const { return _offset >= 0; }

public:
CodeString(const char * string, intptr_t offset = -1)
: _next(NULL), _offset(offset) {
: _next(NULL), _prev(NULL), _offset(offset) {
_string = os::strdup(string, mtCode);
}

const char * string() const { return _string; }
intptr_t offset() const { assert(_offset >= 0, "offset for non comment?"); return _offset; }
CodeString* next() const { return _next; }

void set_next(CodeString* next) { _next = next; }
void set_next(CodeString* next) {
_next = next;
if (next != NULL) {
next->_prev = this;
}
}

CodeString* first_comment() {
if (is_comment()) {
Expand Down Expand Up @@ -1093,12 +1099,9 @@ CodeString* CodeStrings::find(intptr_t offset) const {

// Convenience for add_comment.
CodeString* CodeStrings::find_last(intptr_t offset) const {
CodeString* a = find(offset);
if (a != NULL) {
CodeString* c = NULL;
while (((c = a->next_comment()) != NULL) && (c->offset() == offset)) {
a = c;
}
CodeString* a = _strings_last;
while (a != NULL && !a->is_comment() && a->offset() > offset) {
a = a->_prev;
}
return a;
}
Expand All @@ -1117,12 +1120,16 @@ void CodeStrings::add_comment(intptr_t offset, const char * comment) {
c->set_next(_strings);
_strings = c;
}
if (c->next() == NULL) {
_strings_last = c;
}
}

void CodeStrings::assign(CodeStrings& other) {
other.check_valid();
assert(is_null(), "Cannot assign onto non-empty CodeStrings");
_strings = other._strings;
_strings_last = other._strings_last;
#ifdef ASSERT
_defunct = false;
#endif
Expand All @@ -1138,8 +1145,11 @@ void CodeStrings::copy(CodeStrings& other) {
assert(is_null(), "Cannot copy onto non-empty CodeStrings");
CodeString* n = other._strings;
CodeString** ps = &_strings;
CodeString* prev = NULL;
while (n != NULL) {
*ps = new CodeString(n->string(),n->offset());
(*ps)->_prev = prev;
prev = *ps;
ps = &((*ps)->_next);
n = n->next();
}
Expand Down Expand Up @@ -1168,6 +1178,10 @@ void CodeStrings::free() {
// unlink the node from the list saving a pointer to the next
CodeString* p = n->next();
n->set_next(NULL);
if (p != NULL) {
assert(p->_prev == n, "missing prev link");
p->_prev = NULL;
}
delete n;
n = p;
}
Expand All @@ -1178,6 +1192,9 @@ const char* CodeStrings::add_string(const char * string) {
check_valid();
CodeString* s = new CodeString(string);
s->set_next(_strings);
if (_strings == NULL) {
_strings_last = s;
}
_strings = s;
assert(s->string() != NULL, "should have a string");
return s->string();
Expand Down
3 changes: 3 additions & 0 deletions src/hotspot/share/asm/codeBuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ class CodeStrings {
private:
#ifndef PRODUCT
CodeString* _strings;
CodeString* _strings_last;
#ifdef ASSERT
// Becomes true after copy-out, forbids further use.
bool _defunct; // Zero bit pattern is "valid", see memset call in decode_env::decode_env
Expand All @@ -262,6 +263,7 @@ class CodeStrings {
void set_null_and_invalidate() {
#ifndef PRODUCT
_strings = NULL;
_strings_last = NULL;
#ifdef ASSERT
_defunct = true;
#endif
Expand All @@ -272,6 +274,7 @@ class CodeStrings {
CodeStrings() {
#ifndef PRODUCT
_strings = NULL;
_strings_last = NULL;
#ifdef ASSERT
_defunct = false;
#endif
Expand Down
36 changes: 36 additions & 0 deletions src/hotspot/share/utilities/vmassert_reinstall.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2022, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/

// Intentionally no #include guard. May be included multiple times for effect.

// See vmassert_uninstall.hpp for usage.

// Remove possible stdlib assert macro (or any others, for that matter).
#undef assert

// Reinstall HotSpot's assert macro, if previously defined.
#ifdef vmassert
#define assert(p, ...) vmassert(p, __VA_ARGS__)
#endif

45 changes: 45 additions & 0 deletions src/hotspot/share/utilities/vmassert_uninstall.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2022, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/

// Intentionally no #include guard. May be included multiple times for effect.

// The files vmassert_uninstall.hpp and vmassert_reinstall.hpp provide a
// workaround for the name collision between HotSpot's assert macro and the
// Standard Library's assert macro. When including a 3rd-party header that
// uses (and so includes) the standard assert macro, wrap that inclusion with
// includes of these two files, e.g.
//
// #include "utilities/vmassert_uninstall.hpp"
// #include <header including standard assert macro>
// #include "utilities/vmassert_reinstall.hpp"
//
// This removes the HotSpot macro definition while pre-processing the
// 3rd-party header, then reinstates the HotSpot macro (if previously defined)
// for following code.

// Remove HotSpot's assert macro, if present.
#ifdef vmassert
#undef assert
#endif // vmassert

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 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 @@ -300,7 +300,8 @@ private static Set<String> schemesListToSet(String list) {
}

static final String httpVersion = "HTTP/1.1";
static final String acceptString = "*/*";
static final String acceptString =
"text/html, image/gif, image/jpeg, */*; q=0.2";

// the following http request headers should NOT have their values
// returned for security reasons.
Expand Down
Loading
Loading