diff --git a/8069191.patch b/8069191.patch new file mode 100644 index 0000000000000000000000000000000000000000..98f375fe3166597e16e486e9376f09f47f9190c8 --- /dev/null +++ b/8069191.patch @@ -0,0 +1,284 @@ +From 8d1f47f09c817f343a5ce5a181d2789f7e1c7c84 Mon Sep 17 00:00:00 2001 +From: zhangyipeng +Date: Wed, 28 Jul 2021 17:55:27 +0800 +Subject: [PATCH] [Backport]8069191:moving predicate out of loops + may cause array accesses to bypass null check + +Offering: Cloud Compiler JDK +Reference: https://bugs.openjdk.java.net/browse/JDK-8069191 + + +Signed-off-by: Wang Kun +--- +diff --git a/hotspot/src/share/vm/opto/compile.cpp b/hotspot/src/share/vm/opto/compile.cpp +index 5bee20b..832033a 100644 +--- a/hotspot/src/share/vm/opto/compile.cpp ++++ b/hotspot/src/share/vm/opto/compile.cpp +@@ -2886,9 +2886,38 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) { + break; + } + +-#ifdef _LP64 +- case Op_CastPP: +- if (n->in(1)->is_DecodeN() && Matcher::gen_narrow_oop_implicit_null_checks()) { ++ case Op_CastPP: { ++ // Remove CastPP nodes to gain more freedom during scheduling but ++ // keep the dependency they encode as control or precedence edges ++ // (if control is set already) on memory operations. Some CastPP ++ // nodes don't have a control (don't carry a dependency): skip ++ // those. ++ if (n->in(0) != NULL) { ++ ResourceMark rm; ++ Unique_Node_List wq; ++ wq.push(n); ++ for (uint next = 0; next < wq.size(); ++next) { ++ Node *m = wq.at(next); ++ for (DUIterator_Fast imax, i = m->fast_outs(imax); i < imax; i++) { ++ Node* use = m->fast_out(i); ++ if (use->is_Mem() || use->is_EncodeNarrowPtr()) { ++ use->ensure_control_or_add_prec(n->in(0)); ++ } else if (use->in(0) == NULL) { ++ switch(use->Opcode()) { ++ case Op_AddP: ++ case Op_DecodeN: ++ case Op_DecodeNKlass: ++ case Op_CheckCastPP: ++ case Op_CastPP: ++ wq.push(use); ++ break; ++ } ++ } ++ } ++ } ++ } ++ const bool is_LP64 = LP64_ONLY(true) NOT_LP64(false); ++ if (is_LP64 && n->in(1)->is_DecodeN() && Matcher::gen_narrow_oop_implicit_null_checks()) { + Node* in1 = n->in(1); + const Type* t = n->bottom_type(); + Node* new_in1 = in1->clone(); +@@ -2921,9 +2950,15 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) { + if (in1->outcnt() == 0) { + in1->disconnect_inputs(NULL, this); + } ++ } else { ++ n->subsume_by(n->in(1), this); ++ if (n->outcnt() == 0) { ++ n->disconnect_inputs(NULL, this); ++ } + } + break; +- ++ } ++#ifdef _LP64 + case Op_CmpP: + // Do this transformation here to preserve CmpPNode::sub() and + // other TypePtr related Ideal optimizations (for example, ptr nullness). +diff --git a/hotspot/src/share/vm/opto/gcm.cpp b/hotspot/src/share/vm/opto/gcm.cpp +index f51484e..893becc 100644 +--- a/hotspot/src/share/vm/opto/gcm.cpp ++++ b/hotspot/src/share/vm/opto/gcm.cpp +@@ -116,6 +116,9 @@ void PhaseCFG::replace_block_proj_ctrl( Node *n ) { + } + } + ++static bool is_dominator(Block* d, Block* n) { ++ return d->dom_lca(n) == d; ++} + + //------------------------------schedule_pinned_nodes-------------------------- + // Set the basic block for Nodes pinned into blocks +@@ -138,6 +141,42 @@ void PhaseCFG::schedule_pinned_nodes(VectorSet &visited) { + schedule_node_into_block(node, block); + } + ++ // If the node has precedence edges (added when CastPP nodes are ++ // removed in final_graph_reshaping), fix the control of the ++ // node to cover the precedence edges and remove the ++ // dependencies. ++ Node* n = NULL; ++ for (uint i = node->len()-1; i >= node->req(); i--) { ++ Node* m = node->in(i); ++ if (m == NULL) continue; ++ // Skip the precedence edge if the test that guarded a CastPP: ++ // - was optimized out during escape analysis ++ // (OptimizePtrCompare): the CastPP's control isn't an end of ++ // block. ++ // - is moved in the branch of a dominating If: the control of ++ // the CastPP is then a Region. ++ if (m->is_block_proj() || m->is_block_start()) { ++ node->rm_prec(i); ++ if (n == NULL) { ++ n = m; ++ } else { ++ Block* bn = get_block_for_node(n); ++ Block* bm = get_block_for_node(m); ++ assert(is_dominator(bn, bm) || is_dominator(bm, bn), "one must dominate the other"); ++ n = is_dominator(bn, bm) ? m : n; ++ } ++ } ++ } ++ if (n != NULL) { ++ assert(node->in(0), "control should have been set"); ++ Block* bn = get_block_for_node(n); ++ Block* bnode = get_block_for_node(node->in(0)); ++ assert(is_dominator(bn, bnode) || is_dominator(bnode, bn), "one must dominate the other"); ++ if (!is_dominator(bn, bnode)) { ++ node->set_req(0, n); ++ } ++ } ++ + // process all inputs that are non NULL + for (int i = node->req() - 1; i >= 0; --i) { + if (node->in(i) != NULL) { +diff --git a/hotspot/src/share/vm/opto/matcher.cpp b/hotspot/src/share/vm/opto/matcher.cpp +index 0c9a8d4..1036df2 100644 +--- a/hotspot/src/share/vm/opto/matcher.cpp ++++ b/hotspot/src/share/vm/opto/matcher.cpp +@@ -1068,6 +1068,15 @@ Node *Matcher::xform( Node *n, int max_stack ) { + mstack.push(m, Visit, n, -1); + } + ++ // Handle precedence edges for interior nodes ++ for (i = n->len()-1; (uint)i >= n->req(); i--) { ++ Node *m = n->in(i); ++ if (m == NULL || C->node_arena()->contains(m)) continue; ++ n->rm_prec(i); ++ // set -1 to call add_prec() instead of set_req() during Step1 ++ mstack.push(m, Visit, n, -1); ++ } ++ + // For constant debug info, I'd rather have unmatched constants. + int cnt = n->req(); + JVMState* jvms = n->jvms(); +@@ -1758,6 +1767,14 @@ MachNode *Matcher::ReduceInst( State *s, int rule, Node *&mem ) { + return ex; + } + ++void Matcher::handle_precedence_edges(Node* n, MachNode *mach) { ++ for (uint i = n->req(); i < n->len(); i++) { ++ if (n->in(i) != NULL) { ++ mach->add_prec(n->in(i)); ++ } ++ } ++} ++ + void Matcher::ReduceInst_Chain_Rule( State *s, int rule, Node *&mem, MachNode *mach ) { + // 'op' is what I am expecting to receive + int op = _leftOp[rule]; +@@ -1792,6 +1809,8 @@ void Matcher::ReduceInst_Chain_Rule( State *s, int rule, Node *&mem, MachNode *m + + + uint Matcher::ReduceInst_Interior( State *s, int rule, Node *&mem, MachNode *mach, uint num_opnds ) { ++ handle_precedence_edges(s->_leaf, mach); ++ + if( s->_leaf->is_Load() ) { + Node *mem2 = s->_leaf->in(MemNode::Memory); + assert( mem == (Node*)1 || mem == mem2, "multiple Memories being matched at once?" ); +@@ -1874,6 +1893,9 @@ void Matcher::ReduceOper( State *s, int rule, Node *&mem, MachNode *mach ) { + mem = s->_leaf->in(MemNode::Memory); + debug_only(_mem_node = s->_leaf;) + } ++ ++ handle_precedence_edges(s->_leaf, mach); ++ + if( s->_leaf->in(0) && s->_leaf->req() > 1) { + if( !mach->in(0) ) + mach->set_req(0,s->_leaf->in(0)); +diff --git a/hotspot/src/share/vm/opto/matcher.hpp b/hotspot/src/share/vm/opto/matcher.hpp +index 2f2dc5b..f882ad2 100644 +--- a/hotspot/src/share/vm/opto/matcher.hpp ++++ b/hotspot/src/share/vm/opto/matcher.hpp +@@ -124,6 +124,8 @@ class Matcher : public PhaseTransform { + // Mach node for ConP #NULL + MachNode* _mach_null; + ++ void handle_precedence_edges(Node* n, MachNode *mach); ++ + public: + int LabelRootDepth; + // Convert ideal machine register to a register mask for spill-loads +diff --git a/hotspot/src/share/vm/opto/node.cpp b/hotspot/src/share/vm/opto/node.cpp +index d6b9d15..7ea783e 100644 +--- a/hotspot/src/share/vm/opto/node.cpp ++++ b/hotspot/src/share/vm/opto/node.cpp +@@ -1432,12 +1432,6 @@ bool Node::remove_dead_region(PhaseGVN *phase, bool can_reshape) { + return false; + } + +-//------------------------------Ideal_DU_postCCP------------------------------- +-// Idealize graph, using DU info. Must clone result into new-space +-Node *Node::Ideal_DU_postCCP( PhaseCCP * ) { +- return NULL; // Default to no change +-} +- + //------------------------------hash------------------------------------------- + // Hash function over Nodes. + uint Node::hash() const { +@@ -2126,6 +2120,14 @@ Node* Node::unique_ctrl_out() { + return found; + } + ++void Node::ensure_control_or_add_prec(Node* c) { ++ if (in(0) == NULL) { ++ set_req(0, c); ++ } else if (in(0) != c) { ++ add_prec(c); ++ } ++} ++ + //============================================================================= + //------------------------------yank------------------------------------------- + // Find and remove +diff --git a/hotspot/src/share/vm/opto/node.hpp b/hotspot/src/share/vm/opto/node.hpp +index 270b966..f0a6ee0 100644 +--- a/hotspot/src/share/vm/opto/node.hpp ++++ b/hotspot/src/share/vm/opto/node.hpp +@@ -926,9 +926,6 @@ protected: + bool remove_dead_region(PhaseGVN *phase, bool can_reshape); + public: + +- // Idealize graph, using DU info. Done after constant propagation +- virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp ); +- + // See if there is valid pipeline info + static const Pipeline *pipeline_class(); + virtual const Pipeline *pipeline() const; +@@ -962,6 +959,9 @@ public: + // Return the unique control out if only one. Null if none or more than one. + Node* unique_ctrl_out(); + ++ // Set control or add control as precedence edge ++ void ensure_control_or_add_prec(Node* c); ++ + //----------------- Code Generation + + // Ideal register class for Matching. Zero means unmatched instruction +diff --git a/hotspot/src/share/vm/opto/phaseX.cpp b/hotspot/src/share/vm/opto/phaseX.cpp +index 9c4a705..ae1031d 100644 +--- a/hotspot/src/share/vm/opto/phaseX.cpp ++++ b/hotspot/src/share/vm/opto/phaseX.cpp +@@ -1774,11 +1774,6 @@ Node *PhaseCCP::transform_once( Node *n ) { + _worklist.push(n); // n re-enters the hash table via the worklist + } + +- // Idealize graph using DU info. Must clone() into new-space. +- // DU info is generally used to show profitability, progress or safety +- // (but generally not needed for correctness). +- Node *nn = n->Ideal_DU_postCCP(this); +- + // TEMPORARY fix to ensure that 2nd GVN pass eliminates NULL checks + switch( n->Opcode() ) { + case Op_FastLock: // Revisit FastLocks for lock coarsening +@@ -1795,12 +1790,6 @@ Node *PhaseCCP::transform_once( Node *n ) { + default: + break; + } +- if( nn ) { +- _worklist.push(n); +- // Put users of 'n' onto worklist for second igvn transform +- add_users_to_worklist(n); +- return nn; +- } + + return n; + } diff --git a/8134883.patch b/8134883.patch deleted file mode 100644 index 98568d7c4372beece9014440ddae58892c242892..0000000000000000000000000000000000000000 --- a/8134883.patch +++ /dev/null @@ -1,188 +0,0 @@ -From 3646a0ea5da00fe5b9316c2ed4d6ae20e94399fb Mon Sep 17 00:00:00 2001 -Date: Fri, 22 Jan 2021 11:27:21 +0800 -Subject: fix-fastdebug-jdk-crash-when-running-a-jtreg-case - -Summary: The problem happens when c1’s loop optimizations encounter a non natural loop for which one entry is an exception handler.Backport the patch from openjdk9 -LLT: -Bug url: https://bugs.openjdk.java.net/browse/JDK-8134883 - ---- - hotspot/src/share/vm/c1/c1_IR.cpp | 7 +- - .../TestRangeCheckExceptionHandlerLoop.jasm | 89 +++++++++++++++++++ - ...estRangeCheckExceptionHandlerLoopMain.java | 41 +++++++++ - 3 files changed, 134 insertions(+), 3 deletions(-) - create mode 100644 hotspot/test/compiler/rangechecks/TestRangeCheckExceptionHandlerLoop.jasm - create mode 100644 hotspot/test/compiler/rangechecks/TestRangeCheckExceptionHandlerLoopMain.java - -diff --git a/hotspot/src/share/vm/c1/c1_IR.cpp b/hotspot/src/share/vm/c1/c1_IR.cpp -index 098409876..b500d5cf7 100644 ---- a/hotspot/src/share/vm/c1/c1_IR.cpp -+++ b/hotspot/src/share/vm/c1/c1_IR.cpp -@@ -578,11 +578,8 @@ void ComputeLinearScanOrder::count_edges(BlockBegin* cur, BlockBegin* parent) { - assert(is_visited(cur), "block must be visisted when block is active"); - assert(parent != NULL, "must have parent"); - -- cur->set(BlockBegin::linear_scan_loop_header_flag); - cur->set(BlockBegin::backward_branch_target_flag); - -- parent->set(BlockBegin::linear_scan_loop_end_flag); -- - // When a loop header is also the start of an exception handler, then the backward branch is - // an exception edge. Because such edges are usually critical edges which cannot be split, the - // loop must be excluded here from processing. -@@ -591,6 +588,10 @@ void ComputeLinearScanOrder::count_edges(BlockBegin* cur, BlockBegin* parent) { - _iterative_dominators = true; - return; - } -+ -+ cur->set(BlockBegin::linear_scan_loop_header_flag); -+ parent->set(BlockBegin::linear_scan_loop_end_flag); -+ - assert(parent->number_of_sux() == 1 && parent->sux_at(0) == cur, - "loop end blocks must have one successor (critical edges are split)"); - -diff --git a/hotspot/test/compiler/rangechecks/TestRangeCheckExceptionHandlerLoop.jasm b/hotspot/test/compiler/rangechecks/TestRangeCheckExceptionHandlerLoop.jasm -new file mode 100644 -index 000000000..2befe6db0 ---- /dev/null -+++ b/hotspot/test/compiler/rangechecks/TestRangeCheckExceptionHandlerLoop.jasm -@@ -0,0 +1,89 @@ -+/* -+ * Copyright (c) 2015, 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 -+ * 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. -+ * -+ */ -+ -+super public class TestRangeCheckExceptionHandlerLoop -+ version 51:0 -+{ -+ -+ -+public Method "":"()V" -+ stack 1 locals 1 -+{ -+ aload_0; -+ invokespecial Method java/lang/Object."":"()V"; -+ return; -+} -+ -+/* This method has an irreducible loop, with 2 entries, one is the exception handler -+ -+ static void test(boolean flag, int[] array, Exception exception) throws Exception { -+ int i = 0; -+ if (flag) { -+ try { -+ throw exception; -+ } catch(Exception e) { -+ array[i] = 0; -+ i++; -+ } -+ } -+ if (i < 10) { -+ throw exception; // caught by exception handler above as well -+ } -+ } -+*/ -+public static Method test:"(Z[ILjava/lang/Exception;)V" -+ throws java/lang/Exception -+ stack 3 locals 5 -+{ -+ iconst_0; -+ istore_3; -+ iload_0; -+ ifeq L17; -+ try t0; -+ aload_2; -+ athrow; -+ endtry t0; -+ catch t0 java/lang/Exception; -+ catch t1 java/lang/Exception; -+ stack_frame_type full; -+ locals_map int, class "[I", class java/lang/Exception, int; -+ stack_map class java/lang/Exception; -+ astore 4; -+ aload_1; -+ iload_3; -+ iconst_0; -+ iastore; -+ iinc 3, 1; -+ L17: stack_frame_type same; -+ iload_3; -+ bipush 10; -+ if_icmpge L25; -+ try t1; -+ aload_2; -+ athrow; -+ endtry t1; -+ L25: stack_frame_type same; -+ return; -+} -+} // end Class TestRangeCheckExceptionHandlerLoop -diff --git a/hotspot/test/compiler/rangechecks/TestRangeCheckExceptionHandlerLoopMain.java b/hotspot/test/compiler/rangechecks/TestRangeCheckExceptionHandlerLoopMain.java -new file mode 100644 -index 000000000..3eac32315 ---- /dev/null -+++ b/hotspot/test/compiler/rangechecks/TestRangeCheckExceptionHandlerLoopMain.java -@@ -0,0 +1,41 @@ -+/* -+ * Copyright (c) 2015, 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 -+ * 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 8134883 -+ * @summary C1's range check elimination breaks with a non-natural loop that an exception handler as one entry -+ * @compile TestRangeCheckExceptionHandlerLoop.jasm -+ * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement TestRangeCheckExceptionHandlerLoopMain -+ */ -+ -+public class TestRangeCheckExceptionHandlerLoopMain { -+ public static void main(String[] args) throws Exception { -+ Exception exception = new Exception(); -+ int[] array = new int[10]; -+ for (int i = 0; i < 20000; i++) { -+ TestRangeCheckExceptionHandlerLoop.test(false, array, exception); -+ } -+ } -+} --- -2.19.0 - diff --git a/818172_overflow_when_strength_reducing_interger_multiply.patch b/818172_overflow_when_strength_reducing_interger_multiply.patch deleted file mode 100644 index 3003af4e8e7c956078cc60c3ac2c63721357a823..0000000000000000000000000000000000000000 --- a/818172_overflow_when_strength_reducing_interger_multiply.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp -index 6d0b4acbd..ecd4bd4a6 100644 ---- a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp -+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp -@@ -607,12 +607,12 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) { - } else { - assert (x->op() == Bytecodes::_imul, "expect imul"); - if (right.is_constant()) { -- int c = right.get_jint_constant(); -- if (! is_power_of_2(c) && ! is_power_of_2(c + 1) && ! is_power_of_2(c - 1)) { -- // Cannot use constant op. -- right.load_item(); -+ jint c = right.get_jint_constant(); -+ if (c > 0 && c < max_jint && (is_power_of_2(c) || is_power_of_2(c - 1) || is_power_of_2(c + 1))) { -+ right_arg->dont_load_item(); - } else { -- right.dont_load_item(); -+ // Cannot use constant op. -+ right_arg->load_item(); - } - } else { - right.load_item(); diff --git a/8190332.patch b/8190332.patch deleted file mode 100644 index ac730bed11b26842e5c009938b49750004cc07ac..0000000000000000000000000000000000000000 --- a/8190332.patch +++ /dev/null @@ -1,162 +0,0 @@ -From 90676612ff2c10688f555604908267a4528f8c9f Mon Sep 17 00:00:00 2001 -Date: Fri, 22 Jan 2021 15:29:22 +0800 -Subject: 8190332: PngReader throws - NegativeArraySizeException/OOM error when IHDR width is very large - -Summary: : PngReader throws NegativeArraySizeException/OOM error when IHDR width is very large -LLT: -Bug url: https://bugs.openjdk.java.net/browse/JDK-8190332 ---- - .../imageio/plugins/png/PNGImageReader.java | 27 ++++-- - .../png/PngLargeIHDRDimensionTest.java | 86 +++++++++++++++++++ - 2 files changed, 106 insertions(+), 7 deletions(-) - create mode 100644 test/jdk/javax/imageio/plugins/png/PngLargeIHDRDimensionTest.java - -diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java -index 7da36e14b..02a11d45f 100644 ---- a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java -+++ b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGImageReader.java -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2000, 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 -@@ -1305,14 +1305,18 @@ public class PNGImageReader extends ImageReader { - this.pixelStream = new DataInputStream(is); - - /* -- * NB: the PNG spec declares that valid range for width -+ * PNG spec declares that valid range for width - * and height is [1, 2^31-1], so here we may fail to allocate - * a buffer for destination image due to memory limitation. - * -- * However, the recovery strategy for this case should be -- * defined on the level of application, so we will not -- * try to estimate the required amount of the memory and/or -- * handle OOM in any way. -+ * If the read operation triggers OutOfMemoryError, the same -+ * will be wrapped in an IIOException at PNGImageReader.read -+ * method. -+ * -+ * The recovery strategy for this case should be defined at -+ * the level of application, so we will not try to estimate -+ * the required amount of the memory and/or handle OOM in -+ * any way. - */ - theImage = getDestination(param, - getImageTypes(0), -@@ -1611,7 +1615,16 @@ public class PNGImageReader extends ImageReader { - throw new IndexOutOfBoundsException("imageIndex != 0!"); - } - -- readImage(param); -+ try { -+ readImage(param); -+ } catch (IOException | -+ IllegalStateException | -+ IllegalArgumentException e) -+ { -+ throw e; -+ } catch (Throwable e) { -+ throw new IIOException("Caught exception during read: ", e); -+ } - return theImage; - } - -diff --git a/test/jdk/javax/imageio/plugins/png/PngLargeIHDRDimensionTest.java b/test/jdk/javax/imageio/plugins/png/PngLargeIHDRDimensionTest.java -new file mode 100644 -index 000000000..118a41f04 ---- /dev/null -+++ b/test/jdk/javax/imageio/plugins/png/PngLargeIHDRDimensionTest.java -@@ -0,0 +1,86 @@ -+/* -+ * Copyright (c) 2017, 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 -+ * 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 8190332 -+ * @summary Test verifies whether PNGImageReader throws IIOException -+ * or not when IHDR width value is very high. -+ * @run main PngLargeIHDRDimensionTest -+ */ -+ -+import java.io.ByteArrayInputStream; -+import java.io.InputStream; -+import java.util.Base64; -+import javax.imageio.IIOException; -+import javax.imageio.ImageIO; -+ -+public class PngLargeIHDRDimensionTest { -+ -+ /* -+ * IHDR width is very large and when we try to create buffer to store -+ * image information of each row it overflows and we get -+ * NegativeArraySizeException without the fix for this bug. -+ */ -+ private static String negativeArraySizeExceptionInput = "iVBORw0KGgoAAAANS" -+ + "UhEUg////0AAAABEAIAAAA6fptVAAAACklEQVQYV2P4DwABAQEAWk1v8QAAAAB" -+ + "JRU5ErkJgggo="; -+ -+ /* -+ * IHDR width is ((2 to the power of 31) - 2), which is the maximum VM -+ * limit to create an array we get OutOfMemoryError without the fix -+ * for this bug. -+ */ -+ private static String outOfMemoryErrorInput = "iVBORw0KGgoAAAANSUhEUgAAAAF/" -+ + "///+CAAAAAA6fptVAAAACklEQVQYV2P4DwABAQEAWk1v8QAAAABJRU5" -+ + "ErkJgggo="; -+ -+ private static InputStream input; -+ private static Boolean firstTestFailed = true, secondTestFailed = true; -+ public static void main(String[] args) throws java.io.IOException { -+ byte[] inputBytes = Base64.getDecoder(). -+ decode(negativeArraySizeExceptionInput); -+ input = new ByteArrayInputStream(inputBytes); -+ -+ try { -+ ImageIO.read(input); -+ } catch (IIOException e) { -+ firstTestFailed = false; -+ } -+ -+ inputBytes = Base64.getDecoder().decode(outOfMemoryErrorInput); -+ input = new ByteArrayInputStream(inputBytes); -+ -+ try { -+ ImageIO.read(input); -+ } catch (IIOException e) { -+ secondTestFailed = false; -+ } -+ -+ if (firstTestFailed || secondTestFailed) { -+ throw new RuntimeException("Test doesn't throw required" -+ + " IIOException"); -+ } -+ } -+} -+ --- -2.19.0 - diff --git a/8191955.patch b/8191955.patch deleted file mode 100644 index 325cf6f5de063ec6235a6ed2189865f157d5527a..0000000000000000000000000000000000000000 --- a/8191955.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0457c6b44fd7856706acf57aea3de448e01040a5 Mon Sep 17 00:00:00 2001 -Date: Fri, 22 Jan 2021 11:35:45 +0800 -Subject: Backport of JDK-8191955 - -summary: incorrect prefetch distance causes an internal error -LLT: -Bug url: https://bugs.openjdk.java.net/browse/JDK-8191955 ---- - hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp -index 78e6f1144..211baa9dc 100644 ---- a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp -+++ b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp -@@ -138,6 +138,17 @@ void VM_Version::get_processor_features() { - if (PrefetchCopyIntervalInBytes >= 32768) - PrefetchCopyIntervalInBytes = 32760; - } -+ -+ if (AllocatePrefetchDistance !=-1 && (AllocatePrefetchDistance & 7)) { -+ warning("AllocatePrefetchDistance must be multiple of 8"); -+ AllocatePrefetchDistance &= ~7; -+ } -+ -+ if (AllocatePrefetchStepSize & 7) { -+ warning("AllocatePrefetchStepSize must be multiple of 8"); -+ AllocatePrefetchStepSize &= ~7; -+ } -+ - FLAG_SET_DEFAULT(UseSSE42Intrinsics, true); - - unsigned long auxv = getauxval(AT_HWCAP); --- -2.19.0 - diff --git a/8203196.patch b/8203196.patch deleted file mode 100644 index d60f68a4a77ca4afc538e506519217dc22c93727..0000000000000000000000000000000000000000 --- a/8203196.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 3607951c82cbfb387b071bdbbcf24e0a48344f36 Mon Sep 17 00:00:00 2001 -Date: Fri, 22 Jan 2021 15:28:34 +0800 -Subject: 8203196: C1 emits incorrect code due to integer - overflow in _tableswitch keys - -Summary: : C1 emits incorrect code due to integer overflow in _tableswitch keys -LLT: NA -Bug url: https://bugs.openjdk.java.net/browse/JDK-8203196 ---- - hotspot/src/share/vm/c1/c1_Instruction.hpp | 4 +- - hotspot/src/share/vm/c1/c1_LIRGenerator.cpp | 2 +- - hotspot/test/compiler/c1/SwitchTest.java | 46 +++++++++++++++++++++ - 3 files changed, 49 insertions(+), 3 deletions(-) - create mode 100644 hotspot/test/compiler/c1/SwitchTest.java - -diff --git a/hotspot/src/share/vm/c1/c1_Instruction.hpp b/hotspot/src/share/vm/c1/c1_Instruction.hpp -index 789dba62b..ee4adbc48 100644 ---- a/hotspot/src/share/vm/c1/c1_Instruction.hpp -+++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp -@@ -2124,11 +2124,11 @@ LEAF(TableSwitch, Switch) - // creation - TableSwitch(Value tag, BlockList* sux, int lo_key, ValueStack* state_before, bool is_safepoint) - : Switch(tag, sux, state_before, is_safepoint) -- , _lo_key(lo_key) {} -+ , _lo_key(lo_key) { assert(_lo_key <= hi_key(), "integer overflow"); } - - // accessors - int lo_key() const { return _lo_key; } -- int hi_key() const { return _lo_key + length() - 1; } -+ int hi_key() const { return _lo_key + (length() - 1); } - }; - - -diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp -index 8cfda1b3f..5d47231ca 100644 ---- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp -+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp -@@ -2574,8 +2574,8 @@ void LIRGenerator::do_TableSwitch(TableSwitch* x) { - move_to_phi(x->state()); - - int lo_key = x->lo_key(); -- int hi_key = x->hi_key(); - int len = x->length(); -+ assert(lo_key <= (lo_key + (len - 1)), "integer overflow"); - LIR_Opr value = tag.result(); - if (UseTableRanges) { - do_SwitchRanges(create_lookup_ranges(x), value, x->default_sux()); -diff --git a/hotspot/test/compiler/c1/SwitchTest.java b/hotspot/test/compiler/c1/SwitchTest.java -new file mode 100644 -index 000000000..d18eccc0f ---- /dev/null -+++ b/hotspot/test/compiler/c1/SwitchTest.java -@@ -0,0 +1,46 @@ -+/* -+ * @test -+ * @bug 8203196 -+ * @summary C1 emits incorrect code due to integer overflow in _tableswitch keys -+ * @run main/othervm -Xcomp SwitchTest -+ */ -+public class SwitchTest { -+ public static void main(String args[]) throws Exception { -+ int test2 = 2147483647; -+ int check2 = 0; -+ switch (test2) { -+ case 2147483640: -+ check2 = 2147483640; -+ break; -+ case 2147483641: -+ check2 = 2147483641; -+ break; -+ case 2147483642: -+ check2 = 2147483642; -+ break; -+ case 2147483643: -+ check2 = 2147483643; -+ break; -+ case 2147483644: -+ check2 = 2147483644; -+ break; -+ case 2147483645: -+ check2 = 2147483645; -+ break; -+ case 2147483646: -+ check2 = 2147483646; -+ break; -+ case 2147483647: -+ check2 = 2147483647; -+ break; -+ default: -+ check2 = 123456; -+ break; -+ } -+ if (check2 != test2) { -+ System.out.println("choose a wrong case"); -+ throw new Exception(); -+ } -+ -+ } -+} -\ No newline at end of file --- -2.19.0 - diff --git a/8204947.patch b/8204947.patch index f444efce8d8e959410a90e530a2fb277ec44da22..ebee61722021b3922ff72de8ee79306795d920d6 100644 --- a/8204947.patch +++ b/8204947.patch @@ -7,27 +7,27 @@ Summary: : Improve gc performance, port ShenandoahTaskTerminator to mainline LLT: jtreg Bug url: https://bugs.openjdk.java.net/browse/JDK-8204947 --- - .../concurrentMarkSweepGeneration.cpp | 72 +++++++- - .../gc_implementation/g1/concurrentMark.cpp | 4 +- - .../gc_implementation/g1/concurrentMark.hpp | 12 +- - .../gc_implementation/g1/g1CollectedHeap.cpp | 10 +- - .../parNew/parNewGeneration.cpp | 16 +- - .../parNew/parNewGeneration.hpp | 2 +- - .../parallelScavenge/pcTasks.cpp | 4 +- - .../parallelScavenge/psParallelCompact.cpp | 8 +- - .../parallelScavenge/psScavenge.cpp | 11 +- - .../shared/owstTaskTerminator.cpp | 173 ++++++++++++++++++ - .../shared/owstTaskTerminator.hpp | 80 ++++++++ - hotspot/src/share/vm/runtime/globals.hpp | 4 + - hotspot/src/share/vm/utilities/taskqueue.cpp | 23 +++ - hotspot/src/share/vm/utilities/taskqueue.hpp | 47 ++++- - hotspot/src/share/vm/utilities/workgroup.hpp | 4 +- - 15 files changed, 424 insertions(+), 46 deletions(-) + .../concurrentMarkSweepGeneration.cpp | 72 ++++++++- + .../vm/gc_implementation/g1/concurrentMark.cpp | 4 +- + .../vm/gc_implementation/g1/concurrentMark.hpp | 12 +- + .../vm/gc_implementation/g1/g1CollectedHeap.cpp | 10 +- + .../gc_implementation/parNew/parNewGeneration.cpp | 16 +- + .../gc_implementation/parNew/parNewGeneration.hpp | 2 +- + .../gc_implementation/parallelScavenge/pcTasks.cpp | 4 +- + .../parallelScavenge/psParallelCompact.cpp | 8 +- + .../parallelScavenge/psScavenge.cpp | 11 +- + .../shared/owstTaskTerminator.cpp | 173 +++++++++++++++++++++ + .../shared/owstTaskTerminator.hpp | 80 ++++++++++ + hotspot/src/share/vm/runtime/globals.hpp | 4 + + hotspot/src/share/vm/utilities/taskqueue.cpp | 23 +++ + hotspot/src/share/vm/utilities/taskqueue.hpp | 66 +++++++- + hotspot/src/share/vm/utilities/workgroup.hpp | 4 +- + 15 files changed, 440 insertions(+), 49 deletions(-) create mode 100644 hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp create mode 100644 hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.hpp diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp -index 56fb1c451..02a29c2b0 100644 +index 56fb1c4..02a29c2 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @@ -41,6 +41,7 @@ @@ -41,7 +41,7 @@ index 56fb1c451..02a29c2b0 100644 @@ -3884,7 +3885,7 @@ bool CMSCollector::markFromRootsWork(bool asynch) { // Forward decl class CMSConcMarkingTask; - + -class CMSConcMarkingTerminator: public ParallelTaskTerminator { +class CMSConcMarkingParallelTerminator: public ParallelTaskTerminator { CMSCollector* _collector; @@ -55,11 +55,11 @@ index 56fb1c451..02a29c2b0 100644 + CMSConcMarkingParallelTerminator(int n_threads, TaskQueueSetSuper* queue_set, CMSCollector* collector) : ParallelTaskTerminator(n_threads, queue_set), _collector(collector) { } - + @@ -3903,6 +3904,45 @@ class CMSConcMarkingTerminator: public ParallelTaskTerminator { } }; - + +class CMSConcMarkingOWSTTerminator: public OWSTTaskTerminator { + CMSCollector* _collector; + CMSConcMarkingTask* _task; @@ -104,20 +104,20 @@ index 56fb1c451..02a29c2b0 100644 public: @@ -3931,7 +3971,7 @@ class CMSConcMarkingTask: public YieldingFlexibleGangTask { OopTaskQueueSet* _task_queues; - + // Termination (and yielding) support - CMSConcMarkingTerminator _term; + CMSConcMarkingTaskTerminator _term; CMSConcMarkingTerminatorTerminator _term_term; - + public: @@ -3961,7 +4001,7 @@ class CMSConcMarkingTask: public YieldingFlexibleGangTask { - + HeapWord*volatile* global_finger_addr() { return &_global_finger; } - + - CMSConcMarkingTerminator* terminator() { return &_term; } + ParallelTaskTerminator* terminator() { return _term.terminator(); } - + virtual void set_for_termination(int active_workers) { terminator()->reset_for_reuse(active_workers); @@ -3980,7 +4020,7 @@ class CMSConcMarkingTask: public YieldingFlexibleGangTask { @@ -127,12 +127,12 @@ index 56fb1c451..02a29c2b0 100644 - _term.reset_for_reuse(); + _term.terminator()->reset_for_reuse(); } - + static bool get_work_from_overflow_stack(CMSMarkStack* ovflw_stk, @@ -4001,7 +4041,7 @@ bool CMSConcMarkingTerminatorTerminator::should_exit_termination() { // thread has yielded. } - + -void CMSConcMarkingTerminator::yield() { +void CMSConcMarkingParallelTerminator::yield() { if (_task->should_yield()) { @@ -141,7 +141,7 @@ index 56fb1c451..02a29c2b0 100644 @@ -4009,6 +4049,22 @@ void CMSConcMarkingTerminator::yield() { } } - + +void CMSConcMarkingOWSTTerminator::yield() { + if (_task->should_yield()) { + _task->yield(); @@ -162,25 +162,25 @@ index 56fb1c451..02a29c2b0 100644 // Concurrent Marking Algorithm Sketch //////////////////////////////////////////////////////////////// @@ -5287,7 +5343,7 @@ class CMSParRemarkTask: public CMSParMarkTask { - + // The per-thread work queues, available here for stealing. OopTaskQueueSet* _task_queues; - ParallelTaskTerminator _term; + TaskTerminator _term; - + public: // A value of 0 passed to n_workers will cause the number of @@ -5306,7 +5362,7 @@ class CMSParRemarkTask: public CMSParMarkTask { - + OopTaskQueue* work_queue(int i) { return task_queues()->queue(i); } - + - ParallelTaskTerminator* terminator() { return &_term; } + ParallelTaskTerminator* terminator() { return _term.terminator(); } int n_workers() { return _n_workers; } - + void work(uint worker_id); diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp -index 2f17dce61..f7b64a61b 100644 +index 2f17dce..f7b64a6 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -549,7 +549,7 @@ ConcurrentMark::ConcurrentMark(G1CollectedHeap* g1h, G1RegionToSpaceMapper* prev @@ -189,7 +189,7 @@ index 2f17dce61..f7b64a61b 100644 _task_queues(new CMTaskQueueSet((int) _max_worker_id)), - _terminator(ParallelTaskTerminator((int) _max_worker_id, _task_queues)), + _terminator((int) _max_worker_id, _task_queues), - + _has_overflown(false), _concurrent(false), @@ -816,7 +816,7 @@ void ConcurrentMark::set_concurrency(uint active_tasks) { @@ -202,7 +202,7 @@ index 2f17dce61..f7b64a61b 100644 _second_overflow_barrier_sync.set_n_workers((int) active_tasks); } diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp -index 3d01f1cee..c22c9b601 100644 +index 3d01f1c..c22c9b6 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp @@ -428,8 +428,8 @@ protected: @@ -213,13 +213,13 @@ index 3d01f1cee..c22c9b601 100644 - ParallelTaskTerminator _terminator; // for termination + CMTaskQueueSet* _task_queues; // Task queue set + TaskTerminator _terminator; // For termination - + // Two sync barriers that are used to synchronise tasks when an // overflow occurs. The algorithm is the following. All tasks enter @@ -529,10 +529,10 @@ protected: return _parallel_workers != NULL; } - + - HeapWord* finger() { return _finger; } - bool concurrent() { return _concurrent; } - uint active_tasks() { return _active_tasks; } @@ -228,33 +228,33 @@ index 3d01f1cee..c22c9b601 100644 + bool concurrent() { return _concurrent; } + uint active_tasks() { return _active_tasks; } + ParallelTaskTerminator* terminator() const { return _terminator.terminator(); } - + // It claims the next available region to be scanned by a marking // task/thread. It might return NULL if the next region is empty or diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp -index 97643e792..91ad2e98e 100644 +index 889074d..b3fba0a 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp -@@ -4672,7 +4672,7 @@ protected: +@@ -4668,7 +4668,7 @@ protected: G1CollectedHeap* _g1h; RefToScanQueueSet *_queues; G1RootProcessor* _root_processor; - ParallelTaskTerminator _terminator; + TaskTerminator _terminator; uint _n_workers; - + Mutex _stats_lock; -@@ -4694,7 +4694,7 @@ public: +@@ -4690,7 +4690,7 @@ public: return queues()->queue(i); } - + - ParallelTaskTerminator* terminator() { return &_terminator; } + ParallelTaskTerminator* terminator() { return _terminator.terminator(); } - + virtual void set_for_termination(int active_workers) { _root_processor->set_num_workers(active_workers); -@@ -4809,7 +4809,7 @@ public: - +@@ -4805,7 +4805,7 @@ public: + { double start = os::elapsedTime(); - G1ParEvacuateFollowersClosure evac(_g1h, &pss, _queues, &_terminator); @@ -262,19 +262,19 @@ index 97643e792..91ad2e98e 100644 evac.do_void(); double elapsed_sec = os::elapsedTime() - start; double term_sec = pss.term_time(); -@@ -5506,8 +5506,8 @@ public: +@@ -5501,8 +5501,8 @@ public: void G1STWRefProcTaskExecutor::execute(ProcessTask& proc_task) { assert(_workers != NULL, "Need parallel worker threads."); - + - ParallelTaskTerminator terminator(_active_workers, _queues); - G1STWRefProcTaskProxy proc_task_proxy(proc_task, _g1h, _queues, &terminator); + TaskTerminator terminator(_active_workers, _queues); + G1STWRefProcTaskProxy proc_task_proxy(proc_task, _g1h, _queues, terminator.terminator()); - + _g1h->set_par_threads(_active_workers); _workers->run_task(&proc_task_proxy); diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp -index 9481dba10..84cd4ed73 100644 +index 9481dba..84cd4ed 100644 --- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp @@ -68,7 +68,7 @@ ParScanThreadState::ParScanThreadState(Space* to_space_, @@ -301,12 +301,12 @@ index 9481dba10..84cd4ed73 100644 size_t desired_plab_sz, - ParallelTaskTerminator& term); + TaskTerminator& term); - + ~ParScanThreadStateSet() { TASKQUEUE_STATS_ONLY(reset_stats()); } - + @@ -330,12 +330,12 @@ public: #endif // TASKQUEUE_STATS - + private: - ParallelTaskTerminator& _term; + TaskTerminator& _term; @@ -317,8 +317,8 @@ index 9481dba10..84cd4ed73 100644 - ParallelTaskTerminator* terminator() { return &_term; } + ParallelTaskTerminator* terminator() { return _term.terminator(); } }; - - + + @@ -343,7 +343,7 @@ ParScanThreadStateSet::ParScanThreadStateSet( int num_threads, Space& to_space, ParNewGeneration& gen, Generation& old_gen, ObjToScanQueueSet& queue_set, @@ -329,7 +329,7 @@ index 9481dba10..84cd4ed73 100644 _gen(gen), _next_gen(old_gen), _term(term) { @@ -375,7 +375,7 @@ void ParScanThreadStateSet::trace_promotion_failed(YoungGCTracer& gc_tracer) { - + void ParScanThreadStateSet::reset(int active_threads, bool promotion_failed) { - _term.reset_for_reuse(active_threads); @@ -338,7 +338,7 @@ index 9481dba10..84cd4ed73 100644 for (int i = 0; i < length(); ++i) { thread_state(i).print_promotion_failure_size(); @@ -983,7 +983,7 @@ void ParNewGeneration::collect(bool full, - + // Always set the terminator for the active number of workers // because only those workers go through the termination protocol. - ParallelTaskTerminator _term(n_workers, task_queues()); @@ -347,7 +347,7 @@ index 9481dba10..84cd4ed73 100644 *to(), *this, *_next_gen, *task_queues(), _overflow_stacks, desired_plab_sz(), _term); diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp -index 5c6b6181f..fa4265a2d 100644 +index 5c6b618..fa4265a 100644 --- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp +++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp @@ -132,7 +132,7 @@ class ParScanThreadState { @@ -356,11 +356,11 @@ index 5c6b6181f..fa4265a2d 100644 size_t desired_plab_sz_, - ParallelTaskTerminator& term_); + TaskTerminator& term_); - + public: ageTable* age_table() {return &_ageTable;} diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp -index 7d85c3494..35ea2992b 100644 +index 7d85c34..35ea299 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp @@ -172,7 +172,7 @@ void RefProcTaskExecutor::execute(ProcessTask& task) @@ -382,7 +382,7 @@ index 7d85c3494..35ea2992b 100644 } } diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp -index 0fa980ef8..3f103ee00 100644 +index 0fa980e..3f103ee 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp @@ -2359,7 +2359,7 @@ void PSParallelCompact::marking_phase(ParCompactionManager* cm, @@ -391,35 +391,35 @@ index 0fa980ef8..3f103ee00 100644 TaskQueueSetSuper* qset = ParCompactionManager::stack_array(); - ParallelTaskTerminator terminator(active_gc_threads, qset); + TaskTerminator terminator(active_gc_threads, qset); - + PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm); PSParallelCompact::FollowStackClosure follow_stack_closure(cm); @@ -2388,7 +2388,7 @@ void PSParallelCompact::marking_phase(ParCompactionManager* cm, - + if (active_gc_threads > 1) { for (uint j = 0; j < active_gc_threads; j++) { - q->enqueue(new StealMarkingTask(&terminator)); + q->enqueue(new StealMarkingTask(terminator.terminator())); } } - + @@ -2696,12 +2696,12 @@ void PSParallelCompact::compact() { uint parallel_gc_threads = heap->gc_task_manager()->workers(); uint active_gc_threads = heap->gc_task_manager()->active_workers(); TaskQueueSetSuper* qset = ParCompactionManager::region_array(); - ParallelTaskTerminator terminator(active_gc_threads, qset); + TaskTerminator terminator(active_gc_threads, qset); - + GCTaskQueue* q = GCTaskQueue::create(); enqueue_region_draining_tasks(q, active_gc_threads); enqueue_dense_prefix_tasks(q, active_gc_threads); - enqueue_region_stealing_tasks(q, &terminator, active_gc_threads); + enqueue_region_stealing_tasks(q, terminator.terminator(), active_gc_threads); - + { GCTraceTime tm_pc("par compact", print_phases(), true, &_gc_timer, _gc_tracer.gc_id()); diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp -index 5d7e99bd2..12e282eeb 100644 +index 5d7e99b..12e282e 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp @@ -189,11 +189,11 @@ void PSRefProcTaskExecutor::execute(ProcessTask& task) @@ -439,7 +439,7 @@ index 5d7e99bd2..12e282eeb 100644 @@ -422,12 +422,11 @@ bool PSScavenge::invoke_no_policy() { q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::jvmti)); q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::code_cache)); - + - ParallelTaskTerminator terminator( - active_workers, - (TaskQueueSetSuper*) promotion_manager->stack_array_depth()); @@ -451,10 +451,10 @@ index 5d7e99bd2..12e282eeb 100644 + q->enqueue(new StealTask(terminator.terminator())); } } - + diff --git a/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp b/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp new file mode 100644 -index 000000000..9438f6a9e +index 0000000..9438f6a --- /dev/null +++ b/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp @@ -0,0 +1,173 @@ @@ -480,7 +480,7 @@ index 000000000..9438f6a9e + * questions. + * + */ -+ ++ +#include "owstTaskTerminator.hpp" + +#include "precompiled/precompiled.hpp" @@ -488,18 +488,18 @@ index 000000000..9438f6a9e +bool OWSTTaskTerminator::exit_termination(size_t tasks, TerminatorTerminator* terminator) { + return tasks > 0 || (terminator != NULL && terminator->should_exit_termination()); +} -+ ++ +bool OWSTTaskTerminator::offer_termination(TerminatorTerminator* terminator) { + assert(_n_threads > 0, "Initialization is incorrect"); + assert(_offered_termination < _n_threads, "Invariant"); + assert(_blocker != NULL, "Invariant"); -+ ++ + // Single worker, done + if (_n_threads == 1) { + _offered_termination = 1; + return true; + } -+ ++ + _blocker->lock_without_safepoint_check(); + // All arrived, done + _offered_termination++; @@ -508,14 +508,14 @@ index 000000000..9438f6a9e + _blocker->unlock(); + return true; + } -+ ++ + Thread* the_thread = Thread::current(); + while (true) { + if (_spin_master == NULL) { + _spin_master = the_thread; -+ ++ + _blocker->unlock(); -+ ++ + if (do_spin_master_work(terminator)) { + assert(_offered_termination == _n_threads, "termination condition"); + return true; @@ -524,13 +524,13 @@ index 000000000..9438f6a9e + } + } else { + _blocker->wait(true, WorkStealingSleepMillis); -+ ++ + if (_offered_termination == _n_threads) { + _blocker->unlock(); + return true; + } + } -+ ++ + size_t tasks = tasks_in_queue_set(); + if (exit_termination(tasks, terminator)) { + _offered_termination--; @@ -539,14 +539,14 @@ index 000000000..9438f6a9e + } + } +} -+ ++ +bool OWSTTaskTerminator::do_spin_master_work(TerminatorTerminator* terminator) { + uint yield_count = 0; + // Number of hard spin loops done since last yield + uint hard_spin_count = 0; + // Number of iterations in the hard spin loop. + uint hard_spin_limit = WorkStealingHardSpins; -+ ++ + // If WorkStealingSpinToYieldRatio is 0, no hard spinning is done. + // If it is greater than 0, then start with a small number + // of spins and increase number with each turn at spinning until @@ -558,7 +558,7 @@ index 000000000..9438f6a9e + } + // Remember the initial spin limit. + uint hard_spin_start = hard_spin_limit; -+ ++ + // Loop waiting for all threads to offer termination or + // more work. + while (true) { @@ -569,7 +569,7 @@ index 000000000..9438f6a9e + // Do a yield or hardspin. For purposes of deciding whether + // to sleep, count this as a yield. + yield_count++; -+ ++ + // Periodically call yield() instead spinning + // After WorkStealingSpinToYieldRatio spins, do a yield() call + // and reset the counts and starting limit. @@ -599,7 +599,7 @@ index 000000000..9438f6a9e + p2i(Thread::current()), yield_count); + } + yield_count = 0; -+ ++ + MonitorLockerEx locker(_blocker, Mutex::_no_safepoint_check_flag); + _spin_master = NULL; + locker.wait(Mutex::_no_safepoint_check_flag, WorkStealingSleepMillis); @@ -609,7 +609,7 @@ index 000000000..9438f6a9e + return false; + } + } -+ ++ +#ifdef TRACESPINNING + _total_peeks++; +#endif @@ -633,7 +633,7 @@ index 000000000..9438f6a9e + diff --git a/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.hpp b/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.hpp new file mode 100644 -index 000000000..ad50889d4 +index 0000000..ad50889 --- /dev/null +++ b/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.hpp @@ -0,0 +1,80 @@ @@ -661,11 +661,11 @@ index 000000000..ad50889d4 + */ +#ifndef SHARE_VM_GC_SHARED_OWSTTASKTERMINATOR_HPP +#define SHARE_VM_GC_SHARED_OWSTTASKTERMINATOR_HPP -+ ++ +#include "runtime/mutex.hpp" +#include "runtime/thread.hpp" +#include "utilities/taskqueue.hpp" -+ ++ +/* + * OWST stands for Optimized Work Stealing Threads + * @@ -681,47 +681,47 @@ index 000000000..ad50889d4 + * The intention of above enhancement is to reduce spin-master's latency on detecting new tasks + * for stealing and termination condition. + */ -+ ++ +class OWSTTaskTerminator: public ParallelTaskTerminator { +private: + Monitor* _blocker; + Thread* _spin_master; -+ ++ +public: + OWSTTaskTerminator(uint n_threads, TaskQueueSetSuper* queue_set) : + ParallelTaskTerminator(n_threads, queue_set), _spin_master(NULL) { + _blocker = new Monitor(Mutex::leaf, "OWSTTaskTerminator", false); + } -+ ++ + virtual ~OWSTTaskTerminator() { + assert(_blocker != NULL, "Can not be NULL"); + delete _blocker; + } -+ ++ + bool offer_termination(TerminatorTerminator* terminator); -+ ++ +protected: + // If should exit current termination protocol + virtual bool exit_termination(size_t tasks, TerminatorTerminator* terminator); -+ ++ +private: + size_t tasks_in_queue_set() { return _queue_set->tasks(); } -+ ++ + /* + * Perform spin-master task. + * Return true if termination condition is detected, otherwise return false + */ + bool do_spin_master_work(TerminatorTerminator* terminator); +}; -+ -+ ++ ++ +#endif // SHARE_VM_GC_SHARED_OWSTTASKTERMINATOR_HPP + diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp -index 254f57651..e25a72cad 100644 +index 6e564a5..9251aee 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp -@@ -2024,6 +2024,10 @@ class CommandLineFlags { +@@ -2021,6 +2021,10 @@ class CommandLineFlags { develop(uintx, PromotionFailureALotInterval, 5, \ "Total collections between promotion failures alot") \ \ @@ -733,7 +733,7 @@ index 254f57651..e25a72cad 100644 "Sleep time when sleep is used for yields") \ \ diff --git a/hotspot/src/share/vm/utilities/taskqueue.cpp b/hotspot/src/share/vm/utilities/taskqueue.cpp -index da2e928b8..0f4dcc90b 100644 +index da2e928..0f4dcc9 100644 --- a/hotspot/src/share/vm/utilities/taskqueue.cpp +++ b/hotspot/src/share/vm/utilities/taskqueue.cpp @@ -29,6 +29,7 @@ @@ -741,9 +741,9 @@ index da2e928b8..0f4dcc90b 100644 #include "utilities/stack.inline.hpp" #include "utilities/taskqueue.hpp" +#include "gc_implementation/shared/owstTaskTerminator.hpp" - + PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC - + @@ -268,3 +269,25 @@ void ParallelTaskTerminator::reset_for_reuse(int n_threads) { reset_for_reuse(); _n_threads = n_threads; @@ -771,30 +771,43 @@ index da2e928b8..0f4dcc90b 100644 +} + diff --git a/hotspot/src/share/vm/utilities/taskqueue.hpp b/hotspot/src/share/vm/utilities/taskqueue.hpp -index c8223b2eb..0f1376b49 100644 +index bc06cac..67ef963 100644 --- a/hotspot/src/share/vm/utilities/taskqueue.hpp +++ b/hotspot/src/share/vm/utilities/taskqueue.hpp -@@ -503,6 +503,8 @@ protected: +@@ -501,6 +501,9 @@ protected: public: // Returns "true" if some TaskQueue in the set contains a task. virtual bool peek() = 0; + // Tasks in queue + virtual uint tasks() const = 0; - virtual size_t tasks() = 0; ++ virtual size_t tasks() = 0; }; - -@@ -540,6 +542,7 @@ public: + + template class TaskQueueSetSuperImpl: public CHeapObj, public TaskQueueSetSuper { +@@ -537,6 +540,10 @@ public: bool steal(uint queue_num, int* seed, E& t); - + bool peek(); + uint tasks() const; - size_t tasks(); - - uint size() const { return _n; } -@@ -609,6 +612,15 @@ size_t GenericTaskQueueSet::tasks() { - return n; ++ size_t tasks(); ++ ++ uint size() const { return _n; } + }; + + template void +@@ -594,6 +601,24 @@ bool GenericTaskQueueSet::peek() { + return false; } - + ++template ++size_t GenericTaskQueueSet::tasks() { ++ size_t n = 0; ++ for (uint j = 0; j < _n; j++) { ++ n += _queues[j]->size(); ++ } ++ return n; ++} ++ +template +uint GenericTaskQueueSet::tasks() const { + uint n = 0; @@ -807,28 +820,38 @@ index c8223b2eb..0f1376b49 100644 // When to terminate from the termination protocol. class TerminatorTerminator: public CHeapObj { public: -@@ -620,7 +632,7 @@ public: - +@@ -605,8 +630,8 @@ public: + #undef TRACESPINNING - + -class ParallelTaskTerminator: public StackObj { +-private: +class ParallelTaskTerminator: public CHeapObj { - protected: ++protected: int _n_threads; TaskQueueSetSuper* _queue_set; -@@ -656,7 +668,7 @@ public: + char _pad_before[DEFAULT_CACHE_LINE_SIZE]; +@@ -634,14 +659,14 @@ public: + // else is. If returns "true", all threads are terminated. If returns + // "false", available work has been observed in one of the task queues, + // so the global task is not complete. +- bool offer_termination() { ++ virtual bool offer_termination() { + return offer_termination(NULL); + } + // As above, but it also terminates if the should_exit_termination() // method of the terminator parameter returns true. If terminator is // NULL, then it is ignored. - bool offer_termination(TerminatorTerminator* terminator); + virtual bool offer_termination(TerminatorTerminator* terminator); - + // Reset the terminator, so that it may be reused again. // The caller is responsible for ensuring that this is done -@@ -675,6 +687,37 @@ public: +@@ -660,6 +685,37 @@ public: #endif }; - + +#ifdef _MSC_VER +#pragma warning(push) +// warning C4521: multiple copy constructors specified @@ -863,12 +886,19 @@ index c8223b2eb..0f1376b49 100644 template inline bool GenericTaskQueue::push(E t) { uint localBot = _bottom; +@@ -812,4 +868,4 @@ typedef OverflowTaskQueue RegionTaskQueue; + typedef GenericTaskQueueSet RegionTaskQueueSet; + + +-#endif // SHARE_VM_UTILITIES_TASKQUEUE_HPP ++#endif // SHARE_VM_UTILITIES_TASKQUEUE_HPP +\ No newline at end of file diff --git a/hotspot/src/share/vm/utilities/workgroup.hpp b/hotspot/src/share/vm/utilities/workgroup.hpp -index ef2dff493..dd9565157 100644 +index ef2dff4..dd95651 100644 --- a/hotspot/src/share/vm/utilities/workgroup.hpp +++ b/hotspot/src/share/vm/utilities/workgroup.hpp @@ -97,11 +97,11 @@ public: - + class AbstractGangTaskWOopQueues : public AbstractGangTask { OopTaskQueueSet* _queues; - ParallelTaskTerminator _terminator; @@ -881,6 +911,5 @@ index ef2dff493..dd9565157 100644 virtual void set_for_termination(int active_workers) { terminator()->reset_for_reuse(active_workers); } --- -2.19.0 - +-- +1.8.3.1 diff --git a/8205921.patch b/8205921.patch index 747077e785000e47d8dc55417cc371ec5229df53..15fc0e4b6e10b5ed9f27a892707de0dcfd7639a0 100644 --- a/8205921.patch +++ b/8205921.patch @@ -20,10 +20,9 @@ Bug url: https://bugs.openjdk.java.net/browse/JDK-8205921 .../parallelScavenge/psCompactionManager.hpp | 12 +- .../parallelScavenge/psPromotionManager.hpp | 4 +- .../parallelScavenge/psTasks.cpp | 3 +- - .../shenandoah/shenandoahConcurrentMark.cpp | 3 +- hotspot/src/share/vm/utilities/taskqueue.cpp | 18 --- hotspot/src/share/vm/utilities/taskqueue.hpp | 105 ++++++++++++++---- - 16 files changed, 113 insertions(+), 92 deletions(-) + 16 files changed, 112 insertions(+), 90 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp index 02a29c2b0..53b75a4ca 100644 @@ -389,27 +388,6 @@ index f829e9344..4fe869fd6 100644 TASKQUEUE_STATS_ONLY(pm->record_steal(p)); pm->process_popped_location_depth(p); pm->drain_stacks_depth(true); -diff --git a/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.cpp -index 85bbea6cd..afcb0dd4a 100644 ---- a/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.cpp -+++ b/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.cpp -@@ -939,7 +939,6 @@ void ShenandoahConcurrentMark::mark_loop_prework(uint w, ShenandoahTaskTerminato - - template - void ShenandoahConcurrentMark::mark_loop_work(T* cl, ShenandoahLiveData* live_data, uint worker_id, ShenandoahTaskTerminator *terminator) { -- int seed = 17; - uintx stride = ShenandoahMarkLoopStride; - - ShenandoahHeap* heap = ShenandoahHeap::heap(); -@@ -999,7 +998,7 @@ void ShenandoahConcurrentMark::mark_loop_work(T* cl, ShenandoahLiveData* live_da - uint work = 0; - for (uint i = 0; i < stride; i++) { - if (q->pop(t) || -- queues->steal(worker_id, &seed, t)) { -+ queues->steal(worker_id, t)) { - do_task(q, cl, live_data, &t); - work++; - } else { diff --git a/hotspot/src/share/vm/utilities/taskqueue.cpp b/hotspot/src/share/vm/utilities/taskqueue.cpp index 0f4dcc90b..37f4066ab 100644 --- a/hotspot/src/share/vm/utilities/taskqueue.cpp @@ -504,8 +482,8 @@ index 0f1376b49..77556a7d4 100644 +} + template - GenericTaskQueue::~GenericTaskQueue() { - FREE_C_HEAP_ARRAY(E, _elems, F); + GenericTaskQueue::~GenericTaskQueue() {} + @@ -498,8 +540,6 @@ bool OverflowTaskQueue::try_push_to_taskqueue(E t) { return taskqueue_t::push(t); } diff --git a/8214345.patch b/8214345.patch deleted file mode 100644 index 869efe3ca3ba43fd3e5d4e6a1f2f499b1a860fa7..0000000000000000000000000000000000000000 --- a/8214345.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 3083c0197855a49e3a59ac3e677e69db0e5db4bc Mon Sep 17 00:00:00 2001 -Date: Fri, 22 Jan 2021 11:33:03 +0800 -Subject: Backpot of JDK-8214345 - -Summary: infinite recursion while checking super class -LLT: langtools/test/tools/javac/generics/ClassBoundCheckingOverflow.java -Bug url: https://bugs.openjdk.java.net/browse/JDK-8214345 ---- - .../classes/com/sun/tools/javac/comp/Check.java | 7 +++++++ - .../javac/generics/ClassBoundCheckingOverflow.java | 12 ++++++++++++ - .../javac/generics/ClassBoundCheckingOverflow.out | 3 +++ - 3 files changed, 22 insertions(+) - create mode 100644 langtools/test/tools/javac/generics/ClassBoundCheckingOverflow.java - create mode 100644 langtools/test/tools/javac/generics/ClassBoundCheckingOverflow.out - -diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java -index d5e9c47a4..68af43821 100644 ---- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java -+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java -@@ -2617,6 +2617,10 @@ public class Check { - if (type.isErroneous()) return; - for (List l = types.interfaces(type); l.nonEmpty(); l = l.tail) { - Type it = l.head; -+ if (type.hasTag(CLASS) && !it.hasTag(CLASS)) { -+ continue; -+ } // JLS 8.1.5 -+ - Type oldit = seensofar.put(it.tsym, it); - if (oldit != null) { - List oldparams = oldit.allparams(); -@@ -2629,6 +2633,9 @@ public class Check { - checkClassBounds(pos, seensofar, it); - } - Type st = types.supertype(type); -+ if (type.hasTag(CLASS) && !st.hasTag(CLASS)) { -+ return; -+ } // JLS 8.1.4 - if (st != Type.noType) checkClassBounds(pos, seensofar, st); - } - -diff --git a/langtools/test/tools/javac/generics/ClassBoundCheckingOverflow.java b/langtools/test/tools/javac/generics/ClassBoundCheckingOverflow.java -new file mode 100644 -index 000000000..1aeb7d71a ---- /dev/null -+++ b/langtools/test/tools/javac/generics/ClassBoundCheckingOverflow.java -@@ -0,0 +1,12 @@ -+/* -+ * @test /nodynamiccopyright/ -+ * @bug 8214345 -+ * @summary infinite recursion while checking super class -+ * -+ * @compile/fail/ref=ClassBoundCheckingOverflow.out -XDrawDiagnostics ClassBoundCheckingOverflow.java -+ */ -+ -+public class ClassBoundCheckingOverflow { -+ abstract class InfiniteLoop1> extends E {} -+ abstract class InfiniteLoop2> implements E {} -+} -diff --git a/langtools/test/tools/javac/generics/ClassBoundCheckingOverflow.out b/langtools/test/tools/javac/generics/ClassBoundCheckingOverflow.out -new file mode 100644 -index 000000000..bed6acfd7 ---- /dev/null -+++ b/langtools/test/tools/javac/generics/ClassBoundCheckingOverflow.out -@@ -0,0 +1,3 @@ -+ClassBoundCheckingOverflow.java:10:70: compiler.err.type.found.req: (compiler.misc.type.parameter: E), (compiler.misc.type.req.class) -+ClassBoundCheckingOverflow.java:11:73: compiler.err.type.found.req: (compiler.misc.type.parameter: E), (compiler.misc.type.req.class) -+2 errors --- -2.19.0 - diff --git a/8214535-support-Jmap-parallel.patch b/8214535-support-Jmap-parallel.patch index 04e0516d0119ea4d450b6f0b43ab118ad6b7d320..de25e800255c387316722af2e1ece8b023fee44a 100644 --- a/8214535-support-Jmap-parallel.patch +++ b/8214535-support-Jmap-parallel.patch @@ -12,8 +12,6 @@ Subject: [PATCH 2/3] backport JDK-8214535 to support Jmap parallel .../parallelScavenge/psOldGen.hpp | 11 ++ .../shared/vmGCOperations.cpp | 2 +- .../shared/vmGCOperations.hpp | 4 +- - .../shenandoah/shenandoahHeap.cpp | 3 + - .../shenandoah/shenandoahHeap.hpp | 2 + .../share/vm/gc_interface/collectedHeap.hpp | 19 +++- .../src/share/vm/memory/genCollectedHeap.cpp | 4 + .../src/share/vm/memory/genCollectedHeap.hpp | 3 +- @@ -385,33 +383,6 @@ index cb070bd7..10d37522 100644 _csv_format = false; _print_help = false; _print_class_stats = false; -diff --git a/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeap.cpp b/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeap.cpp -index eaf13322..2b45229c 100644 ---- a/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeap.cpp -+++ b/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeap.cpp -@@ -1112,6 +1112,9 @@ void ShenandoahHeap::gc_threads_do(ThreadClosure* tcl) const { - ShenandoahStringDedup::threads_do(tcl); - } - } -+void ShenandoahHeap::run_task(AbstractGangTask* task) { -+ workers()->run_task(task); -+} - - void ShenandoahHeap::print_tracing_info() const { - if (PrintGC || TraceGen0Time || TraceGen1Time) { -diff --git a/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeap.hpp b/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeap.hpp -index 8e3b9ee1..3cb92ed4 100644 ---- a/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeap.hpp -+++ b/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahHeap.hpp -@@ -192,6 +192,8 @@ public: - - void gc_threads_do(ThreadClosure* tcl) const; - -+ virtual void run_task(AbstractGangTask* task); -+ - // ---------- Heap regions handling machinery - // - private: diff --git a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp index 88632ddc..7af75fd6 100644 --- a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp diff --git a/8215047.patch b/8215047.patch index 388f63b0193749f22e2360090547e8053b2b4d39..02c45f0919a05a95932abe9a578acf7f0bc345b4 100644 --- a/8215047.patch +++ b/8215047.patch @@ -202,7 +202,7 @@ index 821cf4198..181628567 100644 + assert(!peek_in_queue_set(), "Precondition"); return true; } - + _blocker->lock_without_safepoint_check(); - // All arrived, done _offered_termination++; @@ -213,9 +213,9 @@ index 821cf4198..181628567 100644 + assert(!peek_in_queue_set(), "Precondition"); return true; } - + @@ -57,21 +59,31 @@ bool OWSTTaskTerminator::offer_termination(TerminatorTerminator* terminator) { - + if (do_spin_master_work(terminator)) { assert(_offered_termination == _n_threads, "termination condition"); + assert(!peek_in_queue_set(), "Precondition"); @@ -232,14 +232,14 @@ index 821cf4198..181628567 100644 } } else { _blocker->wait(true, WorkStealingSleepMillis); - + if (_offered_termination == _n_threads) { _blocker->unlock(); + assert(!peek_in_queue_set(), "Precondition"); return true; } } - + size_t tasks = tasks_in_queue_set(); if (exit_termination(tasks, terminator)) { + assert_lock_strong(_blocker); @@ -287,7 +287,7 @@ index ad50889d4..0297b9cd6 100644 +++ b/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.hpp @@ -55,6 +55,7 @@ public: } - + virtual ~OWSTTaskTerminator() { + assert(_spin_master == NULL, "Should have been reset"); assert(_blocker != NULL, "Can not be NULL"); diff --git a/8231631.patch b/8231631.patch deleted file mode 100644 index b9274e3a79a8bc9b9601f8ed17ff6f4d607f2afb..0000000000000000000000000000000000000000 --- a/8231631.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 3c82728571afa83fefd594343170dc31c275a8b6 Mon Sep 17 00:00:00 2001 -Date: Fri, 22 Jan 2021 16:28:31 +0800 -Subject: 8231631: sun/net/ftp/FtpURLConnectionLeak.java fails - intermittently with NPE - -Summary: : sun/net/www/ftptest/FtpCommandHandler.java is modified to handle EOF properly -LLT: jdk8u/jdk/test/sun/net/ftp/FtpURLConnectionLeak.java -Bug url: https://bugs.openjdk.java.net/browse/JDK-8231631 #2468 ---- - jdk/test/sun/net/www/ftptest/FtpCommandHandler.java | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/jdk/test/sun/net/www/ftptest/FtpCommandHandler.java b/jdk/test/sun/net/www/ftptest/FtpCommandHandler.java -index 151b3df8e..f6c87d5a4 100644 ---- a/jdk/test/sun/net/www/ftptest/FtpCommandHandler.java -+++ b/jdk/test/sun/net/www/ftptest/FtpCommandHandler.java -@@ -458,6 +458,10 @@ public class FtpCommandHandler extends Thread { - try { - str = in.readLine(); - System.out.println("line: " + str); -+ if (str == null) { -+ System.out.println("EOF read from input"); -+ break; -+ } - buf = new StringBuffer(str); - res = parseCmd(buf); - switch (res) { --- -2.19.0 - diff --git a/8231841-debug.cpp-help-is-missing-an-AArch64-line-fo.patch b/8231841-debug.cpp-help-is-missing-an-AArch64-line-fo.patch deleted file mode 100644 index ef8baafe79e213388c063e7c8bc171404f79a0b2..0000000000000000000000000000000000000000 --- a/8231841-debug.cpp-help-is-missing-an-AArch64-line-fo.patch +++ /dev/null @@ -1,28 +0,0 @@ -From b271a27e0a3742705b1515976ad63ffa791a6a79 Mon Sep 17 00:00:00 2001 -Date: Fri, 18 Dec 2020 11:18:19 +0800 -Subject: 8231841: debug.cpp help() is missing an AArch64 line - for pns - -Summary: < hotspot> : debug.cpp help() is missing an AArch64 line for pns -LLT: NA -Patch Type: backport -Bug url: https://bugs.openjdk.java.net/browse/JDK-8231841 ---- - hotspot/src/share/vm/utilities/debug.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/hotspot/src/share/vm/utilities/debug.cpp b/hotspot/src/share/vm/utilities/debug.cpp -index 4f7cbddcd..7ba3a4c83 100644 ---- a/hotspot/src/share/vm/utilities/debug.cpp -+++ b/hotspot/src/share/vm/utilities/debug.cpp -@@ -687,6 +687,7 @@ void help() { - tty->print_cr(" pns(void* sp, void* fp, void* pc) - print native (i.e. mixed) stack trace. E.g."); - tty->print_cr(" pns($sp, $rbp, $pc) on Linux/amd64 and Solaris/amd64 or"); - tty->print_cr(" pns($sp, $ebp, $pc) on Linux/x86 or"); -+ tty->print_cr(" pns($sp, $fp, $pc) on Linux/AArch64 or"); - tty->print_cr(" pns($sp, 0, $pc) on Linux/ppc64 or"); - tty->print_cr(" pns($sp + 0x7ff, 0, $pc) on Solaris/SPARC"); - tty->print_cr(" - in gdb do 'set overload-resolution off' before calling pns()"); --- -2.19.0 - diff --git a/8259886-Improve-SSL-session-cache-performance-and-sc.patch b/8259886-Improve-SSL-session-cache-performance-and-sc.patch deleted file mode 100644 index 63c18ae8fa1acad18024c04e84436544930e5bd8..0000000000000000000000000000000000000000 --- a/8259886-Improve-SSL-session-cache-performance-and-sc.patch +++ /dev/null @@ -1,94 +0,0 @@ -From c30e6789e2406ef5085978458c1342505f0eeb0b Mon Sep 17 00:00:00 2001 -Date: Thu, 11 Mar 2021 14:34:12 +0800 -Subject: 8259886: Improve SSL session cache performance and - scalability - -Summary: : Improve SSL session cache performance and scalability -LLT: NA -Patch Type: backport -Bug url: https://bugs.openjdk.java.net/browse/JDK-8259886 ---- - .../classes/sun/security/util/Cache.java | 21 ++++++++++++++++++- - 1 file changed, 20 insertions(+), 1 deletion(-) - -diff --git a/jdk/src/share/classes/sun/security/util/Cache.java b/jdk/src/share/classes/sun/security/util/Cache.java -index 7a2e6f394..1ba64a2c7 100644 ---- a/jdk/src/share/classes/sun/security/util/Cache.java -+++ b/jdk/src/share/classes/sun/security/util/Cache.java -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2002, 2021, 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 -@@ -252,6 +252,7 @@ class MemoryCache extends Cache { - private final Map> cacheMap; - private int maxSize; - private long lifetime; -+ private long nextExpirationTime = Long.MAX_VALUE; - - // ReferenceQueue is of type V instead of Cache - // to allow SoftCacheEntry to extend SoftReference -@@ -321,12 +322,18 @@ class MemoryCache extends Cache { - } - int cnt = 0; - long time = System.currentTimeMillis(); -+ if (nextExpirationTime > time) { -+ return; -+ } -+ nextExpirationTime = Long.MAX_VALUE; - for (Iterator> t = cacheMap.values().iterator(); - t.hasNext(); ) { - CacheEntry entry = t.next(); - if (entry.isValid(time) == false) { - t.remove(); - cnt++; -+ } else if (nextExpirationTime > entry.getExpirationTime()) { -+ nextExpirationTime = entry.getExpirationTime(); - } - } - if (DEBUG) { -@@ -360,6 +367,9 @@ class MemoryCache extends Cache { - emptyQueue(); - long expirationTime = (lifetime == 0) ? 0 : - System.currentTimeMillis() + lifetime; -+ if (expirationTime < nextExpirationTime) { -+ nextExpirationTime = expirationTime; -+ } - CacheEntry newEntry = newEntry(key, value, expirationTime, queue); - CacheEntry oldEntry = cacheMap.put(key, newEntry); - if (oldEntry != null) { -@@ -474,6 +484,7 @@ class MemoryCache extends Cache { - - V getValue(); - -+ long getExpirationTime(); - } - - private static class HardCacheEntry implements CacheEntry { -@@ -496,6 +507,10 @@ class MemoryCache extends Cache { - return value; - } - -+ public long getExpirationTime() { -+ return expirationTime; -+ } -+ - public boolean isValid(long currentTime) { - boolean valid = (currentTime <= expirationTime); - if (valid == false) { -@@ -533,6 +548,10 @@ class MemoryCache extends Cache { - return get(); - } - -+ public long getExpirationTime() { -+ return expirationTime; -+ } -+ - public boolean isValid(long currentTime) { - boolean valid = (currentTime <= expirationTime) && (get() != null); - if (valid == false) { --- -2.19.0 - diff --git a/8264640.patch b/8264640.patch deleted file mode 100755 index 4aefd2e5396bc208f16d8f63dca8e260d42b15d8..0000000000000000000000000000000000000000 --- a/8264640.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parOopClosures.inline.hpp b/hotspot/src/share/vm/gc_implementation/parNew/parOopClosures.inline.hpp -index 2a3e32071..887e47216 100644 ---- a/hotspot/src/share/vm/gc_implementation/parNew/parOopClosures.inline.hpp -+++ b/hotspot/src/share/vm/gc_implementation/parNew/parOopClosures.inline.hpp -@@ -38,6 +38,7 @@ template inline void ParScanWeakRefClosure::do_oop_work(T* p) { - // we need to ensure that it is copied (see comment in - // ParScanClosure::do_oop_work). - Klass* objK = obj->klass(); -+ OrderAccess::loadload(); - markOop m = obj->mark(); - oop new_obj; - if (m->is_marked()) { // Contains forwarding pointer. -@@ -101,6 +102,7 @@ inline void ParScanClosure::do_oop_work(T* p, - // overwritten with an overflow next pointer after the object is - // forwarded. - Klass* objK = obj->klass(); -+ OrderAccess::loadload(); - markOop m = obj->mark(); - oop new_obj; - if (m->is_marked()) { // Contains forwarding pointer. diff --git a/8266929_huawei_add_oid_mapping_common_sig_types.patch b/8266929_huawei_add_oid_mapping_common_sig_types.patch deleted file mode 100755 index 19a2147b30a86066a8d40bc8cb20d704f244d15f..0000000000000000000000000000000000000000 --- a/8266929_huawei_add_oid_mapping_common_sig_types.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/jdk/src/share/classes/sun/security/x509/AlgorithmId.java b/jdk/src/share/classes/sun/security/x509/AlgorithmId.java -index 502c52f30..41df5d290 100644 ---- a/jdk/src/share/classes/sun/security/x509/AlgorithmId.java -+++ b/jdk/src/share/classes/sun/security/x509/AlgorithmId.java -@@ -589,6 +589,24 @@ public class AlgorithmId implements Serializable, DerEncoder { - || name.equalsIgnoreCase("SHA1/RSA")) { - return AlgorithmId.sha1WithRSAEncryption_oid; - } -+ if (name.equalsIgnoreCase("SHA224withRSA")) { -+ return AlgorithmId.sha224WithRSAEncryption_oid; -+ } -+ if (name.equalsIgnoreCase("SHA256withRSA")) { -+ return AlgorithmId.sha256WithRSAEncryption_oid; -+ } -+ if (name.equalsIgnoreCase("SHA384withRSA")) { -+ return AlgorithmId.sha384WithRSAEncryption_oid; -+ } -+ if (name.equalsIgnoreCase("SHA512withRSA")) { -+ return AlgorithmId.sha512WithRSAEncryption_oid; -+ } -+ if (name.equalsIgnoreCase("SHA512/224withRSA")) { -+ return AlgorithmId.sha512_224WithRSAEncryption_oid; -+ } -+ if (name.equalsIgnoreCase("SHA512/256withRSA")) { -+ return AlgorithmId.sha512_256WithRSAEncryption_oid; -+ } - if (name.equalsIgnoreCase("SHA1withECDSA") - || name.equalsIgnoreCase("ECDSA")) { - return AlgorithmId.sha1WithECDSA_oid; diff --git a/Ddot-intrinsic-implement.patch b/Ddot-intrinsic-implement.patch index 5ec953a49ff3f16ab1adbf0510476d78375c89f7..1589d067781c89fa3ad937960c74af6da6efaca0 100644 --- a/Ddot-intrinsic-implement.patch +++ b/Ddot-intrinsic-implement.patch @@ -190,14 +190,6 @@ diff --git a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp b/hotspot/src/ index 0d73c0c0c..337d5c1dd 100644 --- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp -@@ -45,6 +45,7 @@ - - #include "stubRoutines_aarch64.hpp" - -+ - #ifdef COMPILER2 - #include "opto/runtime.hpp" - #endif @@ -3220,6 +3221,39 @@ class StubGenerator: public StubCodeGenerator { return start; } diff --git a/G1-memory-uncommit.patch b/G1-memory-uncommit.patch index adaac309e2e11f25bc9fab9c53d253c83ada6067..ee6b8cf5977ae844b220b2ede2bb4ed6e5e5d395 100644 --- a/G1-memory-uncommit.patch +++ b/G1-memory-uncommit.patch @@ -8,8 +8,8 @@ index 84f0a4ac..b38ee52e 100644 _g1_humongous_allocation ("G1 Humongous Allocation"), + _g1_periodic_gc ("G1 Periodic GC"), - _shenandoah_allocation_failure_evac ("Allocation Failure During Evacuation"), - _shenandoah_stop_vm ("Stopping VM"), + _last_ditch_collection ("Last ditch collection"), + _last_gc_cause ("ILLEGAL VALUE - last gc cause - ILLEGAL VALUE"); diff --git a/hotspot/make/bsd/makefiles/mapfile-vers-debug b/hotspot/make/bsd/makefiles/mapfile-vers-debug index 49a70edc..00651d42 100644 --- a/hotspot/make/bsd/makefiles/mapfile-vers-debug @@ -852,7 +852,7 @@ index 761b0e95..c41e6b65 100644 EXT_SIZE_PARAMS(heap_capacity_bytes_after_gc)); + if (_extract_uncommit_list) { -+ gclog_or_tty->print(" [Uncommit list " UINTX_FORMAT ", remaining " UINTX_FORMAT ", free list " UINTX_FORMAT "]", ++ gclog_or_tty->print(" [Uncommit list " UINT32_FORMAT ", remaining " UINT32_FORMAT ", free list " UINT32_FORMAT "]", + _extract_uncommit_list, + _g1->_hrm.length(), + _g1->_hrm.num_free_regions()); @@ -1673,8 +1673,8 @@ index bdac7cb0..283df9bf 100644 + case _g1_periodic_collection: + return "G1 Periodic Collection"; + - case _shenandoah_allocation_failure_evac: - return "Allocation Failure During Evacuation"; + case _last_ditch_collection: + return "Last ditch collection"; diff --git a/hotspot/src/share/vm/gc_interface/gcCause.hpp b/hotspot/src/share/vm/gc_interface/gcCause.hpp index 29408d77..5be14548 100644 @@ -1686,21 +1686,8 @@ index 29408d77..5be14548 100644 _g1_humongous_allocation, + _g1_periodic_collection, - _shenandoah_stop_vm, - _shenandoah_metadata_gc_clear_softrefs, -diff --git a/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp b/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp -index 0f8727fe..8bbcbda4 100644 ---- a/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp -+++ b/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp -@@ -98,7 +98,7 @@ private: - static GlobalTLABStats* global_stats() { return _global_stats; } - - public: -- ThreadLocalAllocBuffer() : _allocation_fraction(TLABAllocationWeight), _allocated_before_last_gc(0), _initialized(false) { -+ ThreadLocalAllocBuffer() : _allocation_fraction(TLABAllocationWeight), _allocated_before_last_gc(0), _initialized(false), _gclab(false) { - // do nothing. tlabs must be inited by initialize() calls - } - + _last_ditch_collection, + _last_gc_cause diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp index de01fefd..e149ca64 100644 --- a/hotspot/src/share/vm/prims/jvm.cpp @@ -1773,7 +1760,7 @@ index 3db27350..7374eee5 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -99,6 +99,7 @@ - #include "gc_implementation/shenandoah/shenandoahControlThread.hpp" + #if INCLUDE_ALL_GCS #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp" #include "gc_implementation/g1/concurrentMarkThread.inline.hpp" +#include "gc_implementation/g1/g1CollectedHeap.hpp" @@ -1781,7 +1768,7 @@ index 3db27350..7374eee5 100644 #endif // INCLUDE_ALL_GCS #ifdef COMPILER1 @@ -3677,6 +3678,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) { - ShenandoahControlThread::makeSurrogateLockerThread(THREAD); + ConcurrentMarkSweepThread::makeSurrogateLockerThread(THREAD); } else { ConcurrentMarkThread::makeSurrogateLockerThread(THREAD); + G1CollectedHeap::heap()->init_periodic_gc_thread(); diff --git a/add-appcds-file-lock.patch b/add-appcds-file-lock.patch index b338d120d494793b53f7e4ee1a9c5df034c86b28..f422f5469d2bfc53b87b2260b3cbb049f4b3e6f1 100644 --- a/add-appcds-file-lock.patch +++ b/add-appcds-file-lock.patch @@ -238,7 +238,7 @@ index 17447587..d2095e63 100644 close(); remove(_full_path); + remove(_appcds_file_lock_path); - fail_stop("Unable to write to shared archive file.", NULL); + fail_stop("Unable to write to shared archive file."); } } @@ -492,6 +519,10 @@ void FileMapInfo::write_bytes_aligned(const void* buffer, int nbytes) { diff --git a/delete_untrustworthy_cacert_soneraclass2ca.patch b/delete_untrustworthy_cacert_soneraclass2ca.patch deleted file mode 100755 index fe7f5c839b97209fcec31fa706e382b94298b783..0000000000000000000000000000000000000000 --- a/delete_untrustworthy_cacert_soneraclass2ca.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff --git a/jdk/make/data/cacerts/soneraclass2ca b/jdk/make/data/cacerts/soneraclass2ca -deleted file mode 100644 -index 43faa5e2..00000000 ---- a/jdk/make/data/cacerts/soneraclass2ca -+++ /dev/null -@@ -1,26 +0,0 @@ --Owner: CN=Sonera Class2 CA, O=Sonera, C=FI --Issuer: CN=Sonera Class2 CA, O=Sonera, C=FI --Serial number: 1d --Valid from: Fri Apr 06 07:29:40 GMT 2001 until: Tue Apr 06 07:29:40 GMT 2021 --Signature algorithm name: SHA1withRSA --Subject Public Key Algorithm: 2048-bit RSA key --Version: 3 -------BEGIN CERTIFICATE----- --MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP --MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAx --MDQwNjA3Mjk0MFoXDTIxMDQwNjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNV --BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMiBDQTCCASIwDQYJKoZI --hvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3/Ei9vX+ALTU74W+o --Z6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybTdXnt --5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s --3TmVToMGf+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2Ej --vOr7nQKV0ba5cTppCD8PtOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu --8nYybieDwnPz3BjotJPqdURrBGAgcVeHnfO+oJAjPYok4doh28MCAwEAAaMzMDEw --DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITTXjwwCwYDVR0PBAQDAgEG --MA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt0jSv9zil --zqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/ --3DEIcbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvD --FNr450kkkdAdavphOe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6 --Tk6ezAyNlNzZRZxe7EJQY670XcSxEtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2 --ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLHllpwrN9M -------END CERTIFICATE----- -diff --git a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java -index 9053b796..d1a7879d 100644 ---- a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java -+++ b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java -@@ -53,12 +53,12 @@ public class VerifyCACerts { - + File.separator + "security" + File.separator + "cacerts"; - - // The numbers of certs now. -- private static final int COUNT = 90; -+ private static final int COUNT = 89; - - // SHA-256 of cacerts, can be generated with - // shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95 - private static final String CHECKSUM -- = "DC:22:7E:D7:F3:46:1F:8B:A8:4E:EE:C2:A8:4B:8E:26:89:4F:95:5C:71:A3:1B:5A:6E:A6:48:FD:CB:C9:F2:95"; -+ = "E6:F5:ED:92:CE:E2:35:5C:84:56:78:C7:72:29:29:A9:83:99:19:D9:54:F4:FF:7F:F7:D4:DB:2D:34:36:20:B5"; - - // map of cert alias to SHA-256 fingerprint - @SuppressWarnings("serial") -@@ -167,8 +167,6 @@ public class VerifyCACerts { - "3B:22:2E:56:67:11:E9:92:30:0D:C0:B1:5A:B9:47:3D:AF:DE:F8:C8:4D:0C:EF:7D:33:17:B4:C1:82:1D:14:36"); - put("swisssignsilverg2ca [jdk]", - "BE:6C:4D:A2:BB:B9:BA:59:B6:F3:93:97:68:37:42:46:C3:C0:05:99:3F:A9:8F:02:0D:1D:ED:BE:D4:8A:81:D5"); -- put("soneraclass2ca [jdk]", -- "79:08:B4:03:14:C1:38:10:0B:51:8D:07:35:80:7F:FB:FC:F8:51:8A:00:95:33:71:05:BA:38:6B:15:3D:D9:27"); - put("securetrustca [jdk]", - "F1:C1:B5:0A:E5:A2:0D:D8:03:0E:C9:F6:BC:24:82:3D:D3:67:B5:25:57:59:B4:E7:1B:61:FC:E9:F7:37:5D:73"); - put("xrampglobalca [jdk]", -@@ -245,12 +243,7 @@ public class VerifyCACerts { - // Exception list to 90 days expiry policy - // No error will be reported if certificate in this list expires - @SuppressWarnings("serial") -- private static final HashSet EXPIRY_EXC_ENTRIES = new HashSet() { -- { -- // Valid until: Tue Apr 06 15:29:40 HKT 2021 -- add("soneraclass2ca [jdk]"); -- } -- }; -+ private static final HashSet EXPIRY_EXC_ENTRIES = new HashSet(); - - // Ninety days in milliseconds - private static final long NINETY_DAYS = 7776000000L; diff --git a/downgrade-symver-of-memcpy-GLIBC.patch b/downgrade-symver-of-memcpy-GLIBC.patch index 8bbf31b6b022345773632528f10ebbcc0aabdf59..bc4146db650b8daa21868b45cdcf6d3ca5e80cd5 100644 --- a/downgrade-symver-of-memcpy-GLIBC.patch +++ b/downgrade-symver-of-memcpy-GLIBC.patch @@ -237,7 +237,7 @@ index 09434f14d..02fded0dc 100644 LANG := C, \ OPTIMIZATION := LOW, \ + EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \ - CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \ + CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \ -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \ -I$(JDK_TOPDIR)/src/share/transport/socket \ @@ -148,6 +149,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \ @@ -245,7 +245,7 @@ index 09434f14d..02fded0dc 100644 LANG := C, \ OPTIMIZATION := LOW, \ + EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \ - CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \ + CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \ -I$(JDK_TOPDIR)/src/share/transport/export \ -I$(JDK_TOPDIR)/src/share/back/export \ @@ -252,6 +254,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \ @@ -253,7 +253,7 @@ index 09434f14d..02fded0dc 100644 LANG := C, \ OPTIMIZATION := LOW, \ + EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \ - CFLAGS := $(LIBINSTRUMENT_CFLAGS), \ + CFLAGS := $(LIBINSTRUMENT_CFLAGS) $(CFLAGS_WARNINGS_ARE_ERRORS), \ CFLAGS_debug := -DJPLIS_LOGGING, \ CFLAGS_release := -DNO_JPLIS_LOGGING, \ @@ -375,6 +378,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \ @@ -261,7 +261,7 @@ index 09434f14d..02fded0dc 100644 LANG := C, \ OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \ + EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \ - CFLAGS := $(CFLAGS_JDKLIB) \ + CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \ $(BUILD_LIBHPROF_CFLAGS), \ CFLAGS_debug := -DHPROF_LOGGING, \ @@ -403,6 +407,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \ @@ -269,7 +269,7 @@ index 09434f14d..02fded0dc 100644 LANG := C, \ OPTIMIZATION := LOW, \ + EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \ - CFLAGS := $(CFLAGS_JDKLIB) \ + CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \ -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava_crw_demo/mapfile-vers, \ diff --git a/jdk/make/lib/SoundLibraries.gmk b/jdk/make/lib/SoundLibraries.gmk diff --git a/fix-crash-in-JVMTI-debug.patch b/fix-crash-in-JVMTI-debug.patch deleted file mode 100644 index 2c55f8aaecb03a64c4d2a457811177ed85091280..0000000000000000000000000000000000000000 --- a/fix-crash-in-JVMTI-debug.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 2c8ad6489ccb8c160dc0ddcfd1811c27828221f2 Mon Sep 17 00:00:00 2001 -Date: Fri, 22 Jan 2021 11:11:56 +0800 -Subject: fix crash in JVMTI debug - ---- - hotspot/src/share/vm/prims/jvmtiEnvBase.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp -index fe2a38116..5db415676 100644 ---- a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp -+++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp -@@ -1092,7 +1092,7 @@ JvmtiEnvBase::get_object_monitor_usage(JavaThread* calling_thread, jobject objec - // If the monitor has no owner, then a non-suspended contending - // thread could potentially change the state of the monitor by - // entering it. The JVM/TI spec doesn't allow this. -- if (owning_thread == NULL && !at_safepoint & -+ if (owning_thread == NULL && !at_safepoint && - !JvmtiEnv::is_thread_fully_suspended(pending_thread, true, &debug_bits)) { - if (ret.owner != NULL) { - destroy_jni_reference(calling_thread, ret.owner); --- -2.19.0 - diff --git a/fix-lock-ordering-issue-when-calling-JVMTI-GetLoaded.patch b/fix-lock-ordering-issue-when-calling-JVMTI-GetLoaded.patch new file mode 100644 index 0000000000000000000000000000000000000000..eae6f818d3eab6a409dc9d1611227d7f06741001 --- /dev/null +++ b/fix-lock-ordering-issue-when-calling-JVMTI-GetLoaded.patch @@ -0,0 +1,41 @@ +From d9955ea64090c1d6b1f1e2674c9c064c988f05aa Mon Sep 17 00:00:00 2001 +From: zhangyipeng +Date: Mon, 26 Jul 2021 21:08:09 +0800 +Subject: [PATCH] [Huawei]Fix lock ordering issue when calling JVMTI GetLoadedClasses + during marking + +Offering: Cloud Compiler JDK + + +Signed-off-by: Zhang Yipeng +--- + hotspot/src/share/vm/prims/jvmtiGetLoadedClasses.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/hotspot/src/share/vm/prims/jvmtiGetLoadedClasses.cpp b/hotspot/src/share/vm/prims/jvmtiGetLoadedClasses.cpp +index a292f89..78e557a 100644 +--- a/hotspot/src/share/vm/prims/jvmtiGetLoadedClasses.cpp ++++ b/hotspot/src/share/vm/prims/jvmtiGetLoadedClasses.cpp +@@ -60,7 +60,6 @@ public: + void do_klass(Klass* k) { + // Collect all jclasses + _classStack.push((jclass) _env->jni_reference(k->java_mirror())); +- ensure_klass_alive(k->java_mirror()); + } + + int extract(jclass* result_list) { +@@ -70,7 +69,10 @@ public: + + // Pop all jclasses, fill backwards + while (!_classStack.is_empty()) { +- result_list[--i] = _classStack.pop(); ++ jclass klass_handle = _classStack.pop(); ++ oop klass_mirror = JNIHandles::resolve(klass_handle); ++ ensure_klass_alive(klass_mirror); ++ result_list[--i] = klass_handle; + } + + // Return the number of elements written +-- +1.8.3.1 + diff --git a/fix_g1uncommit_ygc_expand_crash.patch b/fix_g1uncommit_ygc_expand_crash.patch new file mode 100755 index 0000000000000000000000000000000000000000..47b9a212f0b48b02e84a7763a028f8a863c86436 --- /dev/null +++ b/fix_g1uncommit_ygc_expand_crash.patch @@ -0,0 +1,15 @@ +diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp +index 6ad85596..818f6681 100644 +--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp ++++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionManager.cpp +@@ -241,8 +241,8 @@ uint HeapRegionManager::expand_at(uint start, uint num_regions) { + uint HeapRegionManager::expand_on_preferred_node(uint preferred_index) { + uint expand_candidate = UINT_MAX; + for (uint i = 0; i < max_length(); i++) { +- if (is_available(i)) { +- // Already in use continue ++ if (!can_expand(i)) { ++ // Already in use or in uncommit list continue + continue; + } + // Always save the candidate so we can expand later on. diff --git a/g1gc-numa-aware-Implementation.patch b/g1gc-numa-aware-Implementation.patch index d9001e271de1e3da2b3fc866515ebade6a698d9c..844fe299dfb2c16ca3a042a68c7b96aefcc83b2f 100755 --- a/g1gc-numa-aware-Implementation.patch +++ b/g1gc-numa-aware-Implementation.patch @@ -3226,7 +3226,7 @@ index 53f402172..1b66e0cb8 100644 +#include "gc_implementation/g1/g1NUMA.hpp" #include "gc_implementation/g1/g1CollectorPolicy_ext.hpp" #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" - #include "gc_implementation/shenandoah/shenandoahHeap.hpp" + #endif // INCLUDE_ALL_GCS @@ -811,6 +812,7 @@ jint Universe::initialize_heap() { #if INCLUDE_ALL_GCS G1CollectorPolicyExt* g1p = new G1CollectorPolicyExt(); diff --git a/implementation_of_Blas_hotspot_function_in_Intrinsics.patch b/implementation_of_Blas_hotspot_function_in_Intrinsics.patch index 39335dbc6c562911bc21febb7d3b90476c6c8310..cb2815fbb4b00c4e7c48c392d8c2813df5d7c2d9 100755 --- a/implementation_of_Blas_hotspot_function_in_Intrinsics.patch +++ b/implementation_of_Blas_hotspot_function_in_Intrinsics.patch @@ -270,55 +270,10 @@ diff --git a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp b/hotspot/src/ index c5ec637a1..125983179 100644 --- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp -@@ -3221,6 +3221,44 @@ class StubGenerator: public StubCodeGenerator { - return start; - } - -+ address load_BLAS_library() { -+ // Try to load BLAS library. -+ const char library_name[] = "openblas"; -+ char err_buf[1024] = {0}; -+ char path[JVM_MAXPATHLEN] = {0}; -+ os::jvm_path(path, sizeof(path)); -+ int jvm_offset = -1; -+ -+ // Match "jvm[^/]*" in jvm_path. -+ const char* last_name = strrchr(path, '/'); -+ last_name = last_name ? last_name : path; -+ const char* last_lib_name = strstr(last_name, "jvm"); -+ if (last_lib_name != NULL) { -+ jvm_offset = last_lib_name - path; -+ } -+ -+ address library = NULL; -+ // Find the BLAS shared library. -+ // Search path: /jre/lib///libopenblas.so -+ if (jvm_offset >= 0) { -+ if (jvm_offset + strlen(library_name) + strlen(os::dll_file_extension()) < JVM_MAXPATHLEN) { -+ strncpy(&path[jvm_offset], library_name, strlen(library_name)); -+ strncat(&path[jvm_offset], os::dll_file_extension(), strlen(os::dll_file_extension())); -+ library = (address)os::dll_load(path, err_buf, sizeof(err_buf)); -+ } -+ } -+ return library; -+ } -+ -+ address get_BLAS_func_entry(address library, const char* func_name) { -+ if (library == NULL) { -+ return NULL; -+ } -+ -+ // Try to find BLAS function entry. -+ return (address)os::dll_lookup((void*)library, func_name); -+ } -+ - /** - * Arguments: - * -@@ -3254,6 +3292,218 @@ class StubGenerator: public StubCodeGenerator { +@@ -3204,6 +3204,218 @@ class StubGenerator: public StubCodeGenerator { return start; } - + + // Parameter conversion from JVM to native BLAS + // + // Register: @@ -530,6 +485,51 @@ index c5ec637a1..125983179 100644 + } + + ++ + /** + * Arguments: + * +@@ -3221,6 +3221,44 @@ class StubGenerator: public StubCodeGenerator { + return start; + } + ++ address load_BLAS_library() { ++ // Try to load BLAS library. ++ const char library_name[] = "openblas"; ++ char err_buf[1024] = {0}; ++ char path[JVM_MAXPATHLEN] = {0}; ++ os::jvm_path(path, sizeof(path)); ++ int jvm_offset = -1; ++ ++ // Match "jvm[^/]*" in jvm_path. ++ const char* last_name = strrchr(path, '/'); ++ last_name = last_name ? last_name : path; ++ const char* last_lib_name = strstr(last_name, "jvm"); ++ if (last_lib_name != NULL) { ++ jvm_offset = last_lib_name - path; ++ } ++ ++ address library = NULL; ++ // Find the BLAS shared library. ++ // Search path: /jre/lib///libopenblas.so ++ if (jvm_offset >= 0) { ++ if (jvm_offset + strlen(library_name) + strlen(os::dll_file_extension()) < JVM_MAXPATHLEN) { ++ strncpy(&path[jvm_offset], library_name, strlen(library_name)); ++ strncat(&path[jvm_offset], os::dll_file_extension(), strlen(os::dll_file_extension())); ++ library = (address)os::dll_load(path, err_buf, sizeof(err_buf)); ++ } ++ } ++ return library; ++ } ++ ++ address get_BLAS_func_entry(address library, const char* func_name) { ++ if (library == NULL) { ++ return NULL; ++ } ++ ++ // Try to find BLAS function entry. ++ return (address)os::dll_lookup((void*)library, func_name); ++ } + /** * Arguments: @@ -909,7 +909,7 @@ index 65c04e3e5..070fd8052 100644 CodeEmitInfo* info = NULL; if (x->needs_null_check()) { info = state_for(x); -@@ -1422,6 +1422,44 @@ LIR_Opr LIRGenerator::load_constant(LIR_Const* c) { +@@ -1422,6 +1422,35 @@ LIR_Opr LIRGenerator::load_constant(LIR_Const* c) { return result; } @@ -921,15 +921,6 @@ index 65c04e3e5..070fd8052 100644 + + __ add(str, LIR_OprFact::intConst(value_offset), tmp); + LIR_Address* array_addr = new LIR_Address(tmp, T_ARRAY); -+#if INCLUDE_ALL_GCS -+ if (UseShenandoahGC) { -+ LIR_Opr tmp = new_register(T_OBJECT); -+ LIR_Opr addr = ShenandoahBarrierSet::barrier_set()->bsc1()->resolve_address(this, array_addr, T_OBJECT, NULL); -+ __ load(addr->as_address_ptr(), tmp); -+ tmp = ShenandoahBarrierSet::barrier_set()->bsc1()->load_reference_barrier(this, tmp, addr); -+ __ move(tmp, value); -+ } else -+#endif + __ load(array_addr, value); + + return value; diff --git a/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u292-b10.tar.xz b/jdk8u-jdk8u302-b07.tar.xz similarity index 82% rename from aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u292-b10.tar.xz rename to jdk8u-jdk8u302-b07.tar.xz index 61cd9e16e7767f5f79378f08df91efeefbf35a95..34f516232c476e90a2d1f16512d9acdaf13d80a0 100644 Binary files a/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u292-b10.tar.xz and b/jdk8u-jdk8u302-b07.tar.xz differ diff --git a/openjdk-1.8.0.spec b/openjdk-1.8.0.spec index daf19aa5fc33e4386e5b16375bc520f8f8088b60..53e16ab330600616b296895e5a97d61552bbdc6a 100644 --- a/openjdk-1.8.0.spec +++ b/openjdk-1.8.0.spec @@ -145,16 +145,14 @@ %global origin openjdk %global origin_nice OpenJDK %global top_level_dir_name %{origin} -# Define old aarch64/jdk8u tree variables for compatibility -%global project aarch64-port -%global repo jdk8u-shenandoah -%global revision aarch64-shenandoah-jdk8u292-b10 -%global full_revision %{project}-%{repo}-%{revision} +%global repo jdk8u +%global revision jdk8u302-b07 +%global full_revision %{repo}-%{revision} # Define IcedTea version used for SystemTap tapsets and desktop files %global icedteaver 3.15.0 -%global updatever 292 -%global buildver b10 +%global updatever 302 +%global buildver b07 # priority must be 7 digits in total. The expression is workarounding tip %global priority 1800%{updatever} @@ -918,7 +916,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 19 +Release: 2 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -976,16 +974,13 @@ Patch8: replace-vector-to-improve-performance-of-xml.validat.patch Patch10: 8221658.patch Patch18: fix-vendor-info.patch Patch21: 8202952.patch -Patch24: 8134883.patch Patch25: 8196485.patch Patch26: disable-UseLSE-on-ARMv8.1-by-default.patch Patch27: 8157570.patch Patch28: 8194246.patch -Patch29: 8214345.patch Patch30: 8191483.patch Patch31: 8141356.patch Patch33: 8166253.patch -Patch34: 8191955.patch Patch35: 8186042.patch Patch36: 8060463.patch Patch37: 8131600.patch @@ -1005,8 +1000,6 @@ Patch72: inline-optimize-for-aarch64.patch # 8u242 Patch75: Add-ability-to-configure-third-port-for-remote-JMX.patch -Patch76: 8203196.patch -Patch77: 8190332.patch Patch83: 8204947.patch Patch85: 8139041.patch @@ -1031,13 +1024,11 @@ Patch103: Ddot-intrinsic-implement.patch Patch104: 8234003.patch Patch105: 8220159.patch Patch106: fast-serializer-jdk8.patch -Patch108: 8231631.patch Patch109: Test8167409.sh-fails-to-run-with-32bit-jdk-on-64bit-.patch Patch112: 8048210-8056152.patch Patch113: 8160425.patch Patch114: 8181503.patch Patch115: 8243670.patch -Patch116: fix-crash-in-JVMTI-debug.patch Patch118: Fix-LineBuffer-vappend-when-buffer-too-small.patch Patch121: Remove-unused-GenericTaskQueueSet-T-F-tasks.patch Patch122: optimize-jmap-F-dump-xxx.patch @@ -1062,7 +1053,6 @@ Patch147: 8215047.patch Patch148: 8237894.patch Patch149: Remove-the-parentheses-around-company-name.patch Patch151: kae-phase1.patch -Patch152: 8231841-debug.cpp-help-is-missing-an-AArch64-line-fo.patch Patch153: initialized-value-should-be-0-in-perfInit.patch Patch154: 8254078-DataOutputStream-is-very-slow-post-disabling.patch Patch155: Use-atomic-operation-when-G1Uncommit.patch @@ -1070,11 +1060,9 @@ Patch157: 8140597-Postpone-the-initial-mark-request-until-the-.patch Patch158: Use-Mutex-when-G1Uncommit.patch Patch159: C1-typos-repair.patch Patch160: 8214418-half-closed-SSLEngine-status-may-cause-appli.patch -Patch161: 8259886-Improve-SSL-session-cache-performance-and-sc.patch Patch162: 8214535-support-Jmap-parallel.patch Patch163: Fixed-a-copyright-writing-problem.patch Patch164: fix-arguments.cpp-error-C2131-on-windows.patch -Patch165: 818172_overflow_when_strength_reducing_interger_multiply.patch Patch166: add-missing-test-case.patch Patch167: fix-BoxTypeCachedMax-build-failure-when-jvm-variants.patch Patch168: fix-windows-compile-fail.patch @@ -1100,8 +1088,6 @@ Patch186: update-to-keep-same-with-master.patch Patch187: 8182036.patch Patch188: 8247691_incorrect_handling_of_VM_exceptions_in_C1_deopt_stub.patch Patch189: 8266187_Memory_leak_in_appendBootClassPath.patch -Patch190: 8266929_huawei_add_oid_mapping_common_sig_types.patch -Patch191: 8264640.patch Patch192: add_kae_implementation_add_default_conf_file.patch Patch193: improve_algorithmConstraints_checkAlgorithm_performance.patch Patch194: modify_the_default_iteration_time_and_forks_in_the_JMH_of_KAEProvider.patch @@ -1109,11 +1095,15 @@ Patch195: support_CMS_parallel_inspection.patch Patch196: g1gc-numa-aware-Implementation.patch Patch197: implementation_of_Blas_hotspot_function_in_Intrinsics.patch Patch198: fix_G1GC_memory_leak_in_numa.patch -Patch199: delete_untrustworthy_cacert_soneraclass2ca.patch Patch200: Fix-ECDH-and-DH-memory-usage.patch Patch201: fix_run_SPECjvm2008_failed_on_32_bit_system.patch Patch202: Fix-RSACipher-memory-usage.patch +# 8u302 +Patch203: fix-lock-ordering-issue-when-calling-JVMTI-GetLoaded.patch +Patch204: 8069191.patch +Patch205: fix_g1uncommit_ygc_expand_crash.patch + ############################################# # # Upstreamable patches @@ -1452,16 +1442,13 @@ pushd %{top_level_dir_name} %patch10 -p1 %patch18 -p1 %patch21 -p1 -%patch24 -p1 %patch25 -p1 %patch26 -p1 %patch27 -p1 %patch28 -p1 -%patch29 -p1 %patch30 -p1 %patch31 -p1 %patch33 -p1 -%patch34 -p1 %patch35 -p1 %patch36 -p1 %patch37 -p1 @@ -1479,8 +1466,6 @@ pushd %{top_level_dir_name} %patch70 -p1 %patch72 -p1 %patch75 -p1 -%patch76 -p1 -%patch77 -p1 %patch83 -p1 %patch85 -p1 %patch86 -p1 @@ -1499,13 +1484,11 @@ pushd %{top_level_dir_name} %patch104 -p1 %patch105 -p1 %patch106 -p1 -%patch108 -p1 %patch109 -p1 %patch112 -p1 %patch113 -p1 %patch114 -p1 %patch115 -p1 -%patch116 -p1 %patch118 -p1 %patch121 -p1 %patch122 -p1 @@ -1526,7 +1509,6 @@ pushd %{top_level_dir_name} %patch148 -p1 %patch149 -p1 %patch151 -p1 -%patch152 -p1 %patch153 -p1 %patch154 -p1 %patch155 -p1 @@ -1534,11 +1516,9 @@ pushd %{top_level_dir_name} %patch158 -p1 %patch159 -p1 %patch160 -p1 -%patch161 -p1 %patch162 -p1 %patch163 -p1 %patch164 -p1 -%patch165 -p1 %patch166 -p1 %patch167 -p1 %patch168 -p1 @@ -1562,18 +1542,18 @@ pushd %{top_level_dir_name} %patch187 -p1 %patch188 -p1 %patch189 -p1 -%patch190 -p1 -%patch191 -p1 %patch192 -p1 %patch194 -p1 %patch195 -p1 %patch196 -p1 %patch197 -p1 %patch198 -p1 -%patch199 -p1 %patch200 -p1 %patch201 -p1 %patch202 -p1 +%patch203 -p1 +%patch204 -p1 +%patch205 -p1 popd # System library fixes @@ -2189,6 +2169,30 @@ require "copy_jdk_configs.lua" %endif %changelog +* Fri Aug 20 2021 kuenking111 - 1:1.8.0.302-b07.2 +- add fix_g1uncommit_ygc_expand_crash.patch + +* Thu Aug 19 2021 eapen - 1:1.8.0.302-b07.1 +- delete 8266929_huawei_add_oid_mapping_common_sig_types.patch + +* Wed Aug 11 2021 eapen - 1:1.8.0.302-b07.0 +- update to 8u302-b07(ga)(switch to jdk8u from aarch64-port/jdk8u-shenandoah) +- add 8069191.patch +- add fix-lock-ordering-issue-when-calling-JVMTI-GetLoaded.patch +- delete 8134883.patch +- delete 818172_overflow_when_strength_reducing_interger_multiply.patch +- delete 8190332.patch +- delete 8191955.patch +- delete 8203196.patch +- delete 8214345.patch +- delete 8231631.patch +- delete 8231841-debug.cpp-help-is-missing-an-AArch64-line-fo.patch +- delete 8259886-Improve-SSL-session-cache-performance-and-sc.patch +- delete 8264640.patch +- delete delete_untrustworthy_cacert_soneraclass2ca.patch +- delete fix-crash-in-JVMTI-debug.patch +- other adaptations to jdk8u302 + * Thu Jul 12 2021 noah - 1:1.8.0.292-b10.19 - add Fix-RSACipher-memory-usage.patch diff --git a/remove-gnu-debuglink-when-using-enable-debug-.patch b/remove-gnu-debuglink-when-using-enable-debug-.patch index 569e32183ce803ed04449ab6cc3facea81cc599f..8d7ff6eb74a3d74bffdb2c935cb3df117a0f1d75 100644 --- a/remove-gnu-debuglink-when-using-enable-debug-.patch +++ b/remove-gnu-debuglink-when-using-enable-debug-.patch @@ -55,14 +55,14 @@ index 9980e8ab9..4fa9f14cf 100644 --- a/make/common/NativeCompilation.gmk +++ b/make/common/NativeCompilation.gmk @@ -487,7 +487,7 @@ define SetupNativeCompilation - $$($1_DEBUGINFO_FILES): $$($1_TARGET) - $(RM) $$@ - $(OBJCOPY) --only-keep-debug $$< $$@ -- $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$< -+ $(CD) $$(@D) - $(TOUCH) $$@ - endif - endif # No MacOS X support + $$($1_DEBUGINFO_FILES): $$($1_TARGET) + $(RM) $$@ + $(OBJCOPY) --only-keep-debug $$< $$@ +- $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$< ++ $(CD) $$(@D) + $(TOUCH) $$@ + endif + else ifeq ($(OPENJDK_TARGET_OS), aix) -- 2.19.0 diff --git a/revert-windows-bugfix.patch b/revert-windows-bugfix.patch index 6734b1dee819aa5058384c210eb0a09ec14db948..1fa332c202ebc70e947ffb49024d4ba751e41fa1 100644 --- a/revert-windows-bugfix.patch +++ b/revert-windows-bugfix.patch @@ -34,10 +34,10 @@ index 90f490272..181628567 100644 @@ -21,10 +21,9 @@ * */ - + +#include "precompiled.hpp" #include "owstTaskTerminator.hpp" - + -#include "precompiled/precompiled.hpp" - bool OWSTTaskTerminator::exit_termination(size_t tasks, TerminatorTerminator* terminator) { diff --git a/update-cacerts-and-VerifyCACerts.java-test.patch b/update-cacerts-and-VerifyCACerts.java-test.patch index 1748414107281209064bcd916b168056a1261540..7ab056cc2fffdffaf5923abdb974bdcdceadce24 100644 --- a/update-cacerts-and-VerifyCACerts.java-test.patch +++ b/update-cacerts-and-VerifyCACerts.java-test.patch @@ -10,11 +10,9 @@ Signed-off-by: Wang Kun jdk/make/data/cacerts/addtrustqualifiedca | 32 ----------------- jdk/make/data/cacerts/luxtrustglobalrootca | 28 --------------- jdk/make/data/cacerts/quovadisrootca | 41 ---------------------- - jdk/make/data/cacerts/thawtepremiumserverca | 27 -------------- jdk/make/data/cacerts/utnuserfirstobjectca | 33 ----------------- - jdk/make/data/cacerts/verisigntsaca | 24 ------------- - .../sun/security/lib/cacerts/VerifyCACerts.java | 40 ++------------------- - 8 files changed, 3 insertions(+), 254 deletions(-) + .../sun/security/lib/cacerts/VerifyCACerts.java | 29 ++------------------- + 8 files changed, 3 insertions(+), 192 deletions(-) delete mode 100644 jdk/make/data/cacerts/addtrustexternalca delete mode 100644 jdk/make/data/cacerts/addtrustqualifiedca delete mode 100644 jdk/make/data/cacerts/luxtrustglobalrootca @@ -180,39 +178,6 @@ index 0c195ff..0000000 -xFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi5nrQNiOK -SnQ2+Q== ------END CERTIFICATE----- -diff --git a/jdk/make/data/cacerts/thawtepremiumserverca b/jdk/make/data/cacerts/thawtepremiumserverca -deleted file mode 100644 -index 2df456a..0000000 ---- a/jdk/make/data/cacerts/thawtepremiumserverca -+++ /dev/null -@@ -1,27 +0,0 @@ --Owner: EMAILADDRESS=premium-server@thawte.com, CN=Thawte Premium Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA --Issuer: EMAILADDRESS=premium-server@thawte.com, CN=Thawte Premium Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA --Serial number: 36122296c5e338a520a1d25f4cd70954 --Valid from: Thu Aug 01 00:00:00 GMT 1996 until: Fri Jan 01 23:59:59 GMT 2021 --Signature algorithm name: SHA1withRSA --Subject Public Key Algorithm: 1024-bit RSA key --Version: 3 -------BEGIN CERTIFICATE----- --MIIDNjCCAp+gAwIBAgIQNhIilsXjOKUgodJfTNcJVDANBgkqhkiG9w0BAQUFADCB --zjELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJ --Q2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UE --CxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhh --d3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNl --cnZlckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIxMDEwMTIzNTk1OVow --gc4xCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcT --CUNhcGUgVG93bjEdMBsGA1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNV --BAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRo --YXd0ZSBQcmVtaXVtIFNlcnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1z --ZXJ2ZXJAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2 --aovXwlue2oFBYo847kkEVdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560 --ZXUCTe/LCaIhUdib0GfQug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j --+ao6hnO2RlNYyIkFvYMRuHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/ --BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBlkKyID1bZ5jA01CbH0FDxkt5r1DmI --CSLGpmODA/eZd9iy5Ri4XWPz1HP7bJyZePFLeH0ZJMMrAoT4vCLZiiLXoPxx7JGH --IPG47LHlVYCsPVLIOQ7C8MAFT9aCdYy9X9LcdpoFEsmvcsPcJX6kTY4XpeCHf+Ga --WuFg3GQjPEIuTQ== -------END CERTIFICATE----- diff --git a/jdk/make/data/cacerts/utnuserfirstobjectca b/jdk/make/data/cacerts/utnuserfirstobjectca deleted file mode 100644 index 80a0b5c..0000000 @@ -252,36 +217,6 @@ index 80a0b5c..0000000 -81OtbLUrohKqGU8J2l7nk8aOFAj+8DCAGKCGhU3IfdeLA/5u1fedFqySLKAj5ZyR -Uh+U3xeUc8OzwcFxBSAAeL0TUh2oPs0AH8g= ------END CERTIFICATE----- -diff --git a/jdk/make/data/cacerts/verisigntsaca b/jdk/make/data/cacerts/verisigntsaca -deleted file mode 100644 -index 9813dda..0000000 ---- a/jdk/make/data/cacerts/verisigntsaca -+++ /dev/null -@@ -1,24 +0,0 @@ --Owner: CN=Thawte Timestamping CA, OU=Thawte Certification, O=Thawte, L=Durbanville, ST=Western Cape, C=ZA --Issuer: CN=Thawte Timestamping CA, OU=Thawte Certification, O=Thawte, L=Durbanville, ST=Western Cape, C=ZA --Serial number: 67c8e1e8e3be1cbdfc913b8ea6238749 --Valid from: Wed Jan 01 00:00:00 GMT 1997 until: Fri Jan 01 23:59:59 GMT 2021 --Signature algorithm name: SHA1withRSA --Subject Public Key Algorithm: 1024-bit RSA key --Version: 3 -------BEGIN CERTIFICATE----- --MIICsDCCAhmgAwIBAgIQZ8jh6OO+HL38kTuOpiOHSTANBgkqhkiG9w0BAQUFADCB --izELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIGA1UEBxML --RHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhhd3RlIENl --cnRpZmljYXRpb24xHzAdBgNVBAMTFlRoYXd0ZSBUaW1lc3RhbXBpbmcgQ0EwHhcN --OTcwMTAxMDAwMDAwWhcNMjEwMTAxMjM1OTU5WjCBizELMAkGA1UEBhMCWkExFTAT --BgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzANBgNV --BAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhhd3RlIENlcnRpZmljYXRpb24xHzAdBgNV --BAMTFlRoYXd0ZSBUaW1lc3RhbXBpbmcgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0A --MIGJAoGBANYrWHhhRYZT6jR7UZztsOYuGA7+4F+oJ9O0yeB8WU4WDnNUYMF/9p8u --6TqFJBU820cEY8OexJQaWt9MevPZQx08EHp5JduQ/vBR5zDWQQD9nyjfeb6Uu522 --FOMjhdepQeBMpHmwKxqL8vg7ij5FrHGSALSQQZj7X+36ty6K+Ig3AgMBAAGjEzAR --MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAS+mqF4EF+3kKMZ/F --QfRWVKvpwuWXjhj+kckMPiZkyaFMJ2SnvQGTVXFuF0853BvcSTUQOSP/ypvIz2Y/ --3Ewa1IEGQlIf4SaxFhe65nByMUToTo1b5NP50OOPJWQx5yr4GIg2GlLFDUE1G2m3 --JvUXzMEZXkt8XOKDgJH6L/uatxY= -------END CERTIFICATE----- diff --git a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java index dd107fc..791ddb6 100644 --- a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java @@ -290,14 +225,14 @@ index dd107fc..791ddb6 100644 + File.separator + "security" + File.separator + "cacerts"; // The numbers of certs now. -- private static final int COUNT = 97; -+ private static final int COUNT = 90; +- private static final int COUNT = 91; ++ private static final int COUNT = 86; // SHA-256 of cacerts, can be generated with // shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95 private static final String CHECKSUM -- = "9F:6B:41:1D:05:AF:E3:C5:4F:E8:39:89:50:79:60:B1:F6:A4:02:40:0C:28:8D:73:78:08:E5:61:7C:17:EA:59"; -+ = "DC:22:7E:D7:F3:46:1F:8B:A8:4E:EE:C2:A8:4B:8E:26:89:4F:95:5C:71:A3:1B:5A:6E:A6:48:FD:CB:C9:F2:95"; +- = "9B:C3:0B:24:D4:26:E4:A9:4F:2C:96:25:06:9B:08:E5:13:5B:0B:33:74:5F:78:DB:BD:91:CD:31:D4:37:07:28"; ++ = "A5:00:71:02:B4:8B:AC:BE:64:34:0A:F2:DF:9D:F7:75:9D:05:84:7E:F6:EA:48:F0:64:36:29:8C:E7:A2:2D:63"; // map of cert alias to SHA-256 fingerprint @SuppressWarnings("serial") @@ -314,23 +249,6 @@ index dd107fc..791ddb6 100644 put("baltimorecybertrustca [jdk]", "16:AF:57:A9:F6:76:B0:AB:12:60:95:AA:5E:BA:DE:F2:2A:B3:11:19:D6:44:AC:95:CD:4B:93:DB:F3:F2:6A:EB"); put("digicertglobalrootca [jdk]", -@@ -133,16 +127,6 @@ public class VerifyCACerts { - "A4:31:0D:50:AF:18:A6:44:71:90:37:2A:86:AF:AF:8B:95:1F:FB:43:1D:83:7F:1E:56:88:B4:59:71:ED:15:57"); - put("thawteprimaryrootcag3 [jdk]", - "4B:03:F4:58:07:AD:70:F2:1B:FC:2C:AE:71:C9:FD:E4:60:4C:06:4C:F5:FF:B6:86:BA:E5:DB:AA:D7:FD:D3:4C"); -- put("thawtepremiumserverca [jdk]", -- "3F:9F:27:D5:83:20:4B:9E:09:C8:A3:D2:06:6C:4B:57:D3:A2:47:9C:36:93:65:08:80:50:56:98:10:5D:BC:E9"); -- put("verisigntsaca [jdk]", -- "CB:6B:05:D9:E8:E5:7C:D8:82:B1:0B:4D:B7:0D:E4:BB:1D:E4:2B:A4:8A:7B:D0:31:8B:63:5B:F6:E7:78:1A:9D"); -- put("verisignclass2g2ca [jdk]", -- "3A:43:E2:20:FE:7F:3E:A9:65:3D:1E:21:74:2E:AC:2B:75:C2:0F:D8:98:03:05:BC:50:2C:AF:8C:2D:9B:41:A1"); -- put("verisignclass3ca [jdk]", -- "A4:B6:B3:99:6F:C2:F3:06:B3:FD:86:81:BD:63:41:3D:8C:50:09:CC:4F:A3:29:C2:CC:F0:E2:FA:1B:14:03:05"); -- put("verisignclass3g2ca [jdk]", -- "83:CE:3C:12:29:68:8A:59:3D:48:5F:81:97:3C:0F:91:95:43:1E:DA:37:CC:5E:36:43:0E:79:C7:A8:88:63:8B"); - put("verisignuniversalrootca [jdk]", - "23:99:56:11:27:A5:71:25:DE:8C:EF:EA:61:0D:DF:2F:A0:78:B5:C8:06:7F:4E:82:82:90:BF:B8:60:E8:4B:3C"); - put("verisignclass3g3ca [jdk]", @@ -163,10 +147,6 @@ public class VerifyCACerts { "5D:56:49:9B:E4:D2:E0:8B:CF:CA:D0:8A:3E:38:72:3D:50:50:3B:DE:70:69:48:E4:2F:55:60:30:19:E5:28:AE"); put("letsencryptisrgx1 [jdk]", @@ -342,29 +260,28 @@ index dd107fc..791ddb6 100644 put("quovadisrootca1g3 [jdk]", "8A:86:6F:D1:B2:76:B5:7E:57:8E:92:1C:65:82:8A:2B:ED:58:E9:F2:F2:88:05:41:34:B7:F1:F4:BF:C9:CC:74"); put("quovadisrootca2 [jdk]", -@@ -267,21 +247,7 @@ public class VerifyCACerts { +@@ -267,20 +247,7 @@ public class VerifyCACerts { + // Exception list to 90 days expiry policy + // No error will be reported if certificate in this list expires @SuppressWarnings("serial") - private static final HashSet EXPIRY_EXC_ENTRIES = new HashSet() { - { +- private static final HashSet EXPIRY_EXC_ENTRIES = new HashSet() { +- { - // Valid until: Tue Jul 09 14:40:36 EDT 2019 - add("utnuserfirstobjectca [jdk]"); - // Valid until: Sat May 30 10:38:31 GMT 2020 - add("addtrustexternalca [jdk]"); - // Valid until: Sat May 30 10:44:50 GMT 2020 - add("addtrustqualifiedca [jdk]"); -- // Valid until: Fri Jan 01 15:59:59 PST 2021 -- add("verisigntsaca [jdk]"); -- // Valid until: Fri Jan 01 15:59:59 PST 2021 -- add("thawtepremiumserverca [jdk]"); - // Valid until: Wed Mar 17 02:51:37 PDT 2021 - add("luxtrustglobalrootca [jdk]"); - // Valid until: Wed Mar 17 11:33:33 PDT 2021 - add("quovadisrootca [jdk]"); -- // Valid until: Tue Apr 06 00:29:40 PDT 2021 -+ // Valid until: Tue Apr 06 15:29:40 HKT 2021 - add("soneraclass2ca [jdk]"); - } - }; +- } +- }; ++ private static final HashSet EXPIRY_EXC_ENTRIES = new HashSet(); + + // Ninety days in milliseconds + private static final long NINETY_DAYS = 7776000000L; -- 1.8.3.1