Skip to content

Commit

Permalink
Merge upstream-jdk
Browse files Browse the repository at this point in the history
  • Loading branch information
corretto-github-robot committed Nov 18, 2023
2 parents 4139a09 + 2545f55 commit d83dd4a
Show file tree
Hide file tree
Showing 188 changed files with 11,791 additions and 5,725 deletions.
2 changes: 1 addition & 1 deletion make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ define SetupRunJtregTestBody
$$(RM) -r $$($1_TEST_RESULTS_DIR)

$1_COMMAND_LINE := \
$$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
$$(JTREG_JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
-Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \
$$($1_JTREG_BASIC_OPTIONS) \
-testjdk:$$(JDK_UNDER_TEST) \
Expand Down
2 changes: 2 additions & 0 deletions make/RunTestsPrebuilt.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ $(eval $(call SetupVariable,JT_HOME))
$(eval $(call SetupVariable,JDK_IMAGE_DIR,$(OUTPUTDIR)/images/jdk))
$(eval $(call SetupVariable,TEST_IMAGE_DIR,$(OUTPUTDIR)/images/test))
$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols,NO_CHECK))
$(eval $(call SetupVariable,JTREG_JDK,$(BOOT_JDK)))

# Provide default values for tools that we need
$(eval $(call SetupVariable,MAKE,make,NO_CHECK))
Expand Down Expand Up @@ -255,6 +256,7 @@ $(call CreateNewSpec, $(NEW_SPEC), \
TOPDIR := $(TOPDIR), \
OUTPUTDIR := $(OUTPUTDIR), \
BOOT_JDK := $(BOOT_JDK), \
JTREG_JDK := $(JTREG_JDK), \
JT_HOME := $(JT_HOME), \
JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
JCOV_IMAGE_DIR := $(JCOV_IMAGE_DIR), \
Expand Down
2 changes: 2 additions & 0 deletions make/RunTestsPrebuiltSpec.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ JAR := $(FIXPATH) $(JAR_CMD)
JLINK := $(FIXPATH) $(JLINK_CMD)
JMOD := $(FIXPATH) $(JMOD_CMD)

JTREG_JAVA := $(FIXPATH) $(JTREG_JDK)/bin/java $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)

BUILD_JAVA := $(JDK_IMAGE_DIR)/bin/JAVA
################################################################################
# Some common tools. Assume most common name and no path.
Expand Down
37 changes: 36 additions & 1 deletion make/autoconf/lib-tests.m4
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,47 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JTREG],
UTIL_FIXUP_PATH(JT_HOME)
AC_SUBST(JT_HOME)
# Specify a JDK for running jtreg. Defaults to the BOOT_JDK.
AC_ARG_WITH(jtreg-jdk, [AS_HELP_STRING([--with-jdk],
[path to JDK for running jtreg @<:@BOOT_JDK@:>@])])
AC_MSG_CHECKING([for jtreg jdk])
if test "x${with_jtreg_jdk}" != x; then
if test "x${with_jtreg_jdk}" = xno; then
AC_MSG_RESULT([no, jtreg jdk not specified])
elif test "x${with_jtreg_jdk}" = xyes; then
AC_MSG_RESULT([not specified])
AC_MSG_ERROR([--with-jtreg-jdk needs a value])
else
JTREG_JDK="${with_jtreg_jdk}"
AC_MSG_RESULT([$JTREG_JDK])
UTIL_FIXUP_PATH(JTREG_JDK)
if test ! -f "$JTREG_JDK/bin/java"; then
AC_MSG_ERROR([Could not find jtreg java at $JTREG_JDK/bin/java])
fi
fi
else
JTREG_JDK="${BOOT_JDK}"
AC_MSG_RESULT([no, using BOOT_JDK])
fi
UTIL_FIXUP_PATH(JTREG_JDK)
AC_SUBST([JTREG_JDK])
# For use in the configure script
JTREG_JAVA="$FIXPATH $JTREG_JDK/bin/java"
# Verify jtreg version
if test "x$JT_HOME" != x; then
AC_MSG_CHECKING([jtreg jar existence])
if test ! -f "$JT_HOME/lib/jtreg.jar"; then
AC_MSG_ERROR([Could not find jtreg jar at $JT_HOME/lib/jtreg.jar])
fi
AC_MSG_CHECKING([jtreg version number])
# jtreg -version looks like this: "jtreg 6.1+1-19"
# Extract actual version part ("6.1" in this case)
jtreg_version_full=`$JAVA -jar $JT_HOME/lib/jtreg.jar -version | $HEAD -n 1 | $CUT -d ' ' -f 2`
jtreg_version_full=$($JTREG_JAVA -jar $JT_HOME/lib/jtreg.jar -version | $HEAD -n 1 | $CUT -d ' ' -f 2)
jtreg_version=${jtreg_version_full/%+*}
AC_MSG_RESULT([$jtreg_version])
Expand Down
3 changes: 3 additions & 0 deletions make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,9 @@ JAR = $(JAR_CMD)
JLINK = $(JLINK_CMD)
JMOD = $(JMOD_CMD)

JTREG_JDK := @JTREG_JDK@
JTREG_JAVA = @FIXPATH@ $(JTREG_JDK)/bin/java $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)

BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
BUILD_JAVAC=@FIXPATH@ $(BUILD_JDK)/bin/javac
Expand Down
9 changes: 8 additions & 1 deletion make/modules/java.desktop/lib/Awt2dLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,18 @@ else
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
LIBFONTMANAGER_EXCLUDE_FILES += libharfbuzz/hb-ft.cc

# list of disabled warnings and the compilers for which it was specifically added.
# array-bounds -> GCC 12 on Alpine Linux
# parentheses -> GCC 6
# range-loop-analysis -> clang on Xcode12

HARFBUZZ_DISABLED_WARNINGS_gcc := missing-field-initializers strict-aliasing \
unused-result array-bounds parentheses
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type expansion-to-defined dangling-reference
# maybe-uninitialized required for GCC 8 builds. Not required for GCC 9+.
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type \
expansion-to-defined dangling-reference maybe-uninitialized
HARFBUZZ_DISABLED_WARNINGS_clang := missing-field-initializers range-loop-analysis
HARFBUZZ_DISABLED_WARNINGS_microsoft := 4267 4244

Expand Down
18 changes: 10 additions & 8 deletions src/hotspot/os/linux/os_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3802,15 +3802,17 @@ void os::large_page_init() {
return;
}

// 2) check if large pages are configured
if ( ( UseTransparentHugePages && HugePages::supports_thp() == false) ||
(!UseTransparentHugePages && HugePages::supports_static_hugepages() == false) ) {
// No large pages configured, return.
// 2) check if the OS supports THPs resp. static hugepages.
if (UseTransparentHugePages && !HugePages::supports_thp()) {
if (!FLAG_IS_DEFAULT(UseTransparentHugePages)) {
log_warning(pagesize)("UseTransparentHugePages disabled, transparent huge pages are not supported by the operating system.");
}
UseLargePages = UseTransparentHugePages = UseHugeTLBFS = UseSHM = false;
return;
}
if (!UseTransparentHugePages && !HugePages::supports_static_hugepages()) {
warn_no_large_pages_configured();
UseLargePages = false;
UseTransparentHugePages = false;
UseHugeTLBFS = false;
UseSHM = false;
UseLargePages = UseTransparentHugePages = UseHugeTLBFS = UseSHM = false;
return;
}

Expand Down
14 changes: 11 additions & 3 deletions src/java.desktop/share/legal/harfbuzz.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
## Harfbuzz v7.2.0
## Harfbuzz v8.2.2

### Harfbuzz License

https://github.com/harfbuzz/harfbuzz/blob/7.2.0/COPYING

<pre>

HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
Expand All @@ -14,6 +12,7 @@ Copyright © 2010-2023 Google, Inc.
Copyright © 2018-2020 Ebrahim Byagowi
Copyright © 2004-2013 Red Hat, Inc.
Copyright © 2019 Facebook, Inc.
Copyright (C) 2012 Zilong Tan (eric.zltan@gmail.com)
Copyright © 2007 Chris Wilson
Copyright © 2018-2019 Adobe Inc.
Copyright © 2006-2023 Behdad Esfahbod
Expand Down Expand Up @@ -72,6 +71,15 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

---------------------------------
The below license applies to the following files:
libharfbuzz/hb-unicode-emoji-table.hh

© 2023 Unicode®, Inc.
Unicode and the Unicode Logo are registered trademarks of Unicode, Inc.
in the U.S. and other countries.
For terms of use, see https://www.unicode.org/terms_of_use.html

</pre>

### AUTHORS File Information
Expand Down
11 changes: 3 additions & 8 deletions src/java.desktop/share/native/libharfbuzz/OT/Color/CBDT/CBDT.hh
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ struct IndexSubtableRecord
TRACE_SERIALIZE (this);

auto *subtable = c->serializer->start_embed<IndexSubtable> ();
if (unlikely (!subtable)) return_trace (false);
if (unlikely (!c->serializer->extend_min (subtable))) return_trace (false);

auto *old_subtable = get_subtable (base);
Expand Down Expand Up @@ -545,7 +544,8 @@ struct IndexSubtableArray
const IndexSubtableRecord*>> *lookup /* OUT */) const
{
bool start_glyph_is_set = false;
for (hb_codepoint_t new_gid = 0; new_gid < c->plan->num_output_glyphs (); new_gid++)
unsigned num_glyphs = c->plan->num_output_glyphs ();
for (hb_codepoint_t new_gid = 0; new_gid < num_glyphs; new_gid++)
{
hb_codepoint_t old_gid;
if (unlikely (!c->plan->old_gid_for_new_gid (new_gid, &old_gid))) continue;
Expand Down Expand Up @@ -576,9 +576,6 @@ struct IndexSubtableArray
{
TRACE_SUBSET (this);

auto *dst = c->serializer->start_embed<IndexSubtableArray> ();
if (unlikely (!dst)) return_trace (false);

hb_vector_t<hb_pair_t<hb_codepoint_t, const IndexSubtableRecord*>> lookup;
build_lookup (c, bitmap_size_context, &lookup);
if (unlikely (!c->serializer->propagate_error (lookup)))
Expand Down Expand Up @@ -993,12 +990,10 @@ CBLC::subset (hb_subset_context_t *c) const
{
TRACE_SUBSET (this);

auto *cblc_prime = c->serializer->start_embed<CBLC> ();

// Use a vector as a secondary buffer as the tables need to be built in parallel.
hb_vector_t<char> cbdt_prime;

if (unlikely (!cblc_prime)) return_trace (false);
auto *cblc_prime = c->serializer->start_embed<CBLC> ();
if (unlikely (!c->serializer->extend_min (cblc_prime))) return_trace (false);
cblc_prime->version = version;

Expand Down
Loading

0 comments on commit d83dd4a

Please sign in to comment.