Skip to content

Commit

Permalink
Merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
synecdoche committed Nov 15, 2024
2 parents 09332fc + 827528c commit f7251a7
Show file tree
Hide file tree
Showing 21 changed files with 355 additions and 420 deletions.
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 @@ -225,7 +225,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 @@ -236,7 +236,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 @@ -300,7 +300,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 @@ -343,7 +343,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
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
5 changes: 1 addition & 4 deletions test/hotspot/gtest/jfr/test_networkUtilization.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/*
<<<<<<< HEAD
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
=======
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
>>>>>>> 3e2314d0821 (8299254: Support dealing with standard assert macro)
*
* 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
4 changes: 2 additions & 2 deletions test/hotspot/gtest/unittest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
#include <stdio.h>

#define GTEST_DONT_DEFINE_TEST 1

#include "utilities/vmassert_uninstall.hpp"
#include "gtest/gtest.h"
#include "utilities/vmassert_reinstall.hpp"


#define CONCAT(a, b) a ## b

#define TEST(category, name) GTEST_TEST(category, CONCAT(name, _test))
Expand Down Expand Up @@ -105,4 +105,4 @@
TEST_VM_ASSERT_MSG is only available in debug builds
#endif

#endif // UNITTEST_HPP
#endif // UNITTEST_HPP
49 changes: 39 additions & 10 deletions test/hotspot/jtreg/gc/stress/TestStressG1Humongous.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,41 @@
package gc.stress;

/*
* @test TestStressG1Humongous
* @test
* @key gc stress
* @summary Stress G1 by humongous allocations in situation near OOM
* @requires vm.gc.G1
* @requires !vm.flightRecorder
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @run driver/timeout=1300 gc.stress.TestStressG1Humongous
* @run driver/timeout=180 gc.stress.TestStressG1Humongous 4 3 1.1 120
*/

/*
* @test
* @requires vm.gc.G1
* @requires !vm.flightRecorder
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @run driver/timeout=180 gc.stress.TestStressG1Humongous 16 5 2.1 120
*/

/*
* @test
* @requires vm.gc.G1
* @requires !vm.flightRecorder
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @run driver/timeout=180 gc.stress.TestStressG1Humongous 32 4 0.6 120
*/

/*
* @test
* @requires vm.gc.G1
* @requires !vm.flightRecorder
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @run driver/timeout=900 gc.stress.TestStressG1Humongous 1 7 0.6 600
*/

import java.util.ArrayList;
Expand All @@ -48,17 +75,19 @@
public class TestStressG1Humongous{

public static void main(String[] args) throws Exception {
if (args.length != 4) {
throw new IllegalArgumentException("Test expects 4 arguments");
}

// Limit heap size on 32-bit platforms
int heapSize = Platform.is32bit() ? 512 : 1024;
// Heap size, region size, threads, humongous size, timeout
run(heapSize, 4, 3, 1.1, 120);
run(heapSize, 16, 5, 2.1, 120);
run(heapSize, 32, 4, 0.6, 120);
run(heapSize, 1, 7, 0.6, 600);
}

private static void run(int heapSize, int regionSize, int threads, double humongousSize, int timeout)
throws Exception {
// Region size, threads, humongous size, and timeout passed as @run arguments
int regionSize = Integer.parseInt(args[0]);
int threads = Integer.parseInt(args[1]);
double humongousSize = Double.parseDouble(args[2]);
int timeout = Integer.parseInt(args[3]);

ArrayList<String> options = new ArrayList<>();
Collections.addAll(options, Utils.getTestJavaOpts());
Collections.addAll(options,
Expand Down
Loading

0 comments on commit f7251a7

Please sign in to comment.