Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
[GR-32410] Merge in 17.0.1+12.
Browse files Browse the repository at this point in the history
PullRequest: labsjdk-ce-17/11
  • Loading branch information
marwan-hallaoui committed Oct 13, 2021
2 parents 133a24a + b634e40 commit b8b2daf
Show file tree
Hide file tree
Showing 211 changed files with 4,026 additions and 1,885 deletions.
4 changes: 2 additions & 2 deletions make/autoconf/flags-other.m4
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS],
# Fix linker warning.
# Code taken from make/autoconf/flags-cflags.m4 and adapted.
JVM_BASIC_ASFLAGS+="-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
JVM_BASIC_ASFLAGS+=" -DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
-mmacosx-version-min=$MACOSX_VERSION_MIN"
if test -n "$MACOSX_VERSION_MAX"; then
JVM_BASIC_ASFLAGS+="$OS_CFLAGS \
JVM_BASIC_ASFLAGS+=" $OS_CFLAGS \
-DMAC_OS_X_VERSION_MAX_ALLOWED=$MACOSX_VERSION_MAX_NODOTS"
fi
fi
Expand Down
4 changes: 2 additions & 2 deletions make/conf/version-numbers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

DEFAULT_VERSION_FEATURE=17
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=0
DEFAULT_VERSION_UPDATE=1
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2021-09-14
DEFAULT_VERSION_DATE=2021-10-19
DEFAULT_VERSION_CLASSFILE_MAJOR=61 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11
Expand Down
27 changes: 0 additions & 27 deletions make/data/cacerts/identrustdstx3

This file was deleted.

2 changes: 1 addition & 1 deletion make/modules/java.desktop/lib/Awt2dLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ endif

ifeq ($(USE_EXTERNAL_HARFBUZZ), true)
LIBFONTMANAGER_EXTRA_SRC =
BUILD_LIBFONTMANAGER_FONTLIB += $(LIBHARFBUZZ_LIBS)
BUILD_LIBFONTMANAGER_FONTLIB += $(HARFBUZZ_LIBS)
else
LIBFONTMANAGER_EXTRA_SRC = libharfbuzz

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2837,7 +2837,7 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
}
#endif
// first time here. Set profile type.
__ ldr(tmp, mdo_addr);
__ str(tmp, mdo_addr);
} else {
assert(ciTypeEntries::valid_ciklass(current_klass) != NULL &&
ciTypeEntries::valid_ciklass(current_klass) != exact_klass, "inconsistent");
Expand Down
4 changes: 1 addition & 3 deletions src/hotspot/os/aix/os_aix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2665,9 +2665,7 @@ int os::open(const char *path, int oflag, int mode) {
// create binary file, rewriting existing file if required
int os::create_binary_file(const char* path, bool rewrite_existing) {
int oflags = O_WRONLY | O_CREAT;
if (!rewrite_existing) {
oflags |= O_EXCL;
}
oflags |= rewrite_existing ? O_TRUNC : O_EXCL;
return ::open64(path, oflags, S_IREAD | S_IWRITE);
}

Expand Down
4 changes: 1 addition & 3 deletions src/hotspot/os/bsd/os_bsd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2355,9 +2355,7 @@ int os::open(const char *path, int oflag, int mode) {
// create binary file, rewriting existing file if required
int os::create_binary_file(const char* path, bool rewrite_existing) {
int oflags = O_WRONLY | O_CREAT;
if (!rewrite_existing) {
oflags |= O_EXCL;
}
oflags |= rewrite_existing ? O_TRUNC : O_EXCL;
return ::open(path, oflags, S_IREAD | S_IWRITE);
}

Expand Down
4 changes: 1 addition & 3 deletions src/hotspot/os/linux/os_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4968,9 +4968,7 @@ int os::open(const char *path, int oflag, int mode) {
// create binary file, rewriting existing file if required
int os::create_binary_file(const char* path, bool rewrite_existing) {
int oflags = O_WRONLY | O_CREAT;
if (!rewrite_existing) {
oflags |= O_EXCL;
}
oflags |= rewrite_existing ? O_TRUNC : O_EXCL;
return ::open64(path, oflags, S_IREAD | S_IWRITE);
}

Expand Down
4 changes: 1 addition & 3 deletions src/hotspot/os/windows/os_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4732,9 +4732,7 @@ bool os::dir_is_empty(const char* path) {
// create binary file, rewriting existing file if required
int os::create_binary_file(const char* path, bool rewrite_existing) {
int oflags = _O_CREAT | _O_WRONLY | _O_BINARY;
if (!rewrite_existing) {
oflags |= _O_EXCL;
}
oflags |= rewrite_existing ? _O_TRUNC : _O_EXCL;
return ::open(path, oflags, _S_IREAD | _S_IWRITE);
}

Expand Down
7 changes: 7 additions & 0 deletions src/hotspot/share/classfile/classFileParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3135,6 +3135,13 @@ u2 ClassFileParser::parse_classfile_inner_classes_attribute(const ClassFileStrea
valid_klass_reference_at(outer_class_info_index),
"outer_class_info_index %u has bad constant type in class file %s",
outer_class_info_index, CHECK_0);

if (outer_class_info_index != 0) {
const Symbol* const outer_class_name = cp->klass_name_at(outer_class_info_index);
char* bytes = (char*)outer_class_name->bytes();
guarantee_property(bytes[0] != JVM_SIGNATURE_ARRAY,
"Outer class is an array class in class file %s", CHECK_0);
}
// Inner class name
const u2 inner_name_index = cfs->get_u2_fast();
check_property(
Expand Down
21 changes: 17 additions & 4 deletions src/hotspot/share/classfile/verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2316,6 +2316,7 @@ void ClassVerifier::verify_field_instructions(RawBytecodeStream* bcs,
// Get field name and signature
Symbol* field_name = cp->name_ref_at(index);
Symbol* field_sig = cp->signature_ref_at(index);
bool is_getfield = false;

// Field signature was checked in ClassFileParser.
assert(SignatureVerifier::is_valid_type_signature(field_sig),
Expand Down Expand Up @@ -2362,11 +2363,9 @@ void ClassVerifier::verify_field_instructions(RawBytecodeStream* bcs,
break;
}
case Bytecodes::_getfield: {
is_getfield = true;
stack_object_type = current_frame->pop_stack(
target_class_type, CHECK_VERIFY(this));
for (int i = 0; i < n; i++) {
current_frame->push_stack(field_type[i], CHECK_VERIFY(this));
}
goto check_protected;
}
case Bytecodes::_putfield: {
Expand Down Expand Up @@ -2396,7 +2395,15 @@ void ClassVerifier::verify_field_instructions(RawBytecodeStream* bcs,
check_protected: {
if (_this_type == stack_object_type)
break; // stack_object_type must be assignable to _current_class_type
if (was_recursively_verified()) return;
if (was_recursively_verified()) {
if (is_getfield) {
// Push field type for getfield.
for (int i = 0; i < n; i++) {
current_frame->push_stack(field_type[i], CHECK_VERIFY(this));
}
}
return;
}
Symbol* ref_class_name =
cp->klass_name_at(cp->klass_ref_index_at(index));
if (!name_in_supers(ref_class_name, current_class()))
Expand Down Expand Up @@ -2425,6 +2432,12 @@ void ClassVerifier::verify_field_instructions(RawBytecodeStream* bcs,
}
default: ShouldNotReachHere();
}
if (is_getfield) {
// Push field type for getfield after doing protection check.
for (int i = 0; i < n; i++) {
current_frame->push_stack(field_type[i], CHECK_VERIFY(this));
}
}
}

// Look at the method's handlers. If the bci is in the handler's try block
Expand Down
23 changes: 23 additions & 0 deletions src/hotspot/share/code/dependencies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1835,6 +1835,26 @@ Klass* Dependencies::find_witness_AME(InstanceKlass* ctxk, Method* m, KlassDepCh
return NULL;
}

// This function is used by find_unique_concrete_method(non vtable based)
// to check whether subtype method overrides the base method.
static bool overrides(Method* sub_m, Method* base_m) {
assert(base_m != NULL, "base method should be non null");
if (sub_m == NULL) {
return false;
}
/**
* If base_m is public or protected then sub_m always overrides.
* If base_m is !public, !protected and !private (i.e. base_m is package private)
* then sub_m should be in the same package as that of base_m.
* For package private base_m this is conservative approach as it allows only subset of all allowed cases in
* the jvm specification.
**/
if (base_m->is_public() || base_m->is_protected() ||
base_m->method_holder()->is_same_class_package(sub_m->method_holder())) {
return true;
}
return false;
}

// Find the set of all non-abstract methods under ctxk that match m.
// (The method m must be defined or inherited in ctxk.)
Expand Down Expand Up @@ -1872,6 +1892,9 @@ Method* Dependencies::find_unique_concrete_method(InstanceKlass* ctxk, Method* m
} else if (Dependencies::find_witness_AME(ctxk, fm) != NULL) {
// Found a concrete subtype which does not override abstract root method.
return NULL;
} else if (!overrides(fm, m)) {
// Found method doesn't override abstract root method.
return NULL;
}
assert(Dependencies::is_concrete_root_method(fm, ctxk) == Dependencies::is_concrete_method(m, ctxk), "mismatch");
#ifndef PRODUCT
Expand Down
19 changes: 13 additions & 6 deletions src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ class ShenandoahBarrierSet: public BarrierSet {
static bool need_keep_alive_barrier(DecoratorSet decorators, BasicType type);

static bool is_strong_access(DecoratorSet decorators) {
return (decorators & (ON_WEAK_OOP_REF | ON_PHANTOM_OOP_REF | ON_UNKNOWN_OOP_REF)) == 0;
return (decorators & (ON_WEAK_OOP_REF | ON_PHANTOM_OOP_REF)) == 0;
}

static bool is_weak_access(DecoratorSet decorators) {
return (decorators & (ON_WEAK_OOP_REF | ON_UNKNOWN_OOP_REF)) != 0;
return (decorators & ON_WEAK_OOP_REF) != 0;
}

static bool is_phantom_access(DecoratorSet decorators) {
Expand Down Expand Up @@ -90,8 +90,6 @@ class ShenandoahBarrierSet: public BarrierSet {
inline void satb_enqueue(oop value);
inline void iu_barrier(oop obj);

template <DecoratorSet decorators>
inline void keep_alive_if_weak(oop value);
inline void keep_alive_if_weak(DecoratorSet decorators, oop value);

inline void enqueue(oop obj);
Expand All @@ -101,8 +99,17 @@ class ShenandoahBarrierSet: public BarrierSet {
template <class T>
inline oop load_reference_barrier_mutator(oop obj, T* load_addr);

template <DecoratorSet decorators, class T>
inline oop load_reference_barrier(oop obj, T* load_addr);
template <class T>
inline oop load_reference_barrier(DecoratorSet decorators, oop obj, T* load_addr);

template <typename T>
inline oop oop_load(DecoratorSet decorators, T* addr);

template <typename T>
inline oop oop_cmpxchg(DecoratorSet decorators, T* addr, oop compare_value, oop new_value);

template <typename T>
inline oop oop_xchg(DecoratorSet decorators, T* addr, oop new_value);

private:
template <class T>
Expand Down
Loading

0 comments on commit b8b2daf

Please sign in to comment.