Gathered jerboaa's and adinn's fixes ot fix rhbz#1540242
This commit is contained in:
parent
bceb750daf
commit
23b4135237
23
JDK-8195859-vtableStubs-gtest-fails-after-8174962.patch
Normal file
23
JDK-8195859-vtableStubs-gtest-fails-after-8174962.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User adinn
|
||||||
|
# Date 1516891647 0
|
||||||
|
# Thu Jan 25 14:47:27 2018 +0000
|
||||||
|
# Node ID e321560ac819c05274c59f46f5cc28ccfd4b38ec
|
||||||
|
# Parent 77baeab90732e7cfb6eb1b754a768a197bca1ab5
|
||||||
|
8195859: AArch64: vtableStubs gtest fails after 8174962
|
||||||
|
Summary: gtest vtableStubs introduced by 8174962 fails on AArch64 with an invalid insn encoding
|
||||||
|
Reviewed-by: duke
|
||||||
|
|
||||||
|
diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||||
|
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||||
|
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||||
|
@@ -1049,7 +1049,8 @@
|
||||||
|
ldr(method_result, Address(method_result, vtable_offset_in_bytes));
|
||||||
|
} else {
|
||||||
|
vtable_offset_in_bytes += vtable_index.as_constant() * wordSize;
|
||||||
|
- ldr(method_result, Address(recv_klass, vtable_offset_in_bytes));
|
||||||
|
+ ldr(method_result,
|
||||||
|
+ form_address(rscratch1, recv_klass, vtable_offset_in_bytes));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
61
JDK-8196136-correct-register-use-8195685.patch
Normal file
61
JDK-8196136-correct-register-use-8195685.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User adinn
|
||||||
|
# Date 1516881392 0
|
||||||
|
# Thu Jan 25 11:56:32 2018 +0000
|
||||||
|
# Node ID 51d97ee431ff04f126c436b25dc75de7e0d2d4dd
|
||||||
|
# Parent 2da4a52715d837b639edcfe37c66e5428c023abd
|
||||||
|
8196136: AArch64: Correct register use in patch for JDK-8195685
|
||||||
|
Summary: itable stubs must not use java argument registers as scratch registers
|
||||||
|
Reviewed-by: aph
|
||||||
|
|
||||||
|
diff --git a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
|
||||||
|
--- a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
|
||||||
|
+++ b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
|
||||||
|
@@ -64,8 +64,8 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
|
||||||
|
|
||||||
|
#ifndef PRODUCT
|
||||||
|
if (CountCompiledCalls) {
|
||||||
|
- __ lea(r19, ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
|
||||||
|
- __ incrementw(Address(r19));
|
||||||
|
+ __ lea(r16, ExternalAddress((address) SharedRuntime::nof_megamorphic_calls_addr()));
|
||||||
|
+ __ incrementw(Address(r16));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -74,13 +74,13 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
|
||||||
|
|
||||||
|
// get receiver klass
|
||||||
|
address npe_addr = __ pc();
|
||||||
|
- __ load_klass(r19, j_rarg0);
|
||||||
|
+ __ load_klass(r16, j_rarg0);
|
||||||
|
|
||||||
|
#ifndef PRODUCT
|
||||||
|
if (DebugVtables) {
|
||||||
|
Label L;
|
||||||
|
// check offset vs vtable length
|
||||||
|
- __ ldrw(rscratch1, Address(r19, InstanceKlass::vtable_length_offset() * wordSize));
|
||||||
|
+ __ ldrw(rscratch1, Address(r16, InstanceKlass::vtable_length_offset() * wordSize));
|
||||||
|
__ cmpw(rscratch1, vtable_index * vtableEntry::size());
|
||||||
|
__ br(Assembler::GT, L);
|
||||||
|
__ enter();
|
||||||
|
@@ -92,7 +92,7 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
|
||||||
|
}
|
||||||
|
#endif // PRODUCT
|
||||||
|
|
||||||
|
- __ lookup_virtual_method(r19, vtable_index, rmethod);
|
||||||
|
+ __ lookup_virtual_method(r16, vtable_index, rmethod);
|
||||||
|
|
||||||
|
if (DebugVtables) {
|
||||||
|
Label L;
|
||||||
|
@@ -145,9 +145,9 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
|
||||||
|
// rscratch2: CompiledICHolder
|
||||||
|
// j_rarg0: Receiver
|
||||||
|
|
||||||
|
- // Most registers are in use; we'll use r0, rmethod, r10, r11
|
||||||
|
+ // Most registers are in use; we'll use r16, rmethod, r10, r11
|
||||||
|
const Register recv_klass_reg = r10;
|
||||||
|
- const Register holder_klass_reg = r0; // declaring interface klass (DECC)
|
||||||
|
+ const Register holder_klass_reg = r16; // declaring interface klass (DECC)
|
||||||
|
const Register resolved_klass_reg = rmethod; // resolved interface klass (REFC)
|
||||||
|
const Register temp_reg = r11;
|
||||||
|
const Register icholder_reg = rscratch2;
|
22
JDK-8196221-mistake-in-8195859.patch
Normal file
22
JDK-8196221-mistake-in-8195859.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User adinn
|
||||||
|
# Date 1516984701 0
|
||||||
|
# Fri Jan 26 16:38:21 2018 +0000
|
||||||
|
# Node ID 2c35f60ad26425a6d1dd1071e8a5adde79154fe3
|
||||||
|
# Parent e2a7856edfbaccebd36bf02674e39b1a53867241
|
||||||
|
8196221: AArch64: Mistake in committed patch for JDK-8195859
|
||||||
|
Summary: The wrong patch was committed for JDK-8195859
|
||||||
|
Reviewed-by: duke
|
||||||
|
|
||||||
|
diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||||
|
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||||
|
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
|
||||||
|
@@ -1050,7 +1050,7 @@
|
||||||
|
} else {
|
||||||
|
vtable_offset_in_bytes += vtable_index.as_constant() * wordSize;
|
||||||
|
ldr(method_result,
|
||||||
|
- form_address(rscratch1, recv_klass, vtable_offset_in_bytes));
|
||||||
|
+ form_address(rscratch1, recv_klass, vtable_offset_in_bytes, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -937,7 +937,7 @@ Obsoletes: java-1.7.0-openjdk-accessibility%{?1}
|
|||||||
|
|
||||||
Name: java-%{javaver}-%{origin}
|
Name: java-%{javaver}-%{origin}
|
||||||
Version: %{javaver}.%{updatever}
|
Version: %{javaver}.%{updatever}
|
||||||
Release: 1.%{buildver}%{?dist}
|
Release: 5.%{buildver}%{?dist}
|
||||||
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
|
# 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
|
# 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
|
# also included the epoch in their virtual provides. This created a
|
||||||
@ -1091,6 +1091,19 @@ Patch558: 8170328-pr3466-rh1498321.patch
|
|||||||
# 8181810, PR3466, RH1498319: PPC64: Leverage extrdi for bitfield extract
|
# 8181810, PR3466, RH1498319: PPC64: Leverage extrdi for bitfield extract
|
||||||
Patch559: 8181810-pr3466-rh1498319.patch
|
Patch559: 8181810-pr3466-rh1498319.patch
|
||||||
|
|
||||||
|
# Aarch64 build fixes after January 2018 CPU
|
||||||
|
#
|
||||||
|
# JDK-8195685 AArch64 cannot build with JDK-8174962 (already included in source tarball)
|
||||||
|
# JDK-8196136 AArch64: Correct register use in patch for JDK-8195685
|
||||||
|
# JDK-8195859 AArch64: vtableStubs gtest fails after 8174962
|
||||||
|
# JDK-8196221 AArch64: Mistake in committed patch for JDK-8195859
|
||||||
|
Patch570: JDK-8196136-correct-register-use-8195685.patch
|
||||||
|
Patch571: JDK-8195859-vtableStubs-gtest-fails-after-8174962.patch
|
||||||
|
Patch572: JDK-8196221-mistake-in-8195859.patch
|
||||||
|
|
||||||
|
Patch573: rhbz_1540242.patch
|
||||||
|
Patch574: rhbz_1540242_2.patch
|
||||||
|
|
||||||
# Patches ineligible for 8u
|
# Patches ineligible for 8u
|
||||||
# 8043805: Allow using a system-installed libjpeg
|
# 8043805: Allow using a system-installed libjpeg
|
||||||
Patch201: system-libjpeg.patch
|
Patch201: system-libjpeg.patch
|
||||||
@ -1503,6 +1516,17 @@ popd
|
|||||||
%patch558
|
%patch558
|
||||||
%patch559
|
%patch559
|
||||||
|
|
||||||
|
pushd openjdk/hotspot
|
||||||
|
# Aarch64 build fixes after January 2018 CPU
|
||||||
|
%patch570 -p1
|
||||||
|
%patch571 -p1
|
||||||
|
%patch572 -p1
|
||||||
|
|
||||||
|
# Zero/AArch64 fix for RHBZ#1540242
|
||||||
|
%patch573 -p1
|
||||||
|
%patch574 -p1
|
||||||
|
popd
|
||||||
|
|
||||||
# RPM-only fixes
|
# RPM-only fixes
|
||||||
%patch525
|
%patch525
|
||||||
%patch539
|
%patch539
|
||||||
@ -1728,11 +1752,16 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Make sure gdb can do a backtrace based on line numbers on libjvm.so
|
# Make sure gdb can do a backtrace based on line numbers on libjvm.so
|
||||||
|
# javaCalls.cpp:58 should map to:
|
||||||
|
# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58
|
||||||
|
# Using line number 1 might cause build problems. See:
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1539664
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1538767
|
||||||
gdb -q "$JAVA_HOME/bin/java" <<EOF | tee gdb.out
|
gdb -q "$JAVA_HOME/bin/java" <<EOF | tee gdb.out
|
||||||
handle SIGSEGV pass nostop noprint
|
handle SIGSEGV pass nostop noprint
|
||||||
handle SIGILL pass nostop noprint
|
handle SIGILL pass nostop noprint
|
||||||
set breakpoint pending on
|
set breakpoint pending on
|
||||||
break javaCalls.cpp:1
|
break javaCalls.cpp:58
|
||||||
commands 1
|
commands 1
|
||||||
backtrace
|
backtrace
|
||||||
quit
|
quit
|
||||||
@ -2129,6 +2158,21 @@ require "copy_jdk_configs.lua"
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 31 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:1.8.0.161-5.b14
|
||||||
|
- Additional fix needed for FTBFS bug on aarch64.
|
||||||
|
Resolves RHBZ#1540242.
|
||||||
|
|
||||||
|
* Wed Jan 31 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:1.8.0.161-4.b14
|
||||||
|
- Add fix for FTBFS on aarch64 and armv7hl.
|
||||||
|
Resolves RHBZ#1540242.
|
||||||
|
|
||||||
|
* Tue Jan 30 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:1.8.0.161-3.b14
|
||||||
|
- Include Aarch64 build fixes post January 2018 CPU.
|
||||||
|
|
||||||
|
* Mon Jan 29 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:1.8.0.161-2.b14
|
||||||
|
- Work around ppc64le gdb backtrace problem in %check.
|
||||||
|
See RHBZ#1539664
|
||||||
|
|
||||||
* Wed Jan 24 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:1.8.0.161-1.b14
|
* Wed Jan 24 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:1.8.0.161-1.b14
|
||||||
- Fix FTBFS due to link failure in libfontmanager.so
|
- Fix FTBFS due to link failure in libfontmanager.so
|
||||||
- See RHBZ#1538767
|
- See RHBZ#1538767
|
||||||
|
22
rhbz_1540242.patch
Normal file
22
rhbz_1540242.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp b/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
|
||||||
|
--- a/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
|
||||||
|
+++ b/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
|
||||||
|
@@ -698,6 +698,7 @@
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
int SpinPause() {
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
|
||||||
|
diff --git a/src/os_cpu/linux_zero/vm/os_linux_zero.cpp b/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
|
||||||
|
--- a/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
|
||||||
|
+++ b/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
|
||||||
|
@@ -408,6 +408,7 @@
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
int SpinPause() {
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
59
rhbz_1540242_2.patch
Normal file
59
rhbz_1540242_2.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
diff --git a/src/cpu/aarch64/vm/assembler_aarch64.hpp b/src/cpu/aarch64/vm/assembler_aarch64.hpp
|
||||||
|
--- a/src/cpu/aarch64/vm/assembler_aarch64.hpp
|
||||||
|
+++ b/src/cpu/aarch64/vm/assembler_aarch64.hpp
|
||||||
|
@@ -2529,6 +2529,8 @@
|
||||||
|
virtual RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr,
|
||||||
|
Register tmp,
|
||||||
|
int offset) {
|
||||||
|
+ ShouldNotCallThis();
|
||||||
|
+ return RegisterOrConstant();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stack overflow checking
|
||||||
|
diff --git a/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp b/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
|
||||||
|
--- a/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
|
||||||
|
+++ b/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
|
||||||
|
@@ -209,6 +209,7 @@
|
||||||
|
|
||||||
|
Address LIR_Assembler::as_Address_hi(LIR_Address* addr) {
|
||||||
|
ShouldNotReachHere();
|
||||||
|
+ return Address();
|
||||||
|
}
|
||||||
|
|
||||||
|
Address LIR_Assembler::as_Address(LIR_Address* addr) {
|
||||||
|
diff --git a/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp b/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
|
||||||
|
--- a/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
|
||||||
|
+++ b/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
|
||||||
|
@@ -434,8 +434,8 @@
|
||||||
|
void mov(Register dst, Address a);
|
||||||
|
|
||||||
|
public:
|
||||||
|
- int push(RegSet regs, Register stack) { if (regs.bits()) push(regs.bits(), stack); }
|
||||||
|
- int pop(RegSet regs, Register stack) { if (regs.bits()) pop(regs.bits(), stack); }
|
||||||
|
+ void push(RegSet regs, Register stack) { if (regs.bits()) push(regs.bits(), stack); }
|
||||||
|
+ void pop(RegSet regs, Register stack) { if (regs.bits()) pop(regs.bits(), stack); }
|
||||||
|
|
||||||
|
// Push and pop everything that might be clobbered by a native
|
||||||
|
// runtime call except rscratch1 and rscratch2. (They are always
|
||||||
|
diff --git a/src/cpu/aarch64/vm/nativeInst_aarch64.hpp b/src/cpu/aarch64/vm/nativeInst_aarch64.hpp
|
||||||
|
--- a/src/cpu/aarch64/vm/nativeInst_aarch64.hpp
|
||||||
|
+++ b/src/cpu/aarch64/vm/nativeInst_aarch64.hpp
|
||||||
|
@@ -220,6 +220,7 @@
|
||||||
|
else if (is_ldr_literal_at(instruction_address()))
|
||||||
|
return(addr_at(4));
|
||||||
|
assert(false, "Unknown instruction in NativeMovConstReg");
|
||||||
|
+ return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
intptr_t data() const;
|
||||||
|
diff --git a/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp b/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
|
||||||
|
--- a/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
|
||||||
|
+++ b/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
|
||||||
|
@@ -472,6 +472,7 @@
|
||||||
|
err.report_and_die();
|
||||||
|
|
||||||
|
ShouldNotReachHere();
|
||||||
|
+ return true; // Mute compiler
|
||||||
|
}
|
||||||
|
|
||||||
|
void os::Linux::init_thread_fpu_state(void) {
|
Loading…
Reference in New Issue
Block a user