OpenJDK / jdk / jdk
changeset 53293:64049c8e7452
Merge
author | jwilhelm |
---|---|
date | Mon, 14 Jan 2019 23:05:26 +0100 |
parents | b002e4ee60b0 8065db7231ae |
children | fcddd67f986f 520f8e2041bb |
files | src/hotspot/share/ci/ciEnv.hpp src/hotspot/share/ci/ciMethodData.hpp src/hotspot/share/ci/ciObjectFactory.hpp src/hotspot/share/code/nmethod.hpp src/hotspot/share/oops/instanceKlass.cpp src/hotspot/share/oops/methodData.hpp src/java.base/share/classes/java/lang/Class.java src/java.base/share/classes/java/util/jar/Manifest.java src/java.base/share/lib/security/default.policy test/hotspot/jtreg/ProblemList.txt |
diffstat | 51 files changed, 355 insertions(+), 233 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp Mon Jan 14 23:05:26 2019 +0100 @@ -269,7 +269,7 @@ // when called via a c2i. // Pass initial_caller_sp to framemanager. - __ mr(R21_tmp1, R1_SP); + __ mr(R21_sender_SP, R1_SP); // Do a light-weight C-call here, r_new_arg_entry holds the address // of the interpreter entry point (frame manager or native entry)
--- a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp Mon Jan 14 23:05:26 2019 +0100 @@ -532,14 +532,8 @@ // these parameters the pre-barrier does not generate // the load of the previous value. - // Restore caller sp for c2i case. -#ifdef ASSERT - __ ld(R9_ARG7, 0, R1_SP); - __ ld(R10_ARG8, 0, R21_sender_SP); - __ cmpd(CCR0, R9_ARG7, R10_ARG8); - __ asm_assert_eq("backlink", 0x544); -#endif // ASSERT - __ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started. + // Restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted). + __ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0); __ blr(); @@ -835,8 +829,13 @@ assert(StubRoutines::throw_StackOverflowError_entry() != NULL, "generated in wrong order"); __ load_const_optimized(Rscratch1, (StubRoutines::throw_StackOverflowError_entry()), R0); __ mtctr(Rscratch1); - // Restore caller_sp. + // Restore caller_sp (c2i adapter may exist, but no shrinking of interpreted caller frame). #ifdef ASSERT + Label frame_not_shrunk; + __ cmpld(CCR0, R1_SP, R21_sender_SP); + __ ble(CCR0, frame_not_shrunk); + __ stop("frame shrunk", 0x546); + __ bind(frame_not_shrunk); __ ld(Rscratch1, 0, R1_SP); __ ld(R0, 0, R21_sender_SP); __ cmpd(CCR0, R0, Rscratch1); @@ -1155,15 +1154,6 @@ } } - // Pop c2i arguments (if any) off when we return. -#ifdef ASSERT - __ ld(R9_ARG7, 0, R1_SP); - __ ld(R10_ARG8, 0, R21_sender_SP); - __ cmpd(CCR0, R9_ARG7, R10_ARG8); - __ asm_assert_eq("backlink", 0x545); -#endif // ASSERT - __ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started. - if (use_instruction) { switch (kind) { case Interpreter::java_lang_math_sqrt: __ fsqrt(F1_RET, F1); break; @@ -1188,6 +1178,8 @@ __ restore_LR_CR(R0); } + // Restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted). + __ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0); __ blr(); __ flush(); @@ -1843,8 +1835,8 @@ StubRoutines::ppc64::generate_load_crc_table_addr(_masm, table); __ kernel_crc32_singleByte(crc, data, dataLen, table, tmp, true); - // Restore caller sp for c2i case and return. - __ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started. + // Restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted). + __ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0); __ blr(); // Generate a vanilla native entry as the slow path. @@ -1931,8 +1923,8 @@ // code compactness. __ kernel_crc32_1word(crc, data, dataLen, table, t0, t1, t2, t3, tc0, tc1, tc2, tc3, true); - // Restore caller sp for c2i case and return. - __ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started. + // Restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted). + __ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0); __ blr(); // Generate a vanilla native entry as the slow path. @@ -2019,8 +2011,8 @@ // code compactness. __ kernel_crc32_1word(crc, data, dataLen, table, t0, t1, t2, t3, tc0, tc1, tc2, tc3, false); - // Restore caller sp for c2i case and return. - __ mr(R1_SP, R21_sender_SP); // Cut the stack back to where the caller started. + // Restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted). + __ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0); __ blr(); BLOCK_COMMENT("} CRC32C_update{Bytes|DirectByteBuffer}");
--- a/src/hotspot/share/ci/ciEnv.hpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/ci/ciEnv.hpp Mon Jan 14 23:05:26 2019 +0100 @@ -46,6 +46,7 @@ friend class CompileBroker; friend class Dependencies; // for get_object, during logging + friend class PrepareExtraDataClosure; private: Arena* _arena; // Alias for _ciEnv_arena except in init_shared_objects() @@ -188,6 +189,10 @@ } } + ciMetadata* cached_metadata(Metadata* o) { + return _factory->cached_metadata(o); + } + ciInstance* get_instance(oop o) { if (o == NULL) return NULL; return get_object(o)->as_instance();
--- a/src/hotspot/share/ci/ciMethodData.cpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/ci/ciMethodData.cpp Mon Jan 14 23:05:26 2019 +0100 @@ -78,10 +78,81 @@ _parameters = NULL; } +// Check for entries that reference an unloaded method +class PrepareExtraDataClosure : public CleanExtraDataClosure { + MethodData* _mdo; + uint64_t _safepoint_counter; + GrowableArray<Method*> _uncached_methods; + +public: + PrepareExtraDataClosure(MethodData* mdo) + : _mdo(mdo), + _safepoint_counter(SafepointSynchronize::safepoint_counter()), + _uncached_methods() + { } + + bool is_live(Method* m) { + if (!m->method_holder()->is_loader_alive()) { + return false; + } + if (CURRENT_ENV->cached_metadata(m) == NULL) { + // Uncached entries need to be pre-populated. + _uncached_methods.append(m); + } + return true; + } + + bool has_safepointed() { + return SafepointSynchronize::safepoint_counter() != _safepoint_counter; + } + + bool finish() { + if (_uncached_methods.length() == 0) { + // Preparation finished iff all Methods* were already cached. + return true; + } + // Holding locks through safepoints is bad practice. + MutexUnlocker mu(_mdo->extra_data_lock()); + for (int i = 0; i < _uncached_methods.length(); ++i) { + if (has_safepointed()) { + // The metadata in the growable array might contain stale + // entries after a safepoint. + return false; + } + Method* method = _uncached_methods.at(i); + // Populating ciEnv caches may cause safepoints due + // to taking the Compile_lock with safepoint checks. + (void)CURRENT_ENV->get_method(method); + } + return false; + } +}; + +void ciMethodData::prepare_metadata() { + MethodData* mdo = get_MethodData(); + + for (;;) { + ResourceMark rm; + PrepareExtraDataClosure cl(mdo); + mdo->clean_extra_data(&cl); + if (cl.finish()) { + // When encountering uncached metadata, the Compile_lock might be + // acquired when creating ciMetadata handles, causing safepoints + // which requires a new round of preparation to clean out potentially + // new unloading metadata. + return; + } + } +} + void ciMethodData::load_extra_data() { MethodData* mdo = get_MethodData(); - MutexLocker ml(mdo->extra_data_lock()); + // Deferred metadata cleaning due to concurrent class unloading. + prepare_metadata(); + // After metadata preparation, there is no stale metadata, + // and no safepoints can introduce more stale metadata. + NoSafepointVerifier no_safepoint; // speculative trap entries also hold a pointer to a Method so need to be translated DataLayout* dp_src = mdo->extra_data_base(); @@ -94,7 +165,7 @@ // New traps in the MDO may have been added since we copied the // data (concurrent deoptimizations before we acquired // extra_data_lock above) or can be removed (a safepoint may occur - // in the translate_from call below) as we translate the copy: + // in the prepare_metadata call above) as we translate the copy: // update the copy as we go. int tag = dp_src->tag(); if (tag != DataLayout::arg_info_data_tag) { @@ -105,11 +176,7 @@ case DataLayout::speculative_trap_data_tag: { ciSpeculativeTrapData data_dst(dp_dst); SpeculativeTrapData data_src(dp_src); - - { // During translation a safepoint can happen or VM lock can be taken (e.g., Compile_lock). - MutexUnlocker ml(mdo->extra_data_lock()); - data_dst.translate_from(&data_src); - } + data_dst.translate_from(&data_src); break; } case DataLayout::bit_data_tag:
--- a/src/hotspot/share/ci/ciMethodData.hpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/ci/ciMethodData.hpp Mon Jan 14 23:05:26 2019 +0100 @@ -475,6 +475,7 @@ return (address) _data; } + void prepare_metadata(); void load_extra_data(); ciProfileData* bci_to_extra_data(int bci, ciMethod* m, bool& two_free_slots);
--- a/src/hotspot/share/ci/ciObjectFactory.cpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/ci/ciObjectFactory.cpp Mon Jan 14 23:05:26 2019 +0100 @@ -266,6 +266,24 @@ } // ------------------------------------------------------------------ +// ciObjectFactory::cached_metadata +// +// Get the ciMetadata corresponding to some Metadata. If the ciMetadata has +// already been created, it is returned. Otherwise, null is returned. +ciMetadata* ciObjectFactory::cached_metadata(Metadata* key) { + ASSERT_IN_VM; + + bool found = false; + int index = _ci_metadata->find_sorted<Metadata*, ciObjectFactory::metadata_compare>(key, found); + + if (!found) { + return NULL; + } + return _ci_metadata->at(index)->as_metadata(); +} + + +// ------------------------------------------------------------------ // ciObjectFactory::get_metadata // // Get the ciMetadata corresponding to some Metadata. If the ciMetadata has
--- a/src/hotspot/share/ci/ciObjectFactory.hpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/ci/ciObjectFactory.hpp Mon Jan 14 23:05:26 2019 +0100 @@ -100,6 +100,7 @@ // Get the ciObject corresponding to some oop. ciObject* get(oop key); ciMetadata* get_metadata(Metadata* key); + ciMetadata* cached_metadata(Metadata* key); ciSymbol* get_symbol(Symbol* key); // Get the ciSymbol corresponding to one of the vmSymbols.
--- a/src/hotspot/share/code/nmethod.cpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/code/nmethod.cpp Mon Jan 14 23:05:26 2019 +0100 @@ -1159,6 +1159,19 @@ } } +void nmethod::unlink_from_method(bool acquire_lock) { + // We need to check if both the _code and _from_compiled_code_entry_point + // refer to this nmethod because there is a race in setting these two fields + // in Method* as seen in bugid 4947125. + // If the vep() points to the zombie nmethod, the memory for the nmethod + // could be flushed and the compiler and vtable stubs could still call + // through it. + if (method() != NULL && (method()->code() == this || + method()->from_compiled_entry() == verified_entry_point())) { + method()->clear_code(acquire_lock); + } +} + /** * Common functionality for both make_not_entrant and make_zombie */ @@ -1246,17 +1259,7 @@ JVMCI_ONLY(maybe_invalidate_installed_code()); // Remove nmethod from method. - // We need to check if both the _code and _from_compiled_code_entry_point - // refer to this nmethod because there is a race in setting these two fields - // in Method* as seen in bugid 4947125. - // If the vep() points to the zombie nmethod, the memory for the nmethod - // could be flushed and the compiler and vtable stubs could still call - // through it. - if (method() != NULL && (method()->code() == this || - method()->from_compiled_entry() == verified_entry_point())) { - HandleMark hm; - method()->clear_code(false /* already owns Patching_lock */); - } + unlink_from_method(false /* already owns Patching_lock */); } // leave critical region under Patching_lock #ifdef ASSERT
--- a/src/hotspot/share/code/nmethod.hpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/code/nmethod.hpp Mon Jan 14 23:05:26 2019 +0100 @@ -377,6 +377,8 @@ int comp_level() const { return _comp_level; } + void unlink_from_method(bool acquire_lock); + // Support for oops in scopes and relocs: // Note: index 0 is reserved for null. oop oop_at(int index) const;
--- a/src/hotspot/share/gc/z/zBarrierSetNMethod.cpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/gc/z/zBarrierSetNMethod.cpp Mon Jan 14 23:05:26 2019 +0100 @@ -42,6 +42,11 @@ } if (nm->is_unloading()) { + // We don't need to take the lock when unlinking nmethods from + // the Method, because it is only concurrently unlinked by + // the entry barrier, which acquires the per nmethod lock. + nm->unlink_from_method(false /* acquire_lock */); + // We can end up calling nmethods that are unloading // since we clear compiled ICs lazily. Returning false // will re-resovle the call and update the compiled IC.
--- a/src/hotspot/share/gc/z/zNMethodTable.cpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/gc/z/zNMethodTable.cpp Mon Jan 14 23:05:26 2019 +0100 @@ -611,15 +611,20 @@ return; } + ZLocker<ZReentrantLock> locker(ZNMethodTable::lock_for_nmethod(nm)); + if (nm->is_unloading()) { // Unlinking of the dependencies must happen before the // handshake separating unlink and purge. nm->flush_dependencies(false /* delete_immediately */); + + // We don't need to take the lock when unlinking nmethods from + // the Method, because it is only concurrently unlinked by + // the entry barrier, which acquires the per nmethod lock. + nm->unlink_from_method(false /* acquire_lock */); return; } - ZLocker<ZReentrantLock> locker(ZNMethodTable::lock_for_nmethod(nm)); - // Heal oops and disarm ZNMethodOopClosure cl; ZNMethodTable::entry_oops_do(entry, &cl);
--- a/src/hotspot/share/oops/instanceKlass.cpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/oops/instanceKlass.cpp Mon Jan 14 23:05:26 2019 +0100 @@ -2178,6 +2178,7 @@ for (int m = 0; m < methods()->length(); m++) { MethodData* mdo = methods()->at(m)->method_data(); if (mdo != NULL) { + MutexLockerEx ml(SafepointSynchronize::is_at_safepoint() ? NULL : mdo->extra_data_lock()); mdo->clean_method_data(/*always_clean*/false); } }
--- a/src/hotspot/share/oops/methodData.cpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/oops/methodData.cpp Mon Jan 14 23:05:26 2019 +0100 @@ -1653,11 +1653,6 @@ } } -class CleanExtraDataClosure : public StackObj { -public: - virtual bool is_live(Method* m) = 0; -}; - // Check for entries that reference an unloaded method class CleanExtraDataKlassClosure : public CleanExtraDataClosure { bool _always_clean;
--- a/src/hotspot/share/oops/methodData.hpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/oops/methodData.hpp Mon Jan 14 23:05:26 2019 +0100 @@ -1943,7 +1943,11 @@ // adjusted in the event of a change in control flow. // -class CleanExtraDataClosure; +class CleanExtraDataClosure : public StackObj { +public: + virtual bool is_live(Method* m) = 0; +}; + class MethodData : public Metadata { friend class VMStructs; @@ -2116,11 +2120,12 @@ static bool profile_parameters_jsr292_only(); static bool profile_all_parameters(); - void clean_extra_data(CleanExtraDataClosure* cl); void clean_extra_data_helper(DataLayout* dp, int shift, bool reset = false); void verify_extra_data_clean(CleanExtraDataClosure* cl); public: + void clean_extra_data(CleanExtraDataClosure* cl); + static int header_size() { return sizeof(MethodData)/wordSize; }
--- a/src/hotspot/share/opto/escape.cpp Mon Jan 14 11:22:32 2019 -0800 +++ b/src/hotspot/share/opto/escape.cpp Mon Jan 14 23:05:26 2019 +0100 @@ -1727,7 +1727,8 @@ // Node* n = field->ideal_node(); for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) { - if (n->fast_out(i)->is_LoadStore()) { + Node* u = n->fast_out(i); + if (u->is_LoadStore() || (u->is_Mem() && u->as_Mem()->is_mismatched_access())) { jobj->set_scalar_replaceable(false); return; }
--- a/src/java.base/share/classes/java/lang/Class.java Mon Jan 14 11:22:32 2019 -0800 +++ b/src/java.base/share/classes/java/lang/Class.java Mon Jan 14 23:05:26 2019 +0100 @@ -3419,8 +3419,8 @@ StringBuilder sb = new StringBuilder(); sb.append(getName() + "." + name + "("); if (argTypes != null) { - Stream.of(argTypes).map(c -> {return (c == null) ? "null" : c.getName();}). - collect(Collectors.joining(",")); + sb.append(Stream.of(argTypes).map(c -> {return (c == null) ? "null" : c.getName();}). + collect(Collectors.joining(","))); } sb.append(")"); return sb.toString();
--- a/src/java.base/share/classes/java/lang/invoke/VarHandle.java Mon Jan 14 11:22:32 2019 -0800 +++ b/src/java.base/share/classes/java/lang/invoke/VarHandle.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2019, 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 @@ -1865,35 +1865,6 @@ } /** - * Compare this {@linkplain VarHandle} with another object for equality. - * Two {@linkplain VarHandle}s are considered equal if they both describe the - * same instance field, both describe the same static field, both describe - * array elements for arrays with the same component type, or both describe - * the same component of an off-heap structure. - * - * @param o the other object - * @return Whether this {@linkplain VarHandle} is equal to the other object - */ - @Override - public final boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - VarHandle that = (VarHandle) o; - return accessModeType(AccessMode.GET).equals(that.accessModeType(AccessMode.GET)) && - internalEquals(that); - } - - abstract boolean internalEquals(VarHandle vh); - - @Override - public final int hashCode() { - return 31 * accessModeType(AccessMode.GET).hashCode() + internalHashCode(); - } - - abstract int internalHashCode(); - - /** * Returns a compact textual description of this {@linkplain VarHandle}, * including the type of variable described, and a description of its coordinates. *
--- a/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template Mon Jan 14 11:22:32 2019 -0800 +++ b/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -64,17 +64,6 @@ } @Override - final boolean internalEquals(VarHandle vh) { - FieldInstanceReadOnly that = (FieldInstanceReadOnly) vh; - return fieldOffset == that.fieldOffset; - } - - @Override - final int internalHashCode() { - return Long.hashCode(fieldOffset); - } - - @Override public Optional<VarHandleDesc> describeConstable() { var receiverTypeRef = receiverType.describeConstable(); var fieldTypeRef = {#if[Object]?fieldType:$type$.class}.describeConstable(); @@ -350,17 +339,6 @@ } @Override - final boolean internalEquals(VarHandle vh) { - FieldStaticReadOnly that = (FieldStaticReadOnly) vh; - return base == that.base && fieldOffset == that.fieldOffset; - } - - @Override - final int internalHashCode() { - return 31 * Long.hashCode(fieldOffset) + base.hashCode(); - } - - @Override public Optional<VarHandleDesc> describeConstable() { var fieldTypeRef = {#if[Object]?fieldType:$type$.class}.describeConstable(); if (!fieldTypeRef.isPresent()) @@ -640,20 +618,6 @@ } @Override - final boolean internalEquals(VarHandle vh) { - // Equality of access mode types of AccessMode.GET is sufficient for - // equality checks - return true; - } - - @Override - final int internalHashCode() { - // The hash code of the access mode types of AccessMode.GET is - // sufficient for hash code generation - return 0; - } - - @Override public Optional<VarHandleDesc> describeConstable() { var arrayTypeRef = {#if[Object]?arrayType:$type$[].class}.describeConstable(); if (!arrayTypeRef.isPresent())
--- a/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template Mon Jan 14 11:22:32 2019 -0800 +++ b/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -67,17 +67,6 @@ super(form); this.be = be; } - - @Override - final boolean internalEquals(VarHandle vh) { - ByteArrayViewVarHandle that = (ByteArrayViewVarHandle) vh; - return be == that.be; - } - - @Override - final int internalHashCode() { - return Boolean.hashCode(be); - } } static final class ArrayHandle extends ByteArrayViewVarHandle {
--- a/src/java.base/share/classes/sun/security/ssl/Ciphertext.java Mon Jan 14 11:22:32 2019 -0800 +++ b/src/java.base/share/classes/sun/security/ssl/Ciphertext.java Mon Jan 14 23:05:26 2019 +0100 @@ -31,8 +31,6 @@ * Ciphertext */ final class Ciphertext { - static final Ciphertext CIPHERTEXT_NULL = new Ciphertext(); - final byte contentType; final byte handshakeType; final long recordSN;
--- a/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java Mon Jan 14 11:22:32 2019 -0800 +++ b/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java Mon Jan 14 23:05:26 2019 +0100 @@ -247,6 +247,19 @@ hsStatus = ciphertext.handshakeStatus; } else { hsStatus = getHandshakeStatus(); + if (ciphertext == null && !conContext.isNegotiated && + conContext.isInboundClosed() && + hsStatus == HandshakeStatus.NEED_WRAP) { + // Even the outboud is open, no futher data could be wrapped as: + // 1. the outbound is empty + // 2. no negotiated connection + // 3. the inbound has closed, cannot complete the handshake + // + // Mark the engine as closed if the handshake status is + // NEED_WRAP. Otherwise, it could lead to dead loops in + // applications. + status = Status.CLOSED; + } } int deltaSrcs = srcsRemains; @@ -279,7 +292,7 @@ } if (ciphertext == null) { - return Ciphertext.CIPHERTEXT_NULL; + return null; } // Is the handshake completed?
--- a/src/java.base/share/classes/sun/security/ssl/TransportContext.java Mon Jan 14 11:22:32 2019 -0800 +++ b/src/java.base/share/classes/sun/security/ssl/TransportContext.java Mon Jan 14 23:05:26 2019 +0100 @@ -577,13 +577,7 @@ } else if (!isOutboundClosed()) { // Special case that the inbound was closed, but outbound open. return HandshakeStatus.NEED_WRAP; - } - } else if (isOutboundClosed() && !isInboundClosed()) { - // Special case that the outbound was closed, but inbound open. - return HandshakeStatus.NEED_UNWRAP; - } else if (!isOutboundClosed() && isInboundClosed()) { - // Special case that the inbound was closed, but outbound open. - return HandshakeStatus.NEED_WRAP; + } // Otherwise, both inbound and outbound are closed. } return HandshakeStatus.NOT_HANDSHAKING;
--- a/src/java.base/share/lib/security/default.policy Mon Jan 14 11:22:32 2019 -0800 +++ b/src/java.base/share/lib/security/default.policy Mon Jan 14 23:05:26 2019 +0100 @@ -158,10 +158,14 @@ }; grant codeBase "jrt:/jdk.internal.vm.compiler.management" { - permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.hotspot"; + permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.vm.compiler.collections"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.vm.ci.runtime"; - permission java.lang.RuntimePermission "accessClassInPackage.sun.management.spi"; - permission java.lang.RuntimePermission "sun.management.spi.PlatformMBeanProvider.subclass"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.core.common"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.debug"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.hotspot"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.options"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.phases.common.jmx"; + permission java.lang.RuntimePermission "accessClassInPackage.org.graalvm.compiler.serviceprovider"; }; grant codeBase "jrt:/jdk.jsobject" {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties Mon Jan 14 11:22:32 2019 -0800 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2019, 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 @@ -44,7 +44,7 @@ javac.opt.sourcepath=\ Specify where to find input source files javac.opt.m=\ - Compile only the specified module, check timestamps + Compile only the specified module(s), check timestamps javac.opt.modulesourcepath=\ Specify where to find input source files for multiple modules javac.opt.bootclasspath=\ @@ -108,7 +108,7 @@ javac.opt.arg.mspath=\ <module-source-path> javac.opt.arg.m=\ - <module-name> + <module>(,<module>)* javac.opt.arg.jdk=\ <jdk>|none javac.opt.arg.dirs=\
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java Mon Jan 14 11:22:32 2019 -0800 +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64Assembler.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2019, 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 @@ -1759,6 +1759,14 @@ emitOperandHelper(dst, src, 0); } + public final void cmpb(Register dst, Register src) { + CMP.byteRmOp.emit(this, BYTE, dst, src); + } + + public final void cmpw(Register dst, Register src) { + CMP.rmOp.emit(this, WORD, dst, src); + } + public final void cmpl(Register dst, int imm32) { CMP.getMIOpcode(DWORD, isByte(imm32)).emit(this, DWORD, dst, imm32); }
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayIndexOfOp.java Mon Jan 14 11:22:32 2019 -0800 +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64ArrayIndexOfOp.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2019 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 @@ -125,6 +125,14 @@ return kind == JavaKind.Char; } + private JavaKind getComparisonKind() { + return findTwoConsecutive ? (byteMode(kind) ? JavaKind.Char : JavaKind.Int) : kind; + } + + private AVXKind.AVXSize getVectorSize() { + return AVXKind.getDataSize(vectorKind); + } + @Override public void emitCode(CompilationResultBuilder crb, AMD64MacroAssembler asm) { Register arrayPtr = asRegister(arrayPtrValue); @@ -159,9 +167,6 @@ Label retNotFound = new Label(); Label end = new Label(); - AVXKind.AVXSize vectorSize = AVXKind.getDataSize(vectorKind); - int nVectors = nValues == 1 ? 4 : nValues == 2 ? 2 : 1; - // load array length // important: this must be the first register manipulation, since arrayLengthValue is // annotated with @Use @@ -178,10 +183,10 @@ } // fill comparison vector with copies of the search value for (int i = 0; i < nValues; i++) { - emitBroadcast(asm, findTwoConsecutive ? (byteMode(kind) ? JavaKind.Char : JavaKind.Int) : kind, vecCmp[i], vecArray[0], vectorSize); + emitBroadcast(asm, getComparisonKind(), vecCmp[i], vecArray[0], getVectorSize()); } - emitArrayIndexOfChars(crb, asm, kind, vectorSize, result, slotsRemaining, searchValue, vecCmp, vecArray, cmpResult, retFound, retNotFound, vmPageSize, nValues, nVectors, findTwoConsecutive); + emitArrayIndexOfChars(crb, asm, result, slotsRemaining, searchValue, vecCmp, vecArray, cmpResult, retFound, retNotFound); // return -1 (no match) asm.bind(retNotFound); @@ -197,7 +202,7 @@ asm.bind(end); } - private static void emitArrayIndexOfChars(CompilationResultBuilder crb, AMD64MacroAssembler asm, JavaKind kind, AVXKind.AVXSize vectorSize, + private void emitArrayIndexOfChars(CompilationResultBuilder crb, AMD64MacroAssembler asm, Register arrayPtr, Register slotsRemaining, Register[] searchValue, @@ -205,11 +210,10 @@ Register[] vecArray, Register[] cmpResult, Label retFound, - Label retNotFound, - int vmPageSize, - int nValues, - int nVectors, - boolean findTwoCharPrefix) { + Label retNotFound) { + int nVectors = nValues == 1 ? 4 : nValues == 2 ? 2 : 1; + AVXKind.AVXSize vectorSize = getVectorSize(); + Label bulkVectorLoop = new Label(); Label singleVectorLoop = new Label(); Label[] vectorFound = { @@ -229,7 +233,7 @@ int bulkLoopCondition = bulkSize; int[] vectorOffsets; JavaKind vectorCompareKind = kind; - if (findTwoCharPrefix) { + if (findTwoConsecutive) { singleVectorLoopCondition++; bulkLoopCondition++; bulkSize /= 2; @@ -274,7 +278,7 @@ emitAlign(crb, asm); asm.bind(bulkVectorLoop); // memory-aligned bulk comparison - emitVectorCompare(asm, vectorCompareKind, vectorSize, nValues, nVectors, vectorOffsets, arrayPtr, vecCmp, vecArray, cmpResult, vectorFound, !findTwoCharPrefix); + emitVectorCompare(asm, vectorCompareKind, vectorSize, nValues, nVectors, vectorOffsets, arrayPtr, vecCmp, vecArray, cmpResult, vectorFound, !findTwoConsecutive); // adjust number of array slots remaining asm.subl(slotsRemaining, bulkSize); // adjust array pointer @@ -293,7 +297,7 @@ asm.cmpl(slotsRemaining, singleVectorLoopCondition); asm.jcc(AMD64Assembler.ConditionFlag.Below, lessThanVectorSizeRemaining); // compare - emitVectorCompare(asm, vectorCompareKind, vectorSize, nValues, findTwoCharPrefix ? 2 : 1, vectorOffsets, arrayPtr, vecCmp, vecArray, cmpResult, vectorFound, false); + emitVectorCompare(asm, vectorCompareKind, vectorSize, nValues, findTwoConsecutive ? 2 : 1, vectorOffsets, arrayPtr, vecCmp, vecArray, cmpResult, vectorFound, false); // adjust number of array slots remaining asm.subl(slotsRemaining, arraySlotsPerVector); // adjust array pointer @@ -313,16 +317,16 @@ asm.movl(tmpArrayPtrLow, arrayPtr); // check if pointer + vector size would cross the page boundary asm.andl(tmpArrayPtrLow, (vmPageSize - 1)); - asm.cmpl(tmpArrayPtrLow, (vmPageSize - (findTwoCharPrefix ? bytesPerVector + kind.getByteCount() : bytesPerVector))); + asm.cmpl(tmpArrayPtrLow, (vmPageSize - (findTwoConsecutive ? bytesPerVector + kind.getByteCount() : bytesPerVector))); // if the page boundary would be crossed, do byte/character-wise comparison instead. asm.jccb(AMD64Assembler.ConditionFlag.Above, lessThanVectorSizeRemainingLoop); Label[] overBoundsMatch = {new Label(), new Label()}; // otherwise, do a vector compare that reads beyond array bounds - emitVectorCompare(asm, vectorCompareKind, vectorSize, nValues, findTwoCharPrefix ? 2 : 1, vectorOffsets, arrayPtr, vecCmp, vecArray, cmpResult, overBoundsMatch, false); + emitVectorCompare(asm, vectorCompareKind, vectorSize, nValues, findTwoConsecutive ? 2 : 1, vectorOffsets, arrayPtr, vecCmp, vecArray, cmpResult, overBoundsMatch, false); // no match asm.jmp(retNotFound); - if (findTwoCharPrefix) { + if (findTwoConsecutive) { Label overBoundsFinish = new Label(); asm.bind(overBoundsMatch[1]); // get match offset of second result @@ -348,14 +352,14 @@ } // check if offset of matched value is greater than number of bytes remaining / out of array // bounds - if (findTwoCharPrefix) { + if (findTwoConsecutive) { asm.decrementl(slotsRemaining); } asm.cmpl(cmpResult[0], slotsRemaining); // match is out of bounds, return no match asm.jcc(AMD64Assembler.ConditionFlag.GreaterEqual, retNotFound); // adjust number of array slots remaining - if (findTwoCharPrefix) { + if (findTwoConsecutive) { asm.incrementl(slotsRemaining, 1); } asm.subl(slotsRemaining, cmpResult[0]); @@ -365,17 +369,17 @@ // compare remaining slots in the array one-by-one asm.bind(lessThanVectorSizeRemainingLoop); // check if enough array slots remain - asm.cmpl(slotsRemaining, findTwoCharPrefix ? 1 : 0); + asm.cmpl(slotsRemaining, findTwoConsecutive ? 1 : 0); asm.jcc(AMD64Assembler.ConditionFlag.LessEqual, retNotFound); // load char / byte if (byteMode(kind)) { - if (findTwoCharPrefix) { + if (findTwoConsecutive) { asm.movzwl(cmpResult[0], new AMD64Address(arrayPtr)); } else { asm.movzbl(cmpResult[0], new AMD64Address(arrayPtr)); } } else { - if (findTwoCharPrefix) { + if (findTwoConsecutive) { asm.movl(cmpResult[0], new AMD64Address(arrayPtr)); } else { asm.movzwl(cmpResult[0], new AMD64Address(arrayPtr)); @@ -383,7 +387,7 @@ } // check for match for (int i = 0; i < nValues; i++) { - asm.cmpl(cmpResult[0], searchValue[i]); + emitCompareInst(asm, getComparisonKind(), cmpResult[0], searchValue[i]); asm.jcc(AMD64Assembler.ConditionFlag.Equal, retFound); } // adjust number of array slots remaining @@ -393,11 +397,11 @@ // continue loop asm.jmpb(lessThanVectorSizeRemainingLoop); - for (int i = 1; i < nVectors; i += (findTwoCharPrefix ? 2 : 1)) { + for (int i = 1; i < nVectors; i += (findTwoConsecutive ? 2 : 1)) { emitVectorFoundWithOffset(asm, kind, vectorOffsets[i], arrayPtr, cmpResult[i], slotsRemaining, vectorFound[i], retFound); } - if (findTwoCharPrefix) { + if (findTwoConsecutive) { asm.bind(vectorFound[2]); asm.addq(arrayPtr, vectorOffsets[2]); // adjust number of array slots remaining @@ -626,6 +630,23 @@ } } + private static void emitCompareInst(AMD64MacroAssembler asm, JavaKind kind, Register dst, Register src) { + switch (kind) { + case Byte: + asm.cmpb(dst, src); + break; + case Short: + case Char: + asm.cmpw(dst, src); + break; + case Int: + asm.cmpl(dst, src); + break; + default: + asm.cmpq(dst, src); + } + } + private static boolean supportsAVX2(LIRGeneratorTool tool) { return supports(tool, CPUFeature.AVX2); }
--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java Mon Jan 14 11:22:32 2019 -0800 +++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java Mon Jan 14 23:05:26 2019 +0100 @@ -185,7 +185,7 @@ it.set(current); } - historyLoad = Instant.now(); + historyLoad = Instant.MIN; loadHistory.forEach(line -> reader.getHistory().add(historyLoad, line)); in = reader;
--- a/test/hotspot/jtreg/ProblemList.txt Mon Jan 14 11:22:32 2019 -0800 +++ b/test/hotspot/jtreg/ProblemList.txt Mon Jan 14 23:05:26 2019 +0100 @@ -85,7 +85,6 @@ runtime/appcds/javaldr/GCSharedStringsDuringDump.java 8208778 macosx-x64 runtime/appcds/javaldr/GCDuringDump.java 8208778 macosx-x64 -runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java 8213299 generic-all runtime/CompressedOops/UseCompressedOops.java 8079353 generic-all runtime/handshake/HandshakeWalkSuspendExitTest.java 8214174 generic-all runtime/RedefineTests/RedefineRunningMethods.java 8208778 macosx-x64
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/hotspot/jtreg/compiler/unsafe/MismatchedUnsafeLoadFromNewObject.java Mon Jan 14 23:05:26 2019 +0100 @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2019, Red Hat, Inc. 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. + */ + +/* + * @test + * @bug 8216549 + * @summary Mismatched unsafe access to non escaping object fails + * + * @modules java.base/jdk.internal.misc + * @run main/othervm -XX:-UseOnStackReplacement -XX:-BackgroundCompilation MismatchedUnsafeLoadFromNewObject + */ + +import java.lang.reflect.Field; +import jdk.internal.misc.Unsafe; + +public class MismatchedUnsafeLoadFromNewObject { + public volatile int f_int = -1; + public volatile int f_int2 = -1; + + public static Unsafe unsafe = Unsafe.getUnsafe(); + public static final long f_int_off; + public static final long f_int2_off; + + static { + Field f_int_field = null; + Field f_int2_field = null; + try { + f_int_field = MismatchedUnsafeLoadFromNewObject.class.getField("f_int"); + f_int2_field = MismatchedUnsafeLoadFromNewObject.class.getField("f_int2"); + } catch (Exception e) { + System.out.println("reflection failed " + e); + e.printStackTrace(); + } + f_int_off = unsafe.objectFieldOffset(f_int_field); + f_int2_off = unsafe.objectFieldOffset(f_int2_field); + } + + static public void main(String[] args) { + for (int i = 0; i < 20_000; i++) { + byte res = test1(); + if (res != -1) { + throw new RuntimeException("Incorrect result: " + res); + } + res = test2(); + if (res != -1) { + throw new RuntimeException("Incorrect result: " + res); + } + int res2 = test3(); + if (res2 != -1) { + throw new RuntimeException("Incorrect result: " + res2); + } + } + } + + static byte test1() { + MismatchedUnsafeLoadFromNewObject t = new MismatchedUnsafeLoadFromNewObject(); + return unsafe.getByte(t, f_int_off); + } + + static byte test2() { + MismatchedUnsafeLoadFromNewObject t = new MismatchedUnsafeLoadFromNewObject(); + return unsafe.getByte(t, f_int_off+1); + } + + static int test3() { + MismatchedUnsafeLoadFromNewObject t = new MismatchedUnsafeLoadFromNewObject(); + if (f_int_off < f_int2_off) { + return unsafe.getIntUnaligned(t, f_int_off+1); + } else { + return unsafe.getIntUnaligned(t, f_int2_off+1); + } + } +}
--- a/test/jdk/ProblemList.txt Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/ProblemList.txt Mon Jan 14 23:05:26 2019 +0100 @@ -583,7 +583,6 @@ java/nio/file/WatchService/LotsOfCancels.java 8188039 solaris-all Solaris 11 java/nio/file/WatchService/LotsOfEvents.java 7158947 solaris-all Solaris 11 -sun/nio/cs/OLD/TestIBMDB.java 8211841 aix-ppc64 ############################################################################
--- a/test/jdk/java/lang/constant/CondyDescTest.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/constant/CondyDescTest.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2019, 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 @@ -67,7 +67,6 @@ private void testVarHandleDesc(DynamicConstantDesc<VarHandle> r, VarHandle vh) throws ReflectiveOperationException { testSymbolicDesc(r); - assertEquals(r.resolveConstantDesc(LOOKUP), vh); assertEquals(vh.describeConstable().orElseThrow(), r); }
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -141,8 +141,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -141,8 +141,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -141,8 +141,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -141,8 +141,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -141,8 +141,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -141,8 +141,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -141,8 +141,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -141,8 +141,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessString.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessString.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -143,8 +143,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsChar.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsChar.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -93,8 +93,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -93,8 +93,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -93,8 +93,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -93,8 +93,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -93,8 +93,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsShort.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsShort.java Mon Jan 14 23:05:26 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, 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 @@ -93,8 +93,6 @@ for (int j = 0; j < vhs1.length; j++) { if (i == j) { assertEquals(vhs1[i], vhs1[i]); - assertEquals(vhs1[i], vhs2[i]); - assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode()); } else { assertNotEquals(vhs1[i], vhs1[j]);
--- a/test/jdk/sun/nio/cs/OLD/IBM1383_OLD.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/sun/nio/cs/OLD/IBM1383_OLD.java Mon Jan 14 23:05:26 2019 +0100 @@ -31,7 +31,7 @@ import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; import java.nio.charset.CharacterCodingException; -import sun.nio.cs.HistoricallyNamedCharset; +import sun.nio.cs.*; import sun.nio.cs.ext.*;
--- a/test/jdk/sun/nio/cs/OLD/IBM942_OLD.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/sun/nio/cs/OLD/IBM942_OLD.java Mon Jan 14 23:05:26 2019 +0100 @@ -31,7 +31,7 @@ import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; import java.nio.charset.CharacterCodingException; -import sun.nio.cs.HistoricallyNamedCharset; +import sun.nio.cs.*; import sun.nio.cs.ext.*;
--- a/test/jdk/sun/nio/cs/OLD/IBM943_OLD.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/sun/nio/cs/OLD/IBM943_OLD.java Mon Jan 14 23:05:26 2019 +0100 @@ -30,7 +30,7 @@ import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; import java.nio.charset.CharacterCodingException; -import sun.nio.cs.HistoricallyNamedCharset; +import sun.nio.cs.*; import sun.nio.cs.ext.*;
--- a/test/jdk/sun/nio/cs/OLD/IBM950_OLD.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/sun/nio/cs/OLD/IBM950_OLD.java Mon Jan 14 23:05:26 2019 +0100 @@ -30,7 +30,7 @@ import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; import java.nio.charset.CharacterCodingException; -import sun.nio.cs.HistoricallyNamedCharset; +import sun.nio.cs.*; import sun.nio.cs.ext.*;
--- a/test/jdk/sun/nio/cs/OLD/IBM970_OLD.java Mon Jan 14 11:22:32 2019 -0800 +++ b/test/jdk/sun/nio/cs/OLD/IBM970_OLD.java Mon Jan 14 23:05:26 2019 +0100 @@ -33,8 +33,7 @@ import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; import java.nio.charset.CoderResult; -import sun.nio.cs.HistoricallyNamedCharset; -import sun.nio.cs.Surrogate; +import sun.nio.cs.*; import sun.nio.cs.ext.*;