diff --git a/8248336-AArch64-C2-offset-overflow-in-BoxLockNode-em.patch b/8248336-AArch64-C2-offset-overflow-in-BoxLockNode-em.patch new file mode 100755 index 0000000000000000000000000000000000000000..e16a188a0e786213c070e6791c7feb74a49868c7 --- /dev/null +++ b/8248336-AArch64-C2-offset-overflow-in-BoxLockNode-em.patch @@ -0,0 +1,45 @@ +From 3070d796490221304ef226560ad2a837c3de4401 Mon Sep 17 00:00:00 2001 +Date: Sat, 31 Oct 2020 14:17:53 +0800 +Subject: [PATCH] 8248336: AArch64: C2: offset overflow in BoxLockNode::emit + +Summary: : offset overflow in BoxLockNode::emit +LLT: jtreg +Bug url: https://bugs.openjdk.java.net/browse/JDK-8248336 +--- + src/hotspot/cpu/aarch64/aarch64.ad | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/src/hotspot/cpu/aarch64/aarch64.ad b/src/hotspot/cpu/aarch64/aarch64.ad +index 827ec9e..617b2b8 100644 +--- a/src/hotspot/cpu/aarch64/aarch64.ad ++++ b/src/hotspot/cpu/aarch64/aarch64.ad +@@ -2071,16 +2071,20 @@ void BoxLockNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { + int offset = ra_->reg2offset(in_RegMask(0).find_first_elem()); + int reg = ra_->get_encode(this); + +- if (Assembler::operand_valid_for_add_sub_immediate(offset)) { +- __ add(as_Register(reg), sp, offset); +- } else { +- ShouldNotReachHere(); +- } ++ // This add will handle any 24-bit signed offset. 24 bits allows an ++ // 8 megabyte stack frame. ++ __ add(as_Register(reg), sp, offset); + } + + uint BoxLockNode::size(PhaseRegAlloc *ra_) const { + // BoxLockNode is not a MachNode, so we can't just call MachNode::size(ra_). +- return 4; ++ int offset = ra_->reg2offset(in_RegMask(0).find_first_elem()); ++ ++ if (Assembler::operand_valid_for_add_sub_immediate(offset)) { ++ return NativeInstruction::instruction_size; ++ } else { ++ return 2 * NativeInstruction::instruction_size; ++ } + } + + //============================================================================= +-- +1.8.3.1 + diff --git a/java-11-openjdk.spec b/java-11-openjdk.spec index 37e6e7364e36f092995419b5dc73a0d4d5edcc6d..869659b6539eab09ed9f100a0d8001005c1ae136 100644 --- a/java-11-openjdk.spec +++ b/java-11-openjdk.spec @@ -735,7 +735,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release} Name: java-%{javaver}-%{origin} Version: %{newjavaver}.%{buildver} -Release: 1 +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 @@ -831,6 +831,7 @@ Patch46: ZGC-correct-free-heap-size-excluding-waste-in-rule_allocation_rate.patc Patch47: 8204947-Port-ShenandoahTaskTerminator-to-mainline-and-make-it-default.patch Patch48: 8205921-Optimizing-best_of_2-work-stealing-queue-selection.patch Patch49: 8237483-AArch64-C1-OopMap-inserted-twice-fatal-error.patch +Patch50: 8248336-AArch64-C2-offset-overflow-in-BoxLockNode-em.patch BuildRequires: autoconf @@ -1094,6 +1095,7 @@ pushd %{top_level_dir_name} %patch47 -p1 %patch48 -p1 %patch49 -p1 +%patch50 -p1 popd # openjdk %patch1000 @@ -1596,6 +1598,9 @@ require "copy_jdk_configs.lua" %changelog +* Fri Nov 6 2020 wuyan - 1:11.0.9.11-2 +- add 8248336-AArch64-C2-offset-overflow-in-BoxLockNode-em.patch + * Mon Oct 26 2020 noah - 1:11.0.9.11-1 - add 8229495-SIGILL-in-C2-generated-OSR-compilation.patch