svn commit: r463156 - in head/java/openjdk8: . files
Jung-uk Kim
jkim at FreeBSD.org
Tue Feb 27 19:49:01 UTC 2018
Author: jkim
Date: Tue Feb 27 19:49:00 2018
New Revision: 463156
URL: https://svnweb.freebsd.org/changeset/ports/463156
Log:
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 at gmail.com) (via swills)
Added:
head/java/openjdk8/files/patch-hotspot-src_cpu_zero_vm_methodHandles__zero.cpp (contents, props changed)
head/java/openjdk8/files/patch-hotspot_src_share_vm_interpreter_bytecodeInterpreter.cpp (contents, props changed)
Modified:
head/java/openjdk8/Makefile
Modified: head/java/openjdk8/Makefile
==============================================================================
--- head/java/openjdk8/Makefile Tue Feb 27 19:38:36 2018 (r463155)
+++ head/java/openjdk8/Makefile Tue Feb 27 19:49:00 2018 (r463156)
@@ -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 \
Added: head/java/openjdk8/files/patch-hotspot-src_cpu_zero_vm_methodHandles__zero.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/java/openjdk8/files/patch-hotspot-src_cpu_zero_vm_methodHandles__zero.cpp Tue Feb 27 19:49:00 2018 (r463156)
@@ -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
Added: head/java/openjdk8/files/patch-hotspot_src_share_vm_interpreter_bytecodeInterpreter.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/java/openjdk8/files/patch-hotspot_src_share_vm_interpreter_bytecodeInterpreter.cpp Tue Feb 27 19:49:00 2018 (r463156)
@@ -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) {
More information about the svn-ports-all
mailing list