/hg/icedtea7: Use the IcedTea7 fork version of the AArch64 port ...

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Thu Oct 30 01:17:47 UTC 2014


changeset e811e82a1e8b in /hg/icedtea7
details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=e811e82a1e8b
author: Andrew John Hughes <gnu_andrew at member.fsf.org>
date: Thu Oct 30 01:01:39 2014 +0000

	Use the IcedTea7 fork version of the AArch64 port rather than the one based on HotSpot 25.

	2014-10-29  Andrew John Hughes  <gnu.andrew at redhat.com>

		* patches/hotspot/aarch64/systemtap_gc.patch,
		* patches/hotspot/aarch64/werror.patch:
		Removed as AArch64 port is now derived from
		IcedTea 7 forest.
		* patches/hotspot/default/systemtap_gc.patch:
		Moved to...
		* INSTALL: Update URL of AArch64 port.
		* Makefile.am:
		(ICEDTEA_PATCHES): Re-enable SystemTap GC patch.
		Add security patches for AArch64 fork.
		* NEWS: Updated.
		* hotspot.map.in:
		Update AArch64 build to tip of IcedTea7 fork.
		* patches/hotspot/aarch64/20140715-8030763-validate_global_memory_allocation.patch,
		* patches/hotspot/aarch64/20140715-8032536-jvm_resolves_wrong_method.patch,
		* patches/hotspot/aarch64/20140715-8035119-fix_exceptions_to_bytecode_verification.patch,
		* patches/hotspot/aarch64/20140715-8036800-attribute_oom_to_right_code.patch,
		* patches/hotspot/aarch64/20140715-8037076-check_constant_pool_constants.patch,
		* patches/hotspot/aarch64/20140715-8037157-verify_init_call.patch,
		* patches/hotspot/aarch64/20140715-8037167-better_method_signature_resolution.patch,
		* patches/hotspot/aarch64/20141014-8015256-better_class_accessibility.patch,
		* patches/hotspot/aarch64/20141014-8036805-correct_linker_method_lookup.patch,
		* patches/hotspot/aarch64/20141014-8038899-safer_safepoints.patch,
		* patches/hotspot/aarch64/20141014-8038903-more_native_monitor_monitoring.patch,
		* patches/hotspot/aarch64/20141014-8041717-issue_with_class_file_parser.patch,
		* patches/hotspot/aarch64/20141014-8042603-safepointpolloffset.patch,
		* patches/hotspot/aarch64/20141014-8050485-super_causes_verifyerror.patch,
		* patches/hotspot/aarch64/8051012-verifier_regression.patch:
		Backports of recent security fixes for AArch64 fork.
		* patches/systemtap_gc.patch: ...here.


diffstat:

 ChangeLog                                                                              |   33 +
 INSTALL                                                                                |    2 +-
 Makefile.am                                                                            |   21 +-
 NEWS                                                                                   |    2 +
 hotspot.map.in                                                                         |    2 +-
 patches/hotspot/aarch64/20140715-8030763-validate_global_memory_allocation.patch       |  244 ++++++
 patches/hotspot/aarch64/20140715-8032536-jvm_resolves_wrong_method.patch               |   66 +
 patches/hotspot/aarch64/20140715-8035119-fix_exceptions_to_bytecode_verification.patch |  119 +++
 patches/hotspot/aarch64/20140715-8036800-attribute_oom_to_right_code.patch             |   40 +
 patches/hotspot/aarch64/20140715-8037076-check_constant_pool_constants.patch           |   38 +
 patches/hotspot/aarch64/20140715-8037157-verify_init_call.patch                        |   25 +
 patches/hotspot/aarch64/20140715-8037167-better_method_signature_resolution.patch      |   74 +
 patches/hotspot/aarch64/20141014-8015256-better_class_accessibility.patch              |  174 ++++
 patches/hotspot/aarch64/20141014-8036805-correct_linker_method_lookup.patch            |  213 +++++
 patches/hotspot/aarch64/20141014-8038899-safer_safepoints.patch                        |   21 +
 patches/hotspot/aarch64/20141014-8038903-more_native_monitor_monitoring.patch          |   28 +
 patches/hotspot/aarch64/20141014-8041717-issue_with_class_file_parser.patch            |   33 +
 patches/hotspot/aarch64/20141014-8042603-safepointpolloffset.patch                     |   22 +
 patches/hotspot/aarch64/20141014-8050485-super_causes_verifyerror.patch                |  259 ++++++
 patches/hotspot/aarch64/8051012-verifier_regression.patch                              |  179 ++++
 patches/hotspot/aarch64/systemtap_gc.patch                                             |  373 ---------
 patches/hotspot/aarch64/werror.patch                                                   |   43 -
 patches/hotspot/default/systemtap_gc.patch                                             |  379 ----------
 patches/systemtap_gc.patch                                                             |  379 ++++++++++
 24 files changed, 1969 insertions(+), 800 deletions(-)

diffs (truncated from 2895 to 500 lines):

diff -r 810d698ffdfb -r e811e82a1e8b ChangeLog
--- a/ChangeLog	Wed Oct 29 17:18:10 2014 +0000
+++ b/ChangeLog	Thu Oct 30 01:01:39 2014 +0000
@@ -1,3 +1,36 @@
+2014-10-29  Andrew John Hughes  <gnu.andrew at redhat.com>
+
+	* patches/hotspot/aarch64/systemtap_gc.patch,
+	* patches/hotspot/aarch64/werror.patch:
+	Removed as AArch64 port is now derived from
+	IcedTea 7 forest.
+	* patches/hotspot/default/systemtap_gc.patch:
+	Moved to...
+	* INSTALL: Update URL of AArch64 port.
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Re-enable SystemTap GC patch.
+	Add security patches for AArch64 fork.
+	* NEWS: Updated.
+	* hotspot.map.in:
+	Update AArch64 build to tip of IcedTea7 fork.
+	* patches/hotspot/aarch64/20140715-8030763-validate_global_memory_allocation.patch,
+	* patches/hotspot/aarch64/20140715-8032536-jvm_resolves_wrong_method.patch,
+	* patches/hotspot/aarch64/20140715-8035119-fix_exceptions_to_bytecode_verification.patch,
+	* patches/hotspot/aarch64/20140715-8036800-attribute_oom_to_right_code.patch,
+	* patches/hotspot/aarch64/20140715-8037076-check_constant_pool_constants.patch,
+	* patches/hotspot/aarch64/20140715-8037157-verify_init_call.patch,
+	* patches/hotspot/aarch64/20140715-8037167-better_method_signature_resolution.patch,
+	* patches/hotspot/aarch64/20141014-8015256-better_class_accessibility.patch,
+	* patches/hotspot/aarch64/20141014-8036805-correct_linker_method_lookup.patch,
+	* patches/hotspot/aarch64/20141014-8038899-safer_safepoints.patch,
+	* patches/hotspot/aarch64/20141014-8038903-more_native_monitor_monitoring.patch,
+	* patches/hotspot/aarch64/20141014-8041717-issue_with_class_file_parser.patch,
+	* patches/hotspot/aarch64/20141014-8042603-safepointpolloffset.patch,
+	* patches/hotspot/aarch64/20141014-8050485-super_causes_verifyerror.patch,
+	* patches/hotspot/aarch64/8051012-verifier_regression.patch:
+	Backports of recent security fixes for AArch64 fork.
+	* patches/systemtap_gc.patch: ...here.
+
 2014-10-29  Andrew John Hughes  <gnu.andrew at redhat.com>
 
 	* Makefile.am:
diff -r 810d698ffdfb -r e811e82a1e8b INSTALL
--- a/INSTALL	Wed Oct 29 17:18:10 2014 +0000
+++ b/INSTALL	Thu Oct 30 01:01:39 2014 +0000
@@ -360,7 +360,7 @@
 Currently, IcedTea 2.x supports the 'default' HotSpot tree, which is
 part of the IcedTea forest for the particular minor release series
 being used, and 'aarch64', which uses snapshots of the AArch64 HotSpot
-port available at http://hg.openjdk.java.net/aarch64-port/jdk7u
+port available at http://icedtea.classpath.org/hg/icedtea7-forest-aarch64/hotspot/
 
 JavaScript Support
 ==================
diff -r 810d698ffdfb -r e811e82a1e8b Makefile.am
--- a/Makefile.am	Wed Oct 29 17:18:10 2014 +0000
+++ b/Makefile.am	Thu Oct 30 01:01:39 2014 +0000
@@ -269,8 +269,8 @@
 endif
 
 if ENABLE_SYSTEMTAP
-#ICEDTEA_PATCHES += \
-#	patches/hotspot/$(HSBUILD)/systemtap_gc.patch
+ICEDTEA_PATCHES += \
+	patches/systemtap_gc.patch
 endif
 
 if ENABLE_NSS
@@ -285,7 +285,22 @@
 endif
 
 if WITH_ALT_HSBUILD
-ICEDTEA_PATCHES += patches/hotspot/aarch64/werror.patch
+ICEDTEA_PATCHES += \
+	patches/hotspot/aarch64/20140715-8030763-validate_global_memory_allocation.patch \
+	patches/hotspot/aarch64/20140715-8032536-jvm_resolves_wrong_method.patch \
+	patches/hotspot/aarch64/20140715-8035119-fix_exceptions_to_bytecode_verification.patch \
+	patches/hotspot/aarch64/20140715-8036800-attribute_oom_to_right_code.patch \
+	patches/hotspot/aarch64/20140715-8037076-check_constant_pool_constants.patch \
+	patches/hotspot/aarch64/20140715-8037157-verify_init_call.patch \
+	patches/hotspot/aarch64/20140715-8037167-better_method_signature_resolution.patch \
+	patches/hotspot/aarch64/8051012-verifier_regression.patch \
+	patches/hotspot/aarch64/20141014-8015256-better_class_accessibility.patch \
+	patches/hotspot/aarch64/20141014-8036805-correct_linker_method_lookup.patch \
+	patches/hotspot/aarch64/20141014-8038899-safer_safepoints.patch \
+	patches/hotspot/aarch64/20141014-8038903-more_native_monitor_monitoring.patch \
+	patches/hotspot/aarch64/20141014-8041717-issue_with_class_file_parser.patch \
+	patches/hotspot/aarch64/20141014-8042603-safepointpolloffset.patch \
+	patches/hotspot/aarch64/20141014-8050485-super_causes_verifyerror.patch
 endif
 
 ICEDTEA_PATCHES += $(DISTRIBUTION_PATCHES)
diff -r 810d698ffdfb -r e811e82a1e8b NEWS
--- a/NEWS	Wed Oct 29 17:18:10 2014 +0000
+++ b/NEWS	Thu Oct 30 01:01:39 2014 +0000
@@ -263,6 +263,8 @@
   - PR1847: Synchronise javac.in with IcedTea6
 * CACAO
   - PR2032: CACAO lacks JVM_FindClassFromCaller introduced by security patch in 2.5.3
+* AArch64 port
+  - Use the IcedTea7 fork version rather than the one based on HotSpot 25.
 
 New in release 2.5.3 (2014-10-14):
 
diff -r 810d698ffdfb -r e811e82a1e8b hotspot.map.in
--- a/hotspot.map.in	Wed Oct 29 17:18:10 2014 +0000
+++ b/hotspot.map.in	Thu Oct 30 01:01:39 2014 +0000
@@ -1,3 +1,3 @@
 # version type(drop/hg) url changeset sha256sum
 default drop http://icedtea.classpath.org/download/drops/icedtea7/@ICEDTEA_RELEASE@ 4722cfd15c83 34c7a74382accfe66b6ff4d9868bb61daa4baa195e4aaa3cbf32f9ec9ecea31a
-aarch64 hg http://hg.openjdk.java.net/aarch64-port/jdk7u/hotspot f50993b6c38d 64c2d0bfa71d6eecf18ab28fd64d5bd79af096f77548d80de7953c306fd9c22c
+aarch64 drop http://icedtea.classpath.org/download/drops/icedtea7/@ICEDTEA_RELEASE@ 5b7dcf16fe5d 74b7d1e8eb76ab356135cbcb89474da9ba573516fc88024f40c56ff6cae31059
diff -r 810d698ffdfb -r e811e82a1e8b patches/hotspot/aarch64/20140715-8030763-validate_global_memory_allocation.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/aarch64/20140715-8030763-validate_global_memory_allocation.patch	Thu Oct 30 01:01:39 2014 +0000
@@ -0,0 +1,244 @@
+# HG changeset patch
+# User hseigel
+# Date 1392397647 18000
+#      Fri Feb 14 12:07:27 2014 -0500
+# Node ID bfcfcf77f4113196057552663b8245306e3555d8
+# Parent  1e71efaaaa5bbdeb979e9227e8df11535284f6bb
+8030763: Validate global memory allocation
+Summary: Add length checks where necessary
+Reviewed-by: coleenp, mschoene
+
+diff -r 1e71efaaaa5b -r bfcfcf77f411 src/os/bsd/vm/os_bsd.cpp
+--- openjdk/hotspot/src/os/bsd/vm/os_bsd.cpp	Wed Feb 12 16:22:48 2014 -0800
++++ openjdk/hotspot/src/os/bsd/vm/os_bsd.cpp	Fri Feb 14 12:07:27 2014 -0500
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1999, 2014, 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
+@@ -1819,9 +1819,6 @@
+   ::abort();
+ }
+ 
+-// unused on bsd for now.
+-void os::set_error_file(const char *logfile) {}
+-
+ 
+ // This method is a copy of JDK's sysGetLastErrorString
+ // from src/solaris/hpi/src/system_md.c
+@@ -2585,6 +2582,7 @@
+         // determine if this is a legacy image or modules image
+         // modules image doesn't have "jre" subdirectory
+         len = strlen(buf);
++        assert(len < buflen, "Ran out of buffer space");
+         jrelib_p = buf + len;
+ 
+         // Add the appropriate library subdir
+@@ -2620,7 +2618,7 @@
+     }
+   }
+ 
+-  strcpy(saved_jvm_path, buf);
++  strncpy(saved_jvm_path, buf, MAXPATHLEN);
+ }
+ 
+ void os::print_jni_name_prefix_on(outputStream* st, int args_size) {
+diff -r 1e71efaaaa5b -r bfcfcf77f411 src/os/linux/vm/os_linux.cpp
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp	Wed Feb 12 16:22:48 2014 -0800
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	Fri Feb 14 12:07:27 2014 -0500
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1999, 2014, 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
+@@ -1612,9 +1612,6 @@
+   ::abort();
+ }
+ 
+-// unused on linux for now.
+-void os::set_error_file(const char *logfile) {}
+-
+ 
+ // This method is a copy of JDK's sysGetLastErrorString
+ // from src/solaris/hpi/src/system_md.c
+@@ -2411,6 +2408,7 @@
+         // determine if this is a legacy image or modules image
+         // modules image doesn't have "jre" subdirectory
+         len = strlen(buf);
++        assert(len < buflen, "Ran out of buffer room");
+         jrelib_p = buf + len;
+         snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch);
+         if (0 != access(buf, F_OK)) {
+@@ -2433,7 +2431,7 @@
+     }
+   }
+ 
+-  strcpy(saved_jvm_path, buf);
++  strncpy(saved_jvm_path, buf, MAXPATHLEN);
+ }
+ 
+ void os::print_jni_name_prefix_on(outputStream* st, int args_size) {
+diff -r 1e71efaaaa5b -r bfcfcf77f411 src/os/solaris/vm/os_solaris.cpp
+--- openjdk/hotspot/src/os/solaris/vm/os_solaris.cpp	Wed Feb 12 16:22:48 2014 -0800
++++ openjdk/hotspot/src/os/solaris/vm/os_solaris.cpp	Fri Feb 14 12:07:27 2014 -0500
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1997, 2014, 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
+@@ -1877,9 +1877,6 @@
+   ::abort(); // dump core (for debugging)
+ }
+ 
+-// unused
+-void os::set_error_file(const char *logfile) {}
+-
+ // DLL functions
+ 
+ const char* os::dll_file_extension() { return ".so"; }
+@@ -2561,6 +2558,7 @@
+         // determine if this is a legacy image or modules image
+         // modules image doesn't have "jre" subdirectory
+         len = strlen(buf);
++        assert(len < buflen, "Ran out of buffer space");
+         jrelib_p = buf + len;
+         snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch);
+         if (0 != access(buf, F_OK)) {
+@@ -2581,7 +2579,7 @@
+     }
+   }
+ 
+-  strcpy(saved_jvm_path, buf);
++  strncpy(saved_jvm_path, buf, MAXPATHLEN);
+ }
+ 
+ 
+diff -r 1e71efaaaa5b -r bfcfcf77f411 src/os/windows/vm/os_windows.cpp
+--- openjdk/hotspot/src/os/windows/vm/os_windows.cpp	Wed Feb 12 16:22:48 2014 -0800
++++ openjdk/hotspot/src/os/windows/vm/os_windows.cpp	Fri Feb 14 12:07:27 2014 -0500
+@@ -1773,27 +1773,28 @@
+      // libjvm.so is installed there (append a fake suffix
+      // hotspot/libjvm.so).
+      char* java_home_var = ::getenv("JAVA_HOME");
+-     if (java_home_var != NULL && java_home_var[0] != 0) {
+-
+-        strncpy(buf, java_home_var, buflen);
+-
+-        // determine if this is a legacy image or modules image
+-        // modules image doesn't have "jre" subdirectory
+-        size_t len = strlen(buf);
+-        char* jrebin_p = buf + len;
+-        jio_snprintf(jrebin_p, buflen-len, "\\jre\\bin\\");
+-        if (0 != _access(buf, 0)) {
+-          jio_snprintf(jrebin_p, buflen-len, "\\bin\\");
+-        }
+-        len = strlen(buf);
+-        jio_snprintf(buf + len, buflen-len, "hotspot\\jvm.dll");
++     if (java_home_var != NULL && java_home_var[0] != 0 &&
++         strlen(java_home_var) < (size_t)buflen) {
++
++       strncpy(buf, java_home_var, buflen);
++
++       // determine if this is a legacy image or modules image
++       // modules image doesn't have "jre" subdirectory
++       size_t len = strlen(buf);
++       char* jrebin_p = buf + len;
++       jio_snprintf(jrebin_p, buflen-len, "\\jre\\bin\\");
++       if (0 != _access(buf, 0)) {
++         jio_snprintf(jrebin_p, buflen-len, "\\bin\\");
++       }
++       len = strlen(buf);
++       jio_snprintf(buf + len, buflen-len, "hotspot\\jvm.dll");
+      }
+   }
+ 
+   if(buf[0] == '\0') {
+-  GetModuleFileName(vm_lib_handle, buf, buflen);
+-  }
+-  strcpy(saved_jvm_path, buf);
++    GetModuleFileName(vm_lib_handle, buf, buflen);
++  }
++  strncpy(saved_jvm_path, buf, MAX_PATH);
+ }
+ 
+ 
+@@ -2218,17 +2219,6 @@
+ #endif //_WIN64
+ 
+ 
+-// Fatal error reporting is single threaded so we can make this a
+-// static and preallocated.  If it's more than MAX_PATH silently ignore
+-// it.
+-static char saved_error_file[MAX_PATH] = {0};
+-
+-void os::set_error_file(const char *logfile) {
+-  if (strlen(logfile) <= MAX_PATH) {
+-    strncpy(saved_error_file, logfile, MAX_PATH);
+-  }
+-}
+-
+ static inline void report_error(Thread* t, DWORD exception_code,
+                                 address addr, void* siginfo, void* context) {
+   VMError err(t, exception_code, addr, siginfo, context);
+diff -r 1e71efaaaa5b -r bfcfcf77f411 src/share/vm/compiler/compileBroker.cpp
+--- openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp	Wed Feb 12 16:22:48 2014 -0800
++++ openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp	Fri Feb 14 12:07:27 2014 -0500
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1999, 2014, 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
+@@ -1921,6 +1921,7 @@
+   ResourceMark rm;
+   char* method_name = method->name()->as_C_string();
+   strncpy(_last_method_compiled, method_name, CompileBroker::name_buffer_length);
++  _last_method_compiled[CompileBroker::name_buffer_length - 1] = '\0'; // ensure null terminated
+   char current_method[CompilerCounters::cmname_buffer_length];
+   size_t maxLen = CompilerCounters::cmname_buffer_length;
+ 
+diff -r 1e71efaaaa5b -r bfcfcf77f411 src/share/vm/runtime/os.hpp
+--- openjdk/hotspot/src/share/vm/runtime/os.hpp	Wed Feb 12 16:22:48 2014 -0800
++++ openjdk/hotspot/src/share/vm/runtime/os.hpp	Fri Feb 14 12:07:27 2014 -0500
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1997, 2014, 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
+@@ -460,9 +460,6 @@
+   // run cmd in a separate process and return its exit code; or -1 on failures
+   static int fork_and_exec(char *cmd);
+ 
+-  // Set file to send error reports.
+-  static void set_error_file(const char *logfile);
+-
+   // os::exit() is merged with vm_exit()
+   // static void exit(int num);
+ 
+diff -r 1e71efaaaa5b -r bfcfcf77f411 src/share/vm/utilities/vmError.cpp
+--- openjdk/hotspot/src/share/vm/utilities/vmError.cpp	Wed Feb 12 16:22:48 2014 -0800
++++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp	Fri Feb 14 12:07:27 2014 -0500
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2003, 2014, 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
+@@ -951,7 +951,6 @@
+       if (fd != -1) {
+         out.print_raw("# An error report file with more information is saved as:\n# ");
+         out.print_raw_cr(buffer);
+-        os::set_error_file(buffer);
+ 
+         log.set_fd(fd);
+       } else {
diff -r 810d698ffdfb -r e811e82a1e8b patches/hotspot/aarch64/20140715-8032536-jvm_resolves_wrong_method.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/aarch64/20140715-8032536-jvm_resolves_wrong_method.patch	Thu Oct 30 01:01:39 2014 +0000
@@ -0,0 +1,66 @@
+# HG changeset patch
+# User hseigel
+# Date 1393966688 18000
+#      Tue Mar 04 15:58:08 2014 -0500
+# Node ID 6670d25b0255d9fdad7fa444f86706ccd6deaccb
+# Parent  bbe9be4ea0d4ad2f7cef759171e1731084078f7e
+8032536: JVM resolves wrong method in some unusual cases
+Summary: Handle package private case
+Reviewed-by: coleenp, acorn, jdn
+
+diff -r bbe9be4ea0d4 -r 6670d25b0255 src/share/vm/oops/klassVtable.cpp
+--- openjdk/hotspot/src/share/vm/oops/klassVtable.cpp	Thu Feb 27 13:00:19 2014 -0800
++++ openjdk/hotspot/src/share/vm/oops/klassVtable.cpp	Tue Mar 04 15:58:08 2014 -0500
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1997, 2014, 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
+@@ -209,6 +209,17 @@
+ // For bytecodes not produced by javac together it is possible that a method does not override
+ // the superclass's method, but might indirectly override a super-super class's vtable entry
+ // If none found, return a null superk, else return the superk of the method this does override
++// For public and protected methods: if they override a superclass, they will
++// also be overridden themselves appropriately.
++// Private methods do not override and are not overridden.
++// Package Private methods are trickier:
++// e.g. P1.A, pub m
++// P2.B extends A, package private m
++// P1.C extends B, public m
++// P1.C.m needs to override P1.A.m and can not override P2.B.m
++// Therefore: all package private methods need their own vtable entries for
++// them to be the root of an inheritance overriding decision
++// Package private methods may also override other vtable entries
+ instanceKlass* klassVtable::find_transitive_override(instanceKlass* initialsuper, methodHandle target_method,
+                             int vtable_index, Handle target_loader, Symbol* target_classname, Thread * THREAD) {
+   instanceKlass* superk = initialsuper;
+@@ -310,8 +321,12 @@
+       ((klass->major_version() >= VTABLE_TRANSITIVE_OVERRIDE_VERSION)
+         && ((super_klass = find_transitive_override(super_klass, target_method, i, target_loader,
+              target_classname, THREAD)) != (instanceKlass*)NULL))) {
+-        // overriding, so no new entry
+-        allocate_new = false;
++
++        // Package private methods always need a new entry to root their own
++        // overriding. They may also override other methods.
++        if (!target_method()->is_package_private()) {
++          allocate_new = false;
++        }
+ 
+         if (checkconstraints) {
+         // Override vtable entry if passes loader constraint check
+@@ -433,6 +448,12 @@
+     return true;
+   }
+ 
++  // Package private methods always need a new entry to root their own
++  // overriding. This allows transitive overriding to work.
++  if (target_method()->is_package_private()) {
++    return true;
++  }
++
+   // search through the super class hierarchy to see if we need
+   // a new entry
+   ResourceMark rm;
diff -r 810d698ffdfb -r e811e82a1e8b patches/hotspot/aarch64/20140715-8035119-fix_exceptions_to_bytecode_verification.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/aarch64/20140715-8035119-fix_exceptions_to_bytecode_verification.patch	Thu Oct 30 01:01:39 2014 +0000
@@ -0,0 +1,119 @@
+# HG changeset patch
+# User hseigel
+# Date 1395266649 14400
+#      Wed Mar 19 18:04:09 2014 -0400
+# Node ID 458f18560343240fdd8002937d5930ca77f3e12f
+# Parent  c650f71b9c677cac304ce64be1e3959c018ebd8b
+8035119: Fix exceptions to bytecode verification
+Summary: Prevent ctor calls to super() and this() from avoidable code (try blocks, if stmts, etc.)
+Reviewed-by: coleenp, acorn, mschoene
+
+diff -r c650f71b9c67 -r 458f18560343 src/share/vm/classfile/stackMapTable.cpp
+--- openjdk/hotspot/src/share/vm/classfile/stackMapTable.cpp	Wed Mar 19 14:18:19 2014 -0400
++++ openjdk/hotspot/src/share/vm/classfile/stackMapTable.cpp	Wed Mar 19 18:04:09 2014 -0400
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2003, 2014, 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
+@@ -134,6 +134,7 @@
+   }
+   // check if uninitialized objects exist on backward branches
+   check_new_object(frame, target, CHECK_VERIFY(frame->verifier()));
++  frame->verifier()->update_furthest_jump(target);
+ }
+ 
+ void StackMapTable::check_new_object(
+diff -r c650f71b9c67 -r 458f18560343 src/share/vm/classfile/verifier.cpp
+--- openjdk/hotspot/src/share/vm/classfile/verifier.cpp	Wed Mar 19 14:18:19 2014 -0400
++++ openjdk/hotspot/src/share/vm/classfile/verifier.cpp	Wed Mar 19 18:04:09 2014 -0400
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1998, 2014, 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
+@@ -629,6 +629,9 @@
+   bool no_control_flow = false; // Set to true when there is no direct control
+                                 // flow from current instruction to the next
+                                 // instruction in sequence
++
++  set_furthest_jump(0);
++
+   Bytecodes::Code opcode;
+   while (!bcs.is_last_bytecode()) {
+     // Check for recursive re-verification before each bytecode.
+@@ -2239,6 +2242,29 @@
+           "Bad <init> method call");
+       return;
+     }
++
++    // Make sure that this call is not jumped over.
++    if (bci < furthest_jump()) {
++      verify_error(ErrorContext::bad_code(bci),
++                   "Bad <init> method call from inside of a branch");
++      return;
++    }
++
++    // Make sure that this call is not done from within a TRY block because
++    // that can result in returning an incomplete object.  Simply checking
++    // (bci >= start_pc) also ensures that this call is not done after a TRY
++    // block.  That is also illegal because this call must be the first Java
++    // statement in the constructor.
++    ExceptionTable exhandlers(_method());
++    int exlength = exhandlers.length();
++    for(int i = 0; i < exlength; i++) {


More information about the distro-pkg-dev mailing list