Skip to content

Commit 945484d

Browse files
authored
Merge pull request #658 from dragonwell-project/dragonwell_standard-8.20.21
Merge remote-tracking branch 'upstream/standard' into dragonwell
2 parents cac0e8e + 673eb93 commit 945484d

File tree

500 files changed

+5239
-1331
lines changed

Some content is hidden

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

500 files changed

+5239
-1331
lines changed

.github/workflows/submit.yml

+13-10
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ jobs:
401401
--verbose
402402
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev,libffi-dev
403403
--resolve-deps
404-
buster
404+
bullseye
405405
~/sysroot-${{ matrix.debian-arch }}
406406
http://httpredir.debian.org/debian/
407407
if: matrix.debian-arch != '' && steps.cache-sysroot.outputs.cache-hit != 'true'
@@ -867,6 +867,8 @@ jobs:
867867
VS2010_DIR: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_DIR }}"
868868
VS2010_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_FILENAME }}"
869869
VS2010_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_URL }}"
870+
VS2010_TORRENT_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_TORRENT_URL }}"
871+
VS2010_TORRENT_DIR: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_TORRENT_DIR }}"
870872
VS2010_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).VS2010_SHA256 }}"
871873

872874
steps:
@@ -933,10 +935,11 @@ jobs:
933935
- name: Download and unpack Visual Studio 2010
934936
run: |
935937
mkdir "$HOME\$env:VS2010_DIR"
936-
& curl -L "$env:VS2010_URL" -o "$HOME/$env:VS2010_FILENAME"
937-
$FileHash = Get-FileHash -Algorithm SHA256 "$HOME/$env:VS2010_FILENAME"
938+
$ImagePath = "$HOME/$env:VS2010_TORRENT_DIR/$env:VS2010_FILENAME"
939+
& aria2c -d "$HOME" --seed-time=0 --bt-stop-timeout=300 "$env:VS2010_TORRENT_URL" || & curl -L "$env:VS2010_URL" -o "$ImagePath" --create-dirs
940+
$FileHash = Get-FileHash -Algorithm SHA256 "$ImagePath"
938941
$FileHash.Hash -eq $env:VS2010_SHA256
939-
& 7z x -o"$HOME/$env:VS2010_DIR" "$HOME/$env:VS2010_FILENAME"
942+
& 7z x -o"$HOME/$env:VS2010_DIR" "$ImagePath"
940943
& dir "$HOME/$env:VS2010_DIR"
941944
if: steps.vs2010.outputs.cache-hit != 'true'
942945

@@ -1328,7 +1331,7 @@ jobs:
13281331

13291332
macos_x64_build:
13301333
name: macOS x64
1331-
runs-on: "macos-11"
1334+
runs-on: "macos-13"
13321335
needs: prerequisites
13331336
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_macos_x64 != 'false'
13341337

@@ -1392,10 +1395,10 @@ jobs:
13921395
run: chmod -R a+rx ${HOME}/jtreg/
13931396

13941397
- name: Install dependencies
1395-
run: brew install make
1398+
run: brew install make gawk
13961399

13971400
- name: Select Xcode version
1398-
run: sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
1401+
run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
13991402

14001403
- name: Configure
14011404
run: >
@@ -1426,7 +1429,7 @@ jobs:
14261429
14271430
macos_x64_test:
14281431
name: macOS x64
1429-
runs-on: "macos-11"
1432+
runs-on: "macos-13"
14301433
needs:
14311434
- prerequisites
14321435
- macos_x64_build
@@ -1509,10 +1512,10 @@ jobs:
15091512
tar -xzf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_osx-x64_bin${{ matrix.artifact }}"
15101513
15111514
- name: Install dependencies
1512-
run: brew install make
1515+
run: brew install make gawk
15131516

15141517
- name: Select Xcode version
1515-
run: sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
1518+
run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
15161519

15171520
- name: Run tests
15181521
run: >

.jcheck/conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[general]
22
project=jdk8u
33
jbs=JDK
4-
version=openjdk8u412
4+
version=openjdk8u422
55

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

common/autoconf/generated-configure.sh

+1-9
Original file line numberDiff line numberDiff line change
@@ -4440,7 +4440,7 @@ VS_TOOLSET_SUPPORTED_2022=true
44404440
#CUSTOM_AUTOCONF_INCLUDE
44414441

44424442
# Do not change or remove the following line, it is needed for consistency checks:
4443-
DATE_WHEN_GENERATED=1704508692
4443+
DATE_WHEN_GENERATED=1705630975
44444444

44454445
###############################################################################
44464446
#
@@ -27586,13 +27586,6 @@ fi
2758627586
as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
2758727587
fi
2758827588

27589-
# Fail-fast: verify we're building on a supported Xcode version
27590-
XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
27591-
XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
27592-
if test "${XC_VERSION_PARTS[0]}" != "6" -a "${XC_VERSION_PARTS[0]}" != "9" -a "${XC_VERSION_PARTS[0]}" != "10" -a "${XC_VERSION_PARTS[0]}" != "11" -a "${XC_VERSION_PARTS[0]}" != "12" ; then
27593-
as_fn_error $? "Xcode 6, 9-12 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode or make Xcode active by using xcode-select." "$LINENO" 5
27594-
fi
27595-
2759627589
# Some versions of Xcode command line tools install gcc and g++ as symlinks to
2759727590
# clang and clang++, which will break the build. So handle that here if we need to.
2759827591
if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
@@ -57465,4 +57458,3 @@ fi
5746557458
printf "\n"
5746657459
fi
5746757460
fi
57468-

common/autoconf/toolchain.m4

-7
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
287287
AC_MSG_ERROR([The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X])
288288
fi
289289
290-
# Fail-fast: verify we're building on a supported Xcode version
291-
XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
292-
XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
293-
if test "${XC_VERSION_PARTS[[0]]}" != "6" -a "${XC_VERSION_PARTS[[0]]}" != "9" -a "${XC_VERSION_PARTS[[0]]}" != "10" -a "${XC_VERSION_PARTS[[0]]}" != "11" -a "${XC_VERSION_PARTS[[0]]}" != "12" ; then
294-
AC_MSG_ERROR([Xcode 6, 9-12 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode or make Xcode active by using xcode-select.])
295-
fi
296-
297290
# Some versions of Xcode command line tools install gcc and g++ as symlinks to
298291
# clang and clang++, which will break the build. So handle that here if we need to.
299292
if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then

common/autoconf/version-numbers

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2024, 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=412
29+
JDK_UPDATE_VERSION=422
3030
LAUNCHER_NAME=openjdk
3131
PRODUCT_NAME=OpenJDK
3232
PRODUCT_SUFFIX="Runtime Environment"

hotspot/make/windows/makefiles/compile.make

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ CXX=cl.exe
5353
# improving the quality of crash log stack traces involving jvm.dll.
5454

5555
# These are always used in all compiles
56-
CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX
56+
CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX /wd4800
5757

5858
# Let's add debug information when Full Debug Symbols is enabled
5959
!if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"

hotspot/src/os/aix/vm/os_aix.cpp

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Copyright 2012, 2014 SAP AG. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -1452,7 +1452,7 @@ bool os::dll_address_to_library_name(address addr, char* buf,
14521452

14531453
// Loads .dll/.so and in case of error it checks if .dll/.so was built
14541454
// for the same architecture as Hotspot is running on.
1455-
void *os::dll_load(const char *filename, char *ebuf, int ebuflen) {
1455+
static void* dll_load_library(const char *filename, char *ebuf, int ebuflen) {
14561456

14571457
if (ebuf && ebuflen > 0) {
14581458
ebuf[0] = '\0';
@@ -1481,6 +1481,27 @@ void *os::dll_load(const char *filename, char *ebuf, int ebuflen) {
14811481
return NULL;
14821482
}
14831483

1484+
// Load library named <filename>
1485+
// If filename matches <name>.so, and loading fails, repeat with <name>.a.
1486+
void *os::dll_load(const char *filename, char *ebuf, int ebuflen) {
1487+
void* result = NULL;
1488+
char* const file_path = strdup(filename);
1489+
char* const pointer_to_dot = strrchr(file_path, '.');
1490+
const char old_extension[] = ".so";
1491+
const char new_extension[] = ".a";
1492+
STATIC_ASSERT(sizeof(old_extension) >= sizeof(new_extension));
1493+
// First try to load the existing file.
1494+
result = dll_load_library(filename, ebuf, ebuflen);
1495+
// If the load fails,we try to reload by changing the extension to .a for .so files only.
1496+
// Shared object in .so format dont have braces, hence they get removed for archives with members.
1497+
if (result == NULL && pointer_to_dot != NULL && strcmp(pointer_to_dot, old_extension) == 0) {
1498+
snprintf(pointer_to_dot, sizeof(old_extension), "%s", new_extension);
1499+
result = dll_load_library(file_path, ebuf, ebuflen);
1500+
}
1501+
FREE_C_HEAP_ARRAY(char, file_path, mtInternal);
1502+
return result;
1503+
}
1504+
14841505
// Glibc-2.0 libdl is not MT safe. If you are building with any glibc,
14851506
// chances are you might want to run the generated bits against glibc-2.0
14861507
// libdl.so, so always use locking for any version of glibc.

hotspot/src/os/linux/vm/os_linux.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2008,11 +2008,11 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
20082008
static Elf32_Half running_arch_code=EM_68K;
20092009
#elif (defined AARCH64)
20102010
static Elf32_Half running_arch_code=EM_AARCH64;
2011-
#elif (defined LOONGARCH)
2011+
#elif (defined LOONGARCH64)
20122012
static Elf32_Half running_arch_code=EM_LOONGARCH;
20132013
#else
20142014
#error Method os::dll_load requires that one of following is defined:\
2015-
IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64, LOONGARCH
2015+
IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64, LOONGARCH64
20162016
#endif
20172017

20182018
// Identify compatability class for VM's architecture and library's architecture

hotspot/src/share/vm/c1/c1_RangeCheckElimination.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2024, 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
@@ -441,14 +441,14 @@ void RangeCheckEliminator::in_block_motion(BlockBegin *block, AccessIndexedList
441441

442442
if (c) {
443443
jint value = c->type()->as_IntConstant()->value();
444-
if (value != min_jint) {
445-
if (ao->op() == Bytecodes::_isub) {
446-
value = -value;
447-
}
444+
if (ao->op() == Bytecodes::_iadd) {
448445
base = java_add(base, value);
449-
last_integer = base;
450-
last_instruction = other;
446+
} else {
447+
assert(ao->op() == Bytecodes::_isub, "unexpected bytecode");
448+
base = java_subtract(base, value);
451449
}
450+
last_integer = base;
451+
last_instruction = other;
452452
index = other;
453453
} else {
454454
break;

hotspot/src/share/vm/c1/c1_Runtime1.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include "runtime/vframeArray.hpp"
5959
#include "utilities/copy.hpp"
6060
#include "utilities/events.hpp"
61+
#include "utilities/exceptions.hpp"
6162

6263

6364
// Implementation of StubAssembler
@@ -536,8 +537,9 @@ JRT_ENTRY_NO_ASYNC(static address, exception_handler_for_pc_helper(JavaThread* t
536537
if (TraceExceptions) {
537538
ttyLocker ttyl;
538539
ResourceMark rm;
539-
tty->print_cr("Exception <%s> (" INTPTR_FORMAT ") thrown in compiled method <%s> at PC " INTPTR_FORMAT " for thread " INTPTR_FORMAT "",
540-
exception->print_value_string(), p2i((address)exception()), nm->method()->print_value_string(), p2i(pc), p2i(thread));
540+
tty->print_cr("Exception <%.*s> (" INTPTR_FORMAT ") thrown in compiled method <%s> at PC " INTPTR_FORMAT " for thread " INTPTR_FORMAT "",
541+
MAX_LEN, exception->print_value_string(),
542+
p2i((address)exception()), nm->method()->print_value_string(), p2i(pc), p2i(thread));
541543
}
542544
// for AbortVMOnException flag
543545
NOT_PRODUCT(Exceptions::debug_check_abort(exception));

hotspot/src/share/vm/classfile/symbolTable.cpp

+22-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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
@@ -236,7 +236,23 @@ unsigned int SymbolTable::hash_symbol(const char* s, int len) {
236236
// entries in the symbol table during normal execution (only during
237237
// safepoints).
238238

239+
// Symbols should represent entities from the constant pool that are
240+
// limited to <64K in length, but usage errors creep in allowing Symbols
241+
// to be used for arbitrary strings. For debug builds we will assert if
242+
// a string is too long, whereas product builds will truncate it.
243+
static int check_length(const char* name, int len) {
244+
assert(len <= Symbol::max_length(),
245+
"String length exceeds the maximum Symbol length");
246+
if (len > Symbol::max_length()) {
247+
warning("A string \"%.80s ... %.80s\" exceeds the maximum Symbol "
248+
"length of %d and has been truncated", name, (name + len - 80), Symbol::max_length());
249+
len = Symbol::max_length();
250+
}
251+
return len;
252+
}
253+
239254
Symbol* SymbolTable::lookup(const char* name, int len, TRAPS) {
255+
len = check_length(name, len);
240256
unsigned int hashValue = hash_symbol(name, len);
241257
int index = the_table()->hash_to_index(hashValue);
242258

@@ -367,6 +383,7 @@ void SymbolTable::add(ClassLoaderData* loader_data, constantPoolHandle cp,
367383
for (int i=0; i<names_count; i++) {
368384
int index = table->hash_to_index(hashValues[i]);
369385
bool c_heap = !loader_data->is_the_null_class_loader_data();
386+
assert(lengths[i] <= Symbol::max_length(), "must be - these come from the constant pool");
370387
Symbol* sym = table->basic_add(index, (u1*)names[i], lengths[i], hashValues[i], c_heap, CHECK);
371388
cp->symbol_at_put(cp_indices[i], sym);
372389
}
@@ -375,7 +392,8 @@ void SymbolTable::add(ClassLoaderData* loader_data, constantPoolHandle cp,
375392

376393
Symbol* SymbolTable::new_permanent_symbol(const char* name, TRAPS) {
377394
unsigned int hash;
378-
Symbol* result = SymbolTable::lookup_only((char*)name, (int)strlen(name), hash);
395+
int len = check_length(name, (int)strlen(name));
396+
Symbol* result = SymbolTable::lookup_only((char*)name, len, hash);
379397
if (result != NULL) {
380398
return result;
381399
}
@@ -384,13 +402,14 @@ Symbol* SymbolTable::new_permanent_symbol(const char* name, TRAPS) {
384402

385403
SymbolTable* table = the_table();
386404
int index = table->hash_to_index(hash);
387-
return table->basic_add(index, (u1*)name, (int)strlen(name), hash, false, THREAD);
405+
return table->basic_add(index, (u1*)name, len, hash, false, THREAD);
388406
}
389407

390408
Symbol* SymbolTable::basic_add(int index_arg, u1 *name, int len,
391409
unsigned int hashValue_arg, bool c_heap, TRAPS) {
392410
assert(!Universe::heap()->is_in_reserved(name),
393411
"proposed name of symbol must be stable");
412+
assert(len <= Symbol::max_length(), "caller should have ensured this");
394413

395414
// Don't allow symbols to be created which cannot fit in a Symbol*.
396415
if (len > Symbol::max_length()) {

hotspot/src/share/vm/compiler/compilerOracle.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,8 @@ static MethodMatcher::Mode check_mode(char name[], const char*& error_msg) {
493493
int match = MethodMatcher::Exact;
494494
while (name[0] == '*') {
495495
match |= MethodMatcher::Suffix;
496-
strcpy(name, name + 1);
496+
// Copy remaining string plus NUL to the beginning
497+
memmove(name, name + 1, strlen(name + 1) + 1);
497498
}
498499

499500
if (strcmp(name, "*") == 0) return MethodMatcher::Any;

hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -2854,7 +2854,9 @@ BytecodeInterpreter::run(interpreterState istate) {
28542854
if (TraceExceptions) {
28552855
ttyLocker ttyl;
28562856
ResourceMark rm;
2857-
tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", except_oop->print_value_string(), p2i(except_oop()));
2857+
tty->print_cr("Exception <%.*s> (" INTPTR_FORMAT ")",
2858+
MAX_LEN, except_oop->print_value_string(),
2859+
p2i(except_oop()));
28582860
tty->print_cr(" thrown in interpreter method <%s>", METHOD->print_value_string());
28592861
tty->print_cr(" at bci %d, continuing at %d for thread " INTPTR_FORMAT,
28602862
(int)(istate->bcp() - METHOD->code_base()),
@@ -2870,7 +2872,9 @@ BytecodeInterpreter::run(interpreterState istate) {
28702872
if (TraceExceptions) {
28712873
ttyLocker ttyl;
28722874
ResourceMark rm;
2873-
tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", except_oop->print_value_string(), p2i(except_oop()));
2875+
tty->print_cr("Exception <%.*s> (" INTPTR_FORMAT ")",
2876+
MAX_LEN, except_oop->print_value_string(),
2877+
p2i(except_oop()));
28742878
tty->print_cr(" thrown in interpreter method <%s>", METHOD->print_value_string());
28752879
tty->print_cr(" at bci %d, unwinding for thread " INTPTR_FORMAT,
28762880
(int)(istate->bcp() - METHOD->code_base()),

hotspot/src/share/vm/interpreter/interpreterRuntime.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
#include "runtime/synchronizer.hpp"
5757
#include "runtime/threadCritical.hpp"
5858
#include "utilities/events.hpp"
59+
#include "utilities/exceptions.hpp"
5960
#ifdef TARGET_ARCH_x86
6061
# include "vm_version_x86.hpp"
6162
#endif
@@ -454,12 +455,13 @@ IRT_ENTRY(address, InterpreterRuntime::exception_handler_for_exception(JavaThrea
454455
const char* detail_message = java_lang_Throwable::message_as_utf8(h_exception());
455456
ttyLocker ttyl; // Lock after getting the detail message
456457
if (detail_message != NULL) {
457-
tty->print_cr("Exception <%s: %s> (" INTPTR_FORMAT ")",
458-
h_exception->print_value_string(), detail_message,
458+
tty->print_cr("Exception <%.*s: %.*s> (" INTPTR_FORMAT ")",
459+
MAX_LEN, h_exception->print_value_string(),
460+
MAX_LEN, detail_message,
459461
(address)h_exception());
460462
} else {
461-
tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")",
462-
h_exception->print_value_string(),
463+
tty->print_cr("Exception <%.*s> (" INTPTR_FORMAT ")",
464+
MAX_LEN, h_exception->print_value_string(),
463465
(address)h_exception());
464466
}
465467
tty->print_cr(" thrown in interpreter method <%s>", h_method->print_value_string());

hotspot/src/share/vm/oops/symbol.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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
@@ -33,6 +33,7 @@
3333
#include "memory/resourceArea.hpp"
3434

3535
Symbol::Symbol(const u1* name, int length, int refcount) {
36+
assert(length <= max_length(), "SymbolTable should have caught this!");
3637
_refcount = refcount;
3738
_length = length;
3839
_identity_hash = os::random();

0 commit comments

Comments
 (0)