aboutsummaryrefslogtreecommitdiffstats
path: root/java/openjdk8
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2018-02-28 03:49:00 +0800
committerjkim <jkim@FreeBSD.org>2018-02-28 03:49:00 +0800
commit29ecfd47a7bc0b926b18cf4c7e3922cc1c7a0947 (patch)
treee2bb12f673ea166f7cd5e279a2eb07ff8d83e1e4 /java/openjdk8
parentad51fd5ec5ee36d2dc938a147d95f6d96bd5b99d (diff)
downloadfreebsd-ports-gnome-29ecfd47a7bc0b926b18cf4c7e3922cc1c7a0947.tar.gz
freebsd-ports-gnome-29ecfd47a7bc0b926b18cf4c7e3922cc1c7a0947.tar.zst
freebsd-ports-gnome-29ecfd47a7bc0b926b18cf4c7e3922cc1c7a0947.zip
Apply an upstream patch to fix Zero.
http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/8bd024c567e7 This patch complements the following commits. http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f8a45a60bc6b http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/b1606443958a http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/a3e756231625 Reported by: Mikaƫl Urankar (mikael.urankar@gmail.com) (via swills)
Diffstat (limited to 'java/openjdk8')
-rw-r--r--java/openjdk8/Makefile1
-rw-r--r--java/openjdk8/files/patch-hotspot-src_cpu_zero_vm_methodHandles__zero.cpp12
-rw-r--r--java/openjdk8/files/patch-hotspot_src_share_vm_interpreter_bytecodeInterpreter.cpp50
3 files changed, 63 insertions, 0 deletions
diff --git a/java/openjdk8/Makefile b/java/openjdk8/Makefile
index 3175031e8db2..1ca08d6e0a04 100644
--- a/java/openjdk8/Makefile
+++ b/java/openjdk8/Makefile
@@ -2,6 +2,7 @@
PORTNAME= openjdk
PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//}
+PORTREVISION= 1
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}/promoted/b${DIST_BUILD_NUMBER}/:jdk \
https://adopt-openjdk.ci.cloudbees.com/job/jtreg/${JTREG_JENKINS_BUILD}/artifact/:jtreg \
diff --git a/java/openjdk8/files/patch-hotspot-src_cpu_zero_vm_methodHandles__zero.cpp b/java/openjdk8/files/patch-hotspot-src_cpu_zero_vm_methodHandles__zero.cpp
new file mode 100644
index 000000000000..abb4e5554244
--- /dev/null
+++ b/java/openjdk8/files/patch-hotspot-src_cpu_zero_vm_methodHandles__zero.cpp
@@ -0,0 +1,12 @@
+--- hotspot/src/cpu/zero/vm/methodHandles_zero.cpp.orig
++++ hotspot/src/cpu/zero/vm/methodHandles_zero.cpp
+@@ -180,3 +180,9 @@ address MethodHandles::generate_method_handle_interpre
+ return NULL;
+ }
+ }
++
++#ifndef PRODUCT
++void MethodHandles::trace_method_handle(MacroAssembler* _masm, const char* adaptername) {
++ // This is just a stub.
++}
++#endif //PRODUCT
diff --git a/java/openjdk8/files/patch-hotspot_src_share_vm_interpreter_bytecodeInterpreter.cpp b/java/openjdk8/files/patch-hotspot_src_share_vm_interpreter_bytecodeInterpreter.cpp
new file mode 100644
index 000000000000..a6bfa31d5dd0
--- /dev/null
+++ b/java/openjdk8/files/patch-hotspot_src_share_vm_interpreter_bytecodeInterpreter.cpp
@@ -0,0 +1,50 @@
+--- hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp.orig
++++ hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
+@@ -2569,13 +2569,35 @@ run:
+
+ // this could definitely be cleaned up QQQ
+ Method* callee;
+- Klass* iclass = cache->f1_as_klass();
+- // InstanceKlass* interface = (InstanceKlass*) iclass;
++ Method *interface_method = cache->f2_as_interface_method();
++ InstanceKlass* iclass = interface_method->method_holder();
++
+ // get receiver
+ int parms = cache->parameter_size();
+ oop rcvr = STACK_OBJECT(-parms);
+ CHECK_NULL(rcvr);
+ InstanceKlass* int2 = (InstanceKlass*) rcvr->klass();
++
++ // Receiver subtype check against resolved interface klass (REFC).
++ {
++ Klass* refc = cache->f1_as_klass();
++ itableOffsetEntry* scan;
++ for (scan = (itableOffsetEntry*) int2->start_of_itable();
++ scan->interface_klass() != NULL;
++ scan++) {
++ if (scan->interface_klass() == refc) {
++ break;
++ }
++ }
++ // Check that the entry is non-null. A null entry means
++ // that the receiver class doesn't implement the
++ // interface, and wasn't the same as when the caller was
++ // compiled.
++ if (scan->interface_klass() == NULL) {
++ VM_JAVA_ERROR(vmSymbols::java_lang_IncompatibleClassChangeError(), "", note_no_trap);
++ }
++ }
++
+ itableOffsetEntry* ki = (itableOffsetEntry*) int2->start_of_itable();
+ int i;
+ for ( i = 0 ; i < int2->itable_length() ; i++, ki++ ) {
+@@ -2587,7 +2609,8 @@ run:
+ if (i == int2->itable_length()) {
+ VM_JAVA_ERROR(vmSymbols::java_lang_IncompatibleClassChangeError(), "", note_no_trap);
+ }
+- int mindex = cache->f2_as_index();
++ int mindex = interface_method->itable_index();
++
+ itableMethodEntry* im = ki->first_method_entry(rcvr->klass());
+ callee = im[mindex].method();
+ if (callee == NULL) {