From 77e66b3cef2baa991cabc05295eba3ed192835cb2976b1a54176d947ed73b7d5 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 7 Oct 2014 06:27:04 +0000 Subject: [PATCH 1/9] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-1_8_0-openjdk?expand=0&rev=27 --- java-1_8_0-openjdk.changes | 6 ++++++ java-1_8_0-openjdk.spec | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/java-1_8_0-openjdk.changes b/java-1_8_0-openjdk.changes index edb740a..c8dd64e 100644 --- a/java-1_8_0-openjdk.changes +++ b/java-1_8_0-openjdk.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 7 06:25:32 UTC 2014 - fstrba@suse.com + +- Force Zero VM for aarch64, since from the beginning we did not + manage to finish a build of Hotspot for this architecture. + ------------------------------------------------------------------- Thu Oct 2 14:57:03 UTC 2014 - fstrba@suse.com diff --git a/java-1_8_0-openjdk.spec b/java-1_8_0-openjdk.spec index f231e10..5763eeb 100644 --- a/java-1_8_0-openjdk.spec +++ b/java-1_8_0-openjdk.spec @@ -18,7 +18,7 @@ %global debug 0 %global bootcycle 1 -%global jit_arches %ix86 x86_64 aarch64 ppc64 ppc64le +%global jit_arches %ix86 x86_64 ppc64 ppc64le %global buildoutputdir build # Convert an absolute path to a relative path. Each symbolic link is # specified relative to the directory in which it is installed so that @@ -64,6 +64,9 @@ # real file made by update-ca-certificates %global javacacerts %{_var}/lib/ca-certificates/java-cacerts %{!?aarch64:%global aarch64 aarch64 arm64 armv8} +%ifnarch %{jit_arches} +%global _with_zero 1 +%endif %ifarch x86_64 %global archinstall amd64 %endif @@ -124,6 +127,7 @@ %else %global with_pulseaudio 0 %endif +%bcond_with zero %if %{with_systemtap} # Where to install systemtap tapset (links) # We would like these to be in a package specific subdir, @@ -400,10 +404,14 @@ need to. %setup -q -n %{root_repository}-%{root_revision} %setup -q -D -n %{root_repository}-%{root_revision} -T -a 1 %ifarch %{aarch64} +%if ! %{with zero} %setup -q -D -n %{root_repository}-%{root_revision} -T -a 8 %else %setup -q -D -n %{root_repository}-%{root_revision} -T -a 2 %endif +%else +%setup -q -D -n %{root_repository}-%{root_revision} -T -a 2 +%endif %setup -q -D -n %{root_repository}-%{root_revision} -T -a 3 %setup -q -D -n %{root_repository}-%{root_revision} -T -a 4 %setup -q -D -n %{root_repository}-%{root_revision} -T -a 5 @@ -419,10 +427,14 @@ pwd mv corba-%{corba_revision} corba %ifarch %{aarch64} +%if ! %{with zero} mv hotspot-%{aarch64_hotspot_revision} hotspot %else mv hotspot-%{hotspot_revision} hotspot %endif +%else +mv hotspot-%{hotspot_revision} hotspot +%endif mv jaxp-%{jaxp_revision} jaxp mv jaxws-%{jaxws_revision} jaxws mv jdk-%{jdk_revision} jdk @@ -542,7 +554,7 @@ mkdir -p %{buildoutputdir} pushd %{buildoutputdir} bash ../configure \ -%ifnarch %{jit_arches} +%if %{with zero} --with-jvm-variants=zero \ %endif --disable-zip-debug-info \ From ed935dd5ecf66a756ecef3b4d9b4e156d56368166ed3bc917ff104230e7fbf42 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 9 Oct 2014 10:01:38 +0000 Subject: [PATCH 2/9] Remove hunk that might not be needed anymore OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-1_8_0-openjdk?expand=0&rev=28 --- aarch64-misc.patch | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/aarch64-misc.patch b/aarch64-misc.patch index a1074fb..c4031ef 100644 --- a/aarch64-misc.patch +++ b/aarch64-misc.patch @@ -1,18 +1,6 @@ --- jdk8/common/autoconf/jdk-options.m4 2014-06-18 21:34:07.000000000 +0200 +++ jdk8/common/autoconf/jdk-options.m4 2014-07-09 16:03:01.156813855 +0200 -@@ -117,11 +117,6 @@ - JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` - JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'` - -- if test "x$JVM_VARIANT_CLIENT" = xtrue; then -- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then -- AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) -- fi -- fi - if test "x$JVM_VARIANT_KERNEL" = xtrue; then - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.]) -@@ -161,6 +156,9 @@ +@@ -161,6 +161,9 @@ if test "x$VAR_CPU" = xppc64 ; then INCLUDE_SA=false fi From 6bc07581e067a266b34bfa48b3e3a464331601ca7cae45f105fb2a36b0b7666e Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 9 Oct 2014 16:41:00 +0000 Subject: [PATCH 3/9] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-1_8_0-openjdk?expand=0&rev=29 --- java-1_8_0-openjdk.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/java-1_8_0-openjdk.spec b/java-1_8_0-openjdk.spec index 5763eeb..d136e51 100644 --- a/java-1_8_0-openjdk.spec +++ b/java-1_8_0-openjdk.spec @@ -404,14 +404,10 @@ need to. %setup -q -n %{root_repository}-%{root_revision} %setup -q -D -n %{root_repository}-%{root_revision} -T -a 1 %ifarch %{aarch64} -%if ! %{with zero} %setup -q -D -n %{root_repository}-%{root_revision} -T -a 8 %else %setup -q -D -n %{root_repository}-%{root_revision} -T -a 2 %endif -%else -%setup -q -D -n %{root_repository}-%{root_revision} -T -a 2 -%endif %setup -q -D -n %{root_repository}-%{root_revision} -T -a 3 %setup -q -D -n %{root_repository}-%{root_revision} -T -a 4 %setup -q -D -n %{root_repository}-%{root_revision} -T -a 5 @@ -427,14 +423,10 @@ pwd mv corba-%{corba_revision} corba %ifarch %{aarch64} -%if ! %{with zero} mv hotspot-%{aarch64_hotspot_revision} hotspot %else mv hotspot-%{hotspot_revision} hotspot %endif -%else -mv hotspot-%{hotspot_revision} hotspot -%endif mv jaxp-%{jaxp_revision} jaxp mv jaxws-%{jaxws_revision} jaxws mv jdk-%{jdk_revision} jdk From 534aee54b3cfb22adefdc1269788695afcde0583b3f8bef056dbc744da99edfb Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 13 Oct 2014 10:33:04 +0000 Subject: [PATCH 4/9] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-1_8_0-openjdk?expand=0&rev=30 --- 064adeb65ce8.tar.bz2 | 3 +++ 0958d0a9f44e.tar.bz2 | 3 +++ 0f0d70abca09.tar.bz2 | 3 --- 26529be4ae77.tar.bz2 | 3 +++ 304ea93428f8.tar.bz2 | 3 --- 515a912fb5a9.tar.bz2 | 3 --- 641eb6543c71.tar.bz2 | 3 --- 68cf8e406ce5.tar.bz2 | 3 --- 6a8ecdeae4a9.tar.bz2 | 3 +++ 7ff8d51e0d8f.tar.bz2 | 3 +++ 89551828b279.tar.bz2 | 3 --- 8bb38a350722.tar.bz2 | 3 +++ 8d4971881c66.tar.bz2 | 3 --- 905a16825d29.tar.bz2 | 3 --- b2bf0d45c617.tar.bz2 | 3 +++ bf87d7191166.tar.bz2 | 3 +++ c45c0ee41600.tar.bz2 | 3 +++ d3515520e68e.tar.bz2 | 3 --- java-1_8_0-openjdk.spec | 20 ++++++++++---------- 19 files changed, 37 insertions(+), 37 deletions(-) create mode 100644 064adeb65ce8.tar.bz2 create mode 100644 0958d0a9f44e.tar.bz2 delete mode 100644 0f0d70abca09.tar.bz2 create mode 100644 26529be4ae77.tar.bz2 delete mode 100644 304ea93428f8.tar.bz2 delete mode 100644 515a912fb5a9.tar.bz2 delete mode 100644 641eb6543c71.tar.bz2 delete mode 100644 68cf8e406ce5.tar.bz2 create mode 100644 6a8ecdeae4a9.tar.bz2 create mode 100644 7ff8d51e0d8f.tar.bz2 delete mode 100644 89551828b279.tar.bz2 create mode 100644 8bb38a350722.tar.bz2 delete mode 100644 8d4971881c66.tar.bz2 delete mode 100644 905a16825d29.tar.bz2 create mode 100644 b2bf0d45c617.tar.bz2 create mode 100644 bf87d7191166.tar.bz2 create mode 100644 c45c0ee41600.tar.bz2 delete mode 100644 d3515520e68e.tar.bz2 diff --git a/064adeb65ce8.tar.bz2 b/064adeb65ce8.tar.bz2 new file mode 100644 index 0000000..6a953c7 --- /dev/null +++ b/064adeb65ce8.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbbeab4fe743484f2258e22dc835522dd14cf78f95db184ee9aa0c5d79023bd8 +size 45320550 diff --git a/0958d0a9f44e.tar.bz2 b/0958d0a9f44e.tar.bz2 new file mode 100644 index 0000000..c494d95 --- /dev/null +++ b/0958d0a9f44e.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8c341e3655318356612b586c695ef7059ad2a9922d926802d7090cf2f54dd15 +size 394783 diff --git a/0f0d70abca09.tar.bz2 b/0f0d70abca09.tar.bz2 deleted file mode 100644 index 868b144..0000000 --- a/0f0d70abca09.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:507d054f33a0d14101b431542d89e751746aad256b4b5a55119433e2fa0a2c14 -size 45323371 diff --git a/26529be4ae77.tar.bz2 b/26529be4ae77.tar.bz2 new file mode 100644 index 0000000..784580f --- /dev/null +++ b/26529be4ae77.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd1ce23a625b48ca878bb92cd6f494b82672a790dd2aef4490260bc6d469da1a +size 2528605 diff --git a/304ea93428f8.tar.bz2 b/304ea93428f8.tar.bz2 deleted file mode 100644 index 7b00f6a..0000000 --- a/304ea93428f8.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ba84c638e36d2e15b6b5a3e4bbd92f20f87f5c257fcb91322e2deeec7bde531 -size 2528293 diff --git a/515a912fb5a9.tar.bz2 b/515a912fb5a9.tar.bz2 deleted file mode 100644 index 6dec85c..0000000 --- a/515a912fb5a9.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9265323b9235712422f976d48acabf080096f6321e89024dbc6b276a98a4754a -size 394596 diff --git a/641eb6543c71.tar.bz2 b/641eb6543c71.tar.bz2 deleted file mode 100644 index 1f1d6b9..0000000 --- a/641eb6543c71.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:34edd3ce6b7960b0de78be1d85616b1c690900190145c397087cb25940da6658 -size 2728630 diff --git a/68cf8e406ce5.tar.bz2 b/68cf8e406ce5.tar.bz2 deleted file mode 100644 index ef41613..0000000 --- a/68cf8e406ce5.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d405018cdc2d9e5c9d83854e5c9faf4c770bfa5d3e6790f6390ba0776d8284a9 -size 7974071 diff --git a/6a8ecdeae4a9.tar.bz2 b/6a8ecdeae4a9.tar.bz2 new file mode 100644 index 0000000..9a59050 --- /dev/null +++ b/6a8ecdeae4a9.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31f547af1429105d02c96b7359de6ccbeefa18e0d155d0dbb6fb8796f85d8983 +size 2726307 diff --git a/7ff8d51e0d8f.tar.bz2 b/7ff8d51e0d8f.tar.bz2 new file mode 100644 index 0000000..1ed2206 --- /dev/null +++ b/7ff8d51e0d8f.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72125e30d759fdc7c73542ddb37bb8252ac1f35cccad71167054e4e8be8170de +size 7720159 diff --git a/89551828b279.tar.bz2 b/89551828b279.tar.bz2 deleted file mode 100644 index 4e42336..0000000 --- a/89551828b279.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ccf3c71e61228ac6d66ff17c112d33ad4689cda8b89da1823a651199d630469 -size 2725854 diff --git a/8bb38a350722.tar.bz2 b/8bb38a350722.tar.bz2 new file mode 100644 index 0000000..0a4a3a6 --- /dev/null +++ b/8bb38a350722.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14898e043b744bf416c754eb459ddcad491197408028d9df868b00fd58dc9efd +size 2363158 diff --git a/8d4971881c66.tar.bz2 b/8d4971881c66.tar.bz2 deleted file mode 100644 index 7955de8..0000000 --- a/8d4971881c66.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:685cfd9d9e186634ffe5f86db9736afa226473047c20ba4b934d882b13064ca9 -size 1018605 diff --git a/905a16825d29.tar.bz2 b/905a16825d29.tar.bz2 deleted file mode 100644 index 87fab7a..0000000 --- a/905a16825d29.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c6636300635e257855ff720678a000629002d1e972dbbf6bc30a8e385e1a4c3 -size 7717595 diff --git a/b2bf0d45c617.tar.bz2 b/b2bf0d45c617.tar.bz2 new file mode 100644 index 0000000..744dfd9 --- /dev/null +++ b/b2bf0d45c617.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd3fc9af207845ed6cbba37c0b17e66d61e5dcaa3cccf95daca6c841e53f3ecc +size 7973897 diff --git a/bf87d7191166.tar.bz2 b/bf87d7191166.tar.bz2 new file mode 100644 index 0000000..d56ed0a --- /dev/null +++ b/bf87d7191166.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb45bfb81ed4ad2692ef291841c819c28acea4a09df4ce8f6b9478b7fa5bd4ef +size 1018206 diff --git a/c45c0ee41600.tar.bz2 b/c45c0ee41600.tar.bz2 new file mode 100644 index 0000000..9c47be2 --- /dev/null +++ b/c45c0ee41600.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b39ea016b22d7d97ad06d56e791f87746efd0c70e3148f30d79541f24a05fb7b +size 2728589 diff --git a/d3515520e68e.tar.bz2 b/d3515520e68e.tar.bz2 deleted file mode 100644 index 88c2b02..0000000 --- a/d3515520e68e.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15678d81e2d83e3f74d19fd821438a89ca841e9cc2cd0638cda4e51e27a7bff2 -size 2363731 diff --git a/java-1_8_0-openjdk.spec b/java-1_8_0-openjdk.spec index d136e51..a0e058b 100644 --- a/java-1_8_0-openjdk.spec +++ b/java-1_8_0-openjdk.spec @@ -29,20 +29,20 @@ %global archname %{name} # Standard JPackage naming and versioning defines. %global updatever 40 -%global buildver b08 +%global buildver b09 %global root_project jdk8u %global root_repository jdk8u -%global root_revision 515a912fb5a9 -%global corba_revision 8d4971881c66 -%global hotspot_revision 905a16825d29 -%global jaxp_revision 641eb6543c71 -%global jaxws_revision 304ea93428f8 -%global jdk_revision 0f0d70abca09 -%global langtools_revision d3515520e68e -%global nashorn_revision 89551828b279 +%global root_revision 0958d0a9f44e +%global corba_revision bf87d7191166 +%global hotspot_revision 7ff8d51e0d8f +%global jaxp_revision c45c0ee41600 +%global jaxws_revision 26529be4ae77 +%global jdk_revision 064adeb65ce8 +%global langtools_revision 8bb38a350722 +%global nashorn_revision 6a8ecdeae4a9 %global aarch64_project aarch64-port %global aarch64_repository jdk8 -%global aarch64_hotspot_revision 68cf8e406ce5 +%global aarch64_hotspot_revision b2bf0d45c617 %global icedtea_sound_version 1.0.1 # priority must be 6 digits in total %global priority 180%{updatever} From 2ee7b6986509f1a69f96d32640678f44baa9ae7e5a444332fbcdd3f1c5f207ee Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 14 Oct 2014 06:13:37 +0000 Subject: [PATCH 5/9] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-1_8_0-openjdk?expand=0&rev=31 --- 89ebbc29144c.tar.bz2 | 3 +++ b2bf0d45c617.tar.bz2 | 3 --- java-1_8_0-openjdk.spec | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 89ebbc29144c.tar.bz2 delete mode 100644 b2bf0d45c617.tar.bz2 diff --git a/89ebbc29144c.tar.bz2 b/89ebbc29144c.tar.bz2 new file mode 100644 index 0000000..f16907f --- /dev/null +++ b/89ebbc29144c.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2540a45adb61386193e27133397b181dcbc9e9aed182cee3d509fe33ce1c73a +size 8011443 diff --git a/b2bf0d45c617.tar.bz2 b/b2bf0d45c617.tar.bz2 deleted file mode 100644 index 744dfd9..0000000 --- a/b2bf0d45c617.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd3fc9af207845ed6cbba37c0b17e66d61e5dcaa3cccf95daca6c841e53f3ecc -size 7973897 diff --git a/java-1_8_0-openjdk.spec b/java-1_8_0-openjdk.spec index a0e058b..71e9646 100644 --- a/java-1_8_0-openjdk.spec +++ b/java-1_8_0-openjdk.spec @@ -42,7 +42,7 @@ %global nashorn_revision 6a8ecdeae4a9 %global aarch64_project aarch64-port %global aarch64_repository jdk8 -%global aarch64_hotspot_revision b2bf0d45c617 +%global aarch64_hotspot_revision 89ebbc29144c %global icedtea_sound_version 1.0.1 # priority must be 6 digits in total %global priority 180%{updatever} From 5958bb69de7e2208598507a658fea919ce8b53ff7f2158cbea695b357c2d28ed Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 16 Oct 2014 19:32:22 +0000 Subject: [PATCH 6/9] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-1_8_0-openjdk?expand=0&rev=32 --- java-1_8_0-openjdk.spec | 51 ++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/java-1_8_0-openjdk.spec b/java-1_8_0-openjdk.spec index 71e9646..b95ccdd 100644 --- a/java-1_8_0-openjdk.spec +++ b/java-1_8_0-openjdk.spec @@ -16,9 +16,10 @@ # +%{!?aarch64:%global aarch64 aarch64 arm64 armv8} +%global jit_arches %ix86 x86_64 ppc64 ppc64le %global debug 0 %global bootcycle 1 -%global jit_arches %ix86 x86_64 ppc64 ppc64le %global buildoutputdir build # Convert an absolute path to a relative path. Each symbolic link is # specified relative to the directory in which it is installed so that @@ -63,10 +64,6 @@ %global cacerts %{_jvmdir}/%{jredir}/lib/security/cacerts # real file made by update-ca-certificates %global javacacerts %{_var}/lib/ca-certificates/java-cacerts -%{!?aarch64:%global aarch64 aarch64 arm64 armv8} -%ifnarch %{jit_arches} -%global _with_zero 1 -%endif %ifarch x86_64 %global archinstall amd64 %endif @@ -117,10 +114,8 @@ %global imagesdir images %global imagestarget images %endif -%ifarch %{jit_arches} -%global with_systemtap 1 -%else -%global with_systemtap 0 +%ifnarch %{jit_arches} +%global _with_zero 1 %endif %if 0%{?suse_version} >= 1140 %global with_pulseaudio 1 @@ -128,6 +123,20 @@ %global with_pulseaudio 0 %endif %bcond_with zero +# Turn on/off some features depending on openSUSE version +%if 0%{?suse_version} >= 1130 +%if ! %{with zero} +%global with_systemtap 1 +%else +%global with_systemtap 0 +%endif +%else +%global with_systemtap 0 +%endif +%if %{with_systemtap} +%global tapsetroot %{_datadir}/systemtap +%global tapsetdir %{tapsetroot}/tapset/%{_build_cpu} +%endif %if %{with_systemtap} # Where to install systemtap tapset (links) # We would like these to be in a package specific subdir, @@ -221,15 +230,10 @@ BuildRequires: cups-devel BuildRequires: desktop-file-utils BuildRequires: fdupes BuildRequires: fontconfig -BuildRequires: freetype-devel +BuildRequires: freetype2-devel BuildRequires: gcc-c++ BuildRequires: giflib-devel BuildRequires: gtk2-devel -BuildRequires: libX11-devel -BuildRequires: libXi-devel -BuildRequires: libXinerama-devel -BuildRequires: libXt-devel -BuildRequires: libXtst-devel BuildRequires: libjpeg-devel BuildRequires: liblcms2-devel BuildRequires: libpng-devel @@ -259,6 +263,19 @@ Provides: jre-openjdk = %{version}-%{release} # Standard JPackage extensions provides. Provides: java-fonts = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build +# Zero-assembler build requirement. +%if %{with zero} +BuildRequires: libffi-devel +%endif +%if 0%{?suse_version} <= 1130 +BuildRequires: xorg-x11-devel +%else +BuildRequires: libX11-devel +BuildRequires: libXi-devel +BuildRequires: libXinerama-devel +BuildRequires: libXt-devel +BuildRequires: libXtst-devel +%endif %ifarch %ix86 ppc Provides: jre-32 = %{javaver} %endif @@ -270,10 +287,6 @@ BuildRequires: java-bootstrap-devel >= 1.6.0 %else BuildRequires: java-devel >= %{javaver} %endif -# Zero-assembler build requirement. -%ifnarch %{jit_arches} -BuildRequires: libffi-devel -%endif # runtime certificates generation available in 11.3+ - bnc#596177 %if 0%{?suse_version} >= 1130 BuildRequires: java-ca-certificates From 4e307b9266c8cfae286452822661e28bca1b38e5535bff095f3141c38443ecd4 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 16 Oct 2014 20:14:49 +0000 Subject: [PATCH 7/9] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-1_8_0-openjdk?expand=0&rev=33 --- java-1_8_0-openjdk.changes | 10 +++++++++ java-1_8_0-openjdk.spec | 44 +++++++++++++++++++++++++++++--------- 2 files changed, 44 insertions(+), 10 deletions(-) diff --git a/java-1_8_0-openjdk.changes b/java-1_8_0-openjdk.changes index c8dd64e..4e1b58f 100644 --- a/java-1_8_0-openjdk.changes +++ b/java-1_8_0-openjdk.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Oct 16 20:07:56 UTC 2014 - fstrba@suse.com + +- Allow building for SLE11 + * Conditionalize BuildRequires + * Conditionalize cxxflags not understood by gcc 4.3 + * Conditionalize javadoc noarch build for distributions that + understand the per-package BuildArch +- Try to make the jre-32 and jre-64 provides more automatic + ------------------------------------------------------------------- Tue Oct 7 06:25:32 UTC 2014 - fstrba@suse.com diff --git a/java-1_8_0-openjdk.spec b/java-1_8_0-openjdk.spec index b95ccdd..6ba0c9d 100644 --- a/java-1_8_0-openjdk.spec +++ b/java-1_8_0-openjdk.spec @@ -64,6 +64,15 @@ %global cacerts %{_jvmdir}/%{jredir}/lib/security/cacerts # real file made by update-ca-certificates %global javacacerts %{_var}/lib/ca-certificates/java-cacerts +# turn zero on non jit arches by default +%ifnarch %{jit_arches} +%global _with_zero 1 +%endif +%if 0%{?suse_version} >= 1140 +%global with_pulseaudio 1 +%else +%global with_pulseaudio 0 +%endif %ifarch x86_64 %global archinstall amd64 %endif @@ -117,10 +126,13 @@ %ifnarch %{jit_arches} %global _with_zero 1 %endif -%if 0%{?suse_version} >= 1140 -%global with_pulseaudio 1 -%else -%global with_pulseaudio 0 +# bnc#542545 +# 32-bit versus 64-bit specific provides: +%ifarch %ix86 ppc s390 +%global bits 32 +%endif +%ifarch x86_64 ia64 s390x +%global bits 64 %endif %bcond_with zero # Turn on/off some features depending on openSUSE version @@ -276,12 +288,6 @@ BuildRequires: libXinerama-devel BuildRequires: libXt-devel BuildRequires: libXtst-devel %endif -%ifarch %ix86 ppc -Provides: jre-32 = %{javaver} -%endif -%ifarch x86_64 -Provides: jre-64 = %{javaver} -%endif %if %{bootcycle} BuildRequires: java-bootstrap-devel >= 1.6.0 %else @@ -340,6 +346,20 @@ Provides: jndi-dns = %{version} Provides: jndi-ldap = %{version} Provides: jndi-rmi = %{version} Provides: jsse = %{version} +# Required at least by fop +Provides: java-%{bits} = %{javaver} +Provides: java-%{javaver}-%{bits} +Provides: java-openjdk-%{bits} = %{version}-%{release} +Provides: jre-%{bits} = %{javaver} +Provides: jre-%{javaver}-%{bits} +Provides: jre-%{javaver}-openjdk-%{bits} = %{version}-%{release} +Provides: jre-openjdk-%{bits} = %{version}-%{release} +Provides: jre1.3.x +Provides: jre1.4.x +Provides: jre1.5.x +Provides: jre1.6.x +Provides: jre1.7.x +Provides: jre1.8.x %description headless The OpenJDK runtime environment without audio and video support. @@ -392,7 +412,9 @@ Requires(postun): update-alternatives # Standard JPackage javadoc provides. Provides: java-%{javaver}-javadoc = %{version}-%{release} Provides: java-javadoc = %{version}-%{release} +%if 0%{?suse_version} >= 1120 BuildArch: noarch +%endif %description javadoc The OpenJDK API documentation. @@ -577,8 +599,10 @@ bash ../configure \ %ifnarch %{arm} --with-num-cores="$NUM_PROC" \ %endif +%if 0%{?suse_version} >= 1120 --with-extra-cflags="-fno-devirtualize" \ --with-extra-cxxflags="-fno-devirtualize" +%endif # The combination of FULL_DEBUG_SYMBOLS=0 and ALT_OBJCOPY=/does_not_exist # disables FDS for all build configs and reverts to pre-FDS make logic. From 5e09ca4581403c130156d81c29289995569e887d8d0b81710b90e96cc4fcaa85 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 16 Oct 2014 21:00:52 +0000 Subject: [PATCH 8/9] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-1_8_0-openjdk?expand=0&rev=34 --- java-1_8_0-openjdk.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/java-1_8_0-openjdk.spec b/java-1_8_0-openjdk.spec index 6ba0c9d..f7cdefe 100644 --- a/java-1_8_0-openjdk.spec +++ b/java-1_8_0-openjdk.spec @@ -601,8 +601,9 @@ bash ../configure \ %endif %if 0%{?suse_version} >= 1120 --with-extra-cflags="-fno-devirtualize" \ - --with-extra-cxxflags="-fno-devirtualize" + --with-extra-cxxflags="-fno-devirtualize" \ %endif + --with-boot-jdk=%{_sysconfdir}/alternatives/java_sdk # The combination of FULL_DEBUG_SYMBOLS=0 and ALT_OBJCOPY=/does_not_exist # disables FDS for all build configs and reverts to pre-FDS make logic. @@ -682,7 +683,11 @@ if [ -f "$ZERO_JVM" ] ; then fi %install -STRIP_KEEP_SYMTAB=libjvm* +export LANG=en_US.UTF-8 +#bnc#530046 +export STRIP_KEEP_SYMTAB=libjvm* +# skip /usr/lib/rpm/brp-check-bytecode-version: +export NO_BRP_CHECK_BYTECODE_VERSION=true %if %{with_systemtap} # Install systemtap support files. From 5a35d814a4f2475cbe5a2d0973e53f8682d61ad36cfae56e28138bd90512b08d Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Fri, 17 Oct 2014 07:35:43 +0000 Subject: [PATCH 9/9] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/java-1_8_0-openjdk?expand=0&rev=35 --- 064adeb65ce8.tar.bz2 | 3 - 076b1f38a5cc.tar.bz2 | 3 + 0958d0a9f44e.tar.bz2 | 3 - 1053aeab6b12.tar.bz2 | 3 + 1b3abbeee961.tar.bz2 | 3 + 1f5248bc0714.tar.bz2 | 3 + 26529be4ae77.tar.bz2 | 3 - 337fb10bc4da.tar.bz2 | 3 + 3ac6832f7901.tar.bz2 | 3 + 69b84370397f.tar.bz2 | 3 + 6a8ecdeae4a9.tar.bz2 | 3 - 7ff8d51e0d8f.tar.bz2 | 3 - 89ebbc29144c.tar.bz2 | 3 - 8bb38a350722.tar.bz2 | 3 - a6d92ff8b962.tar.bz2 | 3 + aarch64-jdk8u40-b09_b10.patch | 1371 +++++++++++++++++++++++++++++++++ bf87d7191166.tar.bz2 | 3 - c3a4729c70fa.tar.bz2 | 3 + c45c0ee41600.tar.bz2 | 3 - java-1_8_0-openjdk.changes | 12 + java-1_8_0-openjdk.spec | 53 +- 21 files changed, 1439 insertions(+), 51 deletions(-) delete mode 100644 064adeb65ce8.tar.bz2 create mode 100644 076b1f38a5cc.tar.bz2 delete mode 100644 0958d0a9f44e.tar.bz2 create mode 100644 1053aeab6b12.tar.bz2 create mode 100644 1b3abbeee961.tar.bz2 create mode 100644 1f5248bc0714.tar.bz2 delete mode 100644 26529be4ae77.tar.bz2 create mode 100644 337fb10bc4da.tar.bz2 create mode 100644 3ac6832f7901.tar.bz2 create mode 100644 69b84370397f.tar.bz2 delete mode 100644 6a8ecdeae4a9.tar.bz2 delete mode 100644 7ff8d51e0d8f.tar.bz2 delete mode 100644 89ebbc29144c.tar.bz2 delete mode 100644 8bb38a350722.tar.bz2 create mode 100644 a6d92ff8b962.tar.bz2 create mode 100644 aarch64-jdk8u40-b09_b10.patch delete mode 100644 bf87d7191166.tar.bz2 create mode 100644 c3a4729c70fa.tar.bz2 delete mode 100644 c45c0ee41600.tar.bz2 diff --git a/064adeb65ce8.tar.bz2 b/064adeb65ce8.tar.bz2 deleted file mode 100644 index 6a953c7..0000000 --- a/064adeb65ce8.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cbbeab4fe743484f2258e22dc835522dd14cf78f95db184ee9aa0c5d79023bd8 -size 45320550 diff --git a/076b1f38a5cc.tar.bz2 b/076b1f38a5cc.tar.bz2 new file mode 100644 index 0000000..905fe9f --- /dev/null +++ b/076b1f38a5cc.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c85a790e49cb105077c35a64e2309da971779581d6863d53791e43ea69dfd46 +size 2679991 diff --git a/0958d0a9f44e.tar.bz2 b/0958d0a9f44e.tar.bz2 deleted file mode 100644 index c494d95..0000000 --- a/0958d0a9f44e.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a8c341e3655318356612b586c695ef7059ad2a9922d926802d7090cf2f54dd15 -size 394783 diff --git a/1053aeab6b12.tar.bz2 b/1053aeab6b12.tar.bz2 new file mode 100644 index 0000000..ccbd8c5 --- /dev/null +++ b/1053aeab6b12.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0daeea9e2b1b6c1d6da4b78dfb48a5f5708556ee4aaea24594abded8b37f09c5 +size 395359 diff --git a/1b3abbeee961.tar.bz2 b/1b3abbeee961.tar.bz2 new file mode 100644 index 0000000..0a74664 --- /dev/null +++ b/1b3abbeee961.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e14556e4b72da49d135717c0e8b37c67f7062604a2561f858df9b95c1ef22104 +size 7723010 diff --git a/1f5248bc0714.tar.bz2 b/1f5248bc0714.tar.bz2 new file mode 100644 index 0000000..b8765dc --- /dev/null +++ b/1f5248bc0714.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17382fb6b9207555b23ff97424e765ec32b7efbb0c4da1afe1e6071d2924e723 +size 2728575 diff --git a/26529be4ae77.tar.bz2 b/26529be4ae77.tar.bz2 deleted file mode 100644 index 784580f..0000000 --- a/26529be4ae77.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cd1ce23a625b48ca878bb92cd6f494b82672a790dd2aef4490260bc6d469da1a -size 2528605 diff --git a/337fb10bc4da.tar.bz2 b/337fb10bc4da.tar.bz2 new file mode 100644 index 0000000..fb9b432 --- /dev/null +++ b/337fb10bc4da.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99c9b9dcd235cce986804ca1cb8beb4d274ab58cdff4964adb0c5b57df48acba +size 2529174 diff --git a/3ac6832f7901.tar.bz2 b/3ac6832f7901.tar.bz2 new file mode 100644 index 0000000..949c87e --- /dev/null +++ b/3ac6832f7901.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d55516ac8d1f34d5a0e933eeecdd0e62a9c4b8c5c7baf1c7d24b895a22a626bf +size 8012765 diff --git a/69b84370397f.tar.bz2 b/69b84370397f.tar.bz2 new file mode 100644 index 0000000..a494b52 --- /dev/null +++ b/69b84370397f.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43c24a99b6050d07cec0fc9c87c94d38b676e6d9fd47f1498787c2e655358cf5 +size 2364515 diff --git a/6a8ecdeae4a9.tar.bz2 b/6a8ecdeae4a9.tar.bz2 deleted file mode 100644 index 9a59050..0000000 --- a/6a8ecdeae4a9.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:31f547af1429105d02c96b7359de6ccbeefa18e0d155d0dbb6fb8796f85d8983 -size 2726307 diff --git a/7ff8d51e0d8f.tar.bz2 b/7ff8d51e0d8f.tar.bz2 deleted file mode 100644 index 1ed2206..0000000 --- a/7ff8d51e0d8f.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72125e30d759fdc7c73542ddb37bb8252ac1f35cccad71167054e4e8be8170de -size 7720159 diff --git a/89ebbc29144c.tar.bz2 b/89ebbc29144c.tar.bz2 deleted file mode 100644 index f16907f..0000000 --- a/89ebbc29144c.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2540a45adb61386193e27133397b181dcbc9e9aed182cee3d509fe33ce1c73a -size 8011443 diff --git a/8bb38a350722.tar.bz2 b/8bb38a350722.tar.bz2 deleted file mode 100644 index 0a4a3a6..0000000 --- a/8bb38a350722.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14898e043b744bf416c754eb459ddcad491197408028d9df868b00fd58dc9efd -size 2363158 diff --git a/a6d92ff8b962.tar.bz2 b/a6d92ff8b962.tar.bz2 new file mode 100644 index 0000000..654d4c4 --- /dev/null +++ b/a6d92ff8b962.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:679c7d67f5d9c9183892502d03362e798698294e79b1f63a0f565e2ae459cc7d +size 1018872 diff --git a/aarch64-jdk8u40-b09_b10.patch b/aarch64-jdk8u40-b09_b10.patch new file mode 100644 index 0000000..cbd7d8e --- /dev/null +++ b/aarch64-jdk8u40-b09_b10.patch @@ -0,0 +1,1371 @@ +--- hotspot/make/bsd/makefiles/mapfile-vers-debug 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/make/bsd/makefiles/mapfile-vers-debug 2014-10-16 18:26:51.011957985 +0200 +@@ -82,6 +82,7 @@ + _JVM_EnableCompiler + _JVM_Exit + _JVM_FillInStackTrace ++ _JVM_FindClassFromCaller + _JVM_FindClassFromClass + _JVM_FindClassFromClassLoader + _JVM_FindClassFromBootLoader +--- hotspot/make/bsd/makefiles/mapfile-vers-product 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/make/bsd/makefiles/mapfile-vers-product 2014-10-16 18:26:51.011957985 +0200 +@@ -82,6 +82,7 @@ + _JVM_EnableCompiler + _JVM_Exit + _JVM_FillInStackTrace ++ _JVM_FindClassFromCaller + _JVM_FindClassFromClass + _JVM_FindClassFromClassLoader + _JVM_FindClassFromBootLoader +--- hotspot/make/linux/makefiles/mapfile-vers-debug 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/make/linux/makefiles/mapfile-vers-debug 2014-10-16 18:26:51.011957985 +0200 +@@ -84,6 +84,7 @@ + JVM_EnableCompiler; + JVM_Exit; + JVM_FillInStackTrace; ++ JVM_FindClassFromCaller; + JVM_FindClassFromClass; + JVM_FindClassFromClassLoader; + JVM_FindClassFromBootLoader; +--- hotspot/make/linux/makefiles/mapfile-vers-product 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/make/linux/makefiles/mapfile-vers-product 2014-10-16 18:26:51.011957985 +0200 +@@ -84,6 +84,7 @@ + JVM_EnableCompiler; + JVM_Exit; + JVM_FillInStackTrace; ++ JVM_FindClassFromCaller; + JVM_FindClassFromClass; + JVM_FindClassFromClassLoader; + JVM_FindClassFromBootLoader; +--- hotspot/make/solaris/makefiles/mapfile-vers 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/make/solaris/makefiles/mapfile-vers 2014-10-16 18:26:51.012957962 +0200 +@@ -84,6 +84,7 @@ + JVM_EnableCompiler; + JVM_Exit; + JVM_FillInStackTrace; ++ JVM_FindClassFromCaller; + JVM_FindClassFromClass; + JVM_FindClassFromClassLoader; + JVM_FindClassFromBootLoader; +--- hotspot/src/share/vm/c1/c1_LIRGenerator.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/c1/c1_LIRGenerator.cpp 2014-10-16 18:26:51.013957939 +0200 +@@ -2082,14 +2082,14 @@ + LIR_Opr base_op = base.result(); + LIR_Opr index_op = idx.result(); + #ifndef _LP64 +- if (x->base()->type()->tag() == longTag) { ++ if (base_op->type() == T_LONG) { + base_op = new_register(T_INT); + __ convert(Bytecodes::_l2i, base.result(), base_op); + } + if (x->has_index()) { +- if (x->index()->type()->tag() == longTag) { ++ if (index_op->type() == T_LONG) { + LIR_Opr long_index_op = index_op; +- if (x->index()->type()->is_constant()) { ++ if (index_op->is_constant()) { + long_index_op = new_register(T_LONG); + __ move(index_op, long_index_op); + } +@@ -2104,14 +2104,14 @@ + assert(!x->has_index() || index_op->type() == T_INT, "index should be an int"); + #else + if (x->has_index()) { +- if (x->index()->type()->tag() == intTag) { +- if (!x->index()->type()->is_constant()) { ++ if (index_op->type() == T_INT) { ++ if (!index_op->is_constant()) { + index_op = new_register(T_LONG); + __ convert(Bytecodes::_i2l, idx.result(), index_op); + } + } else { +- assert(x->index()->type()->tag() == longTag, "must be"); +- if (x->index()->type()->is_constant()) { ++ assert(index_op->type() == T_LONG, "must be"); ++ if (index_op->is_constant()) { + index_op = new_register(T_LONG); + __ move(idx.result(), index_op); + } +@@ -2192,12 +2192,12 @@ + LIR_Opr index_op = idx.result(); + + #ifndef _LP64 +- if (x->base()->type()->tag() == longTag) { ++ if (base_op->type() == T_LONG) { + base_op = new_register(T_INT); + __ convert(Bytecodes::_l2i, base.result(), base_op); + } + if (x->has_index()) { +- if (x->index()->type()->tag() == longTag) { ++ if (index_op->type() == T_LONG) { + index_op = new_register(T_INT); + __ convert(Bytecodes::_l2i, idx.result(), index_op); + } +@@ -2207,7 +2207,7 @@ + assert(!x->has_index() || (index_op->type() == T_INT && !index_op->is_constant()), "index should be an non-constant int"); + #else + if (x->has_index()) { +- if (x->index()->type()->tag() == intTag) { ++ if (index_op->type() == T_INT) { + index_op = new_register(T_LONG); + __ convert(Bytecodes::_i2l, idx.result(), index_op); + } +--- hotspot/src/share/vm/classfile/classFileParser.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/classfile/classFileParser.cpp 2014-10-16 18:26:51.015957893 +0200 +@@ -2830,6 +2830,11 @@ + "bootstrap_method_index %u has bad constant type in class file %s", + bootstrap_method_index, + CHECK); ++ ++ guarantee_property((operand_fill_index + 1 + argument_count) < operands->length(), ++ "Invalid BootstrapMethods num_bootstrap_methods or num_bootstrap_arguments value in class file %s", ++ CHECK); ++ + operands->at_put(operand_fill_index++, bootstrap_method_index); + operands->at_put(operand_fill_index++, argument_count); + +@@ -2847,7 +2852,6 @@ + } + + assert(operand_fill_index == operands->length(), "exact fill"); +- assert(ConstantPool::operand_array_length(operands) == attribute_array_length, "correct decode"); + + u1* current_end = cfs->current(); + guarantee_property(current_end == current_start + attribute_byte_length, +--- hotspot/src/share/vm/classfile/classLoader.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/classfile/classLoader.cpp 2014-10-16 18:26:51.016957871 +0200 +@@ -90,6 +90,7 @@ + typedef jboolean (JNICALL *ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf); + typedef jboolean (JNICALL *ReadMappedEntry_t)(jzfile *zip, jzentry *entry, unsigned char **buf, char *namebuf); + typedef jzentry* (JNICALL *GetNextEntry_t)(jzfile *zip, jint n); ++typedef jint (JNICALL *Crc32_t)(jint crc, const jbyte *buf, jint len); + + static ZipOpen_t ZipOpen = NULL; + static ZipClose_t ZipClose = NULL; +@@ -98,6 +99,7 @@ + static ReadMappedEntry_t ReadMappedEntry = NULL; + static GetNextEntry_t GetNextEntry = NULL; + static canonicalize_fn_t CanonicalizeEntry = NULL; ++static Crc32_t Crc32 = NULL; + + // Globals + +@@ -810,9 +812,11 @@ + ReadEntry = CAST_TO_FN_PTR(ReadEntry_t, os::dll_lookup(handle, "ZIP_ReadEntry")); + ReadMappedEntry = CAST_TO_FN_PTR(ReadMappedEntry_t, os::dll_lookup(handle, "ZIP_ReadMappedEntry")); + GetNextEntry = CAST_TO_FN_PTR(GetNextEntry_t, os::dll_lookup(handle, "ZIP_GetNextEntry")); ++ Crc32 = CAST_TO_FN_PTR(Crc32_t, os::dll_lookup(handle, "ZIP_CRC32")); + + // ZIP_Close is not exported on Windows in JDK5.0 so don't abort if ZIP_Close is NULL +- if (ZipOpen == NULL || FindEntry == NULL || ReadEntry == NULL || GetNextEntry == NULL) { ++ if (ZipOpen == NULL || FindEntry == NULL || ReadEntry == NULL || ++ GetNextEntry == NULL || Crc32 == NULL) { + vm_exit_during_initialization("Corrupted ZIP library", path); + } + +@@ -822,6 +826,11 @@ + // This lookup only works on 1.3. Do not check for non-null here + } + ++int ClassLoader::crc32(int crc, const char* buf, int len) { ++ assert(Crc32 != NULL, "ZIP_CRC32 is not found"); ++ return (*Crc32)(crc, (const jbyte*)buf, len); ++} ++ + // PackageInfo data exists in order to support the java.lang.Package + // class. A Package object provides information about a java package + // (version, vendor, etc.) which originates in the manifest of the jar +--- hotspot/src/share/vm/classfile/classLoader.hpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/classfile/classLoader.hpp 2014-10-16 18:26:51.016957871 +0200 +@@ -228,6 +228,7 @@ + // to avoid confusing the zip library + static bool get_canonical_path(const char* orig, char* out, int len); + public: ++ static int crc32(int crc, const char* buf, int len); + static bool update_class_path_entry_list(const char *path, + bool check_for_duplicates, + bool throw_exception=true); +--- hotspot/src/share/vm/classfile/stackMapFrame.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/classfile/stackMapFrame.cpp 2014-10-16 18:26:51.016957871 +0200 +@@ -148,7 +148,7 @@ + VerificationType* from, VerificationType* to, int32_t len, TRAPS) const { + int32_t i = 0; + for (i = 0; i < len; i++) { +- if (!to[i].is_assignable_from(from[i], verifier(), THREAD)) { ++ if (!to[i].is_assignable_from(from[i], verifier(), false, THREAD)) { + break; + } + } +@@ -245,7 +245,7 @@ + } + VerificationType top = _stack[--_stack_size]; + bool subtype = type.is_assignable_from( +- top, verifier(), CHECK_(VerificationType::bogus_type())); ++ top, verifier(), false, CHECK_(VerificationType::bogus_type())); + if (!subtype) { + verifier()->verify_error( + ErrorContext::bad_type(_offset, stack_top_ctx(), +@@ -265,7 +265,7 @@ + return VerificationType::bogus_type(); + } + bool subtype = type.is_assignable_from(_locals[index], +- verifier(), CHECK_(VerificationType::bogus_type())); ++ verifier(), false, CHECK_(VerificationType::bogus_type())); + if (!subtype) { + verifier()->verify_error( + ErrorContext::bad_type(_offset, +@@ -288,14 +288,14 @@ + "get long/double overflows locals"); + return; + } +- bool subtype = type1.is_assignable_from(_locals[index], verifier(), CHECK); ++ bool subtype = type1.is_assignable_from(_locals[index], verifier(), false, CHECK); + if (!subtype) { + verifier()->verify_error( + ErrorContext::bad_type(_offset, + TypeOrigin::local(index, this), TypeOrigin::implicit(type1)), + "Bad local variable type"); + } else { +- subtype = type2.is_assignable_from(_locals[index + 1], verifier(), CHECK); ++ subtype = type2.is_assignable_from(_locals[index + 1], verifier(), false, CHECK); + if (!subtype) { + /* Unreachable? All local store routines convert a split long or double + * into a TOP during the store. So we should never end up seeing an +--- hotspot/src/share/vm/classfile/stackMapFrame.hpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/classfile/stackMapFrame.hpp 2014-10-16 18:26:51.017957848 +0200 +@@ -234,7 +234,7 @@ + if (_stack_size != 0) { + VerificationType top = _stack[_stack_size - 1]; + bool subtype = type.is_assignable_from( +- top, verifier(), CHECK_(VerificationType::bogus_type())); ++ top, verifier(), false, CHECK_(VerificationType::bogus_type())); + if (subtype) { + --_stack_size; + return top; +@@ -249,9 +249,9 @@ + assert(type2.is_long() || type2.is_double(), "must be long/double_2"); + if (_stack_size >= 2) { + VerificationType top1 = _stack[_stack_size - 1]; +- bool subtype1 = type1.is_assignable_from(top1, verifier(), CHECK); ++ bool subtype1 = type1.is_assignable_from(top1, verifier(), false, CHECK); + VerificationType top2 = _stack[_stack_size - 2]; +- bool subtype2 = type2.is_assignable_from(top2, verifier(), CHECK); ++ bool subtype2 = type2.is_assignable_from(top2, verifier(), false, CHECK); + if (subtype1 && subtype2) { + _stack_size -= 2; + return; +--- hotspot/src/share/vm/classfile/verificationType.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/classfile/verificationType.cpp 2014-10-16 18:26:51.017957848 +0200 +@@ -42,7 +42,8 @@ + } + + bool VerificationType::is_reference_assignable_from( +- const VerificationType& from, ClassVerifier* context, TRAPS) const { ++ const VerificationType& from, ClassVerifier* context, ++ bool from_field_is_protected, TRAPS) const { + instanceKlassHandle klass = context->current_class(); + if (from.is_null()) { + // null is assignable to any reference +@@ -62,9 +63,11 @@ + Handle(THREAD, klass->protection_domain()), true, CHECK_false); + KlassHandle this_class(THREAD, obj); + +- if (this_class->is_interface()) { +- // We treat interfaces as java.lang.Object, including +- // java.lang.Cloneable and java.io.Serializable ++ if (this_class->is_interface() && (!from_field_is_protected || ++ from.name() != vmSymbols::java_lang_Object())) { ++ // If we are not trying to access a protected field or method in ++ // java.lang.Object then we treat interfaces as java.lang.Object, ++ // including java.lang.Cloneable and java.io.Serializable. + return true; + } else if (from.is_object()) { + Klass* from_class = SystemDictionary::resolve_or_fail( +@@ -76,7 +79,8 @@ + VerificationType comp_this = get_component(context, CHECK_false); + VerificationType comp_from = from.get_component(context, CHECK_false); + if (!comp_this.is_bogus() && !comp_from.is_bogus()) { +- return comp_this.is_assignable_from(comp_from, context, CHECK_false); ++ return comp_this.is_assignable_from(comp_from, context, ++ from_field_is_protected, CHECK_false); + } + } + return false; +--- hotspot/src/share/vm/classfile/verificationType.hpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/classfile/verificationType.hpp 2014-10-16 18:26:51.017957848 +0200 +@@ -265,7 +265,8 @@ + // is assignable to another. Returns true if one can assign 'from' to + // this. + bool is_assignable_from( +- const VerificationType& from, ClassVerifier* context, TRAPS) const { ++ const VerificationType& from, ClassVerifier* context, ++ bool from_field_is_protected, TRAPS) const { + if (equals(from) || is_bogus()) { + return true; + } else { +@@ -286,7 +287,9 @@ + return from.is_integer(); + default: + if (is_reference() && from.is_reference()) { +- return is_reference_assignable_from(from, context, CHECK_false); ++ return is_reference_assignable_from(from, context, ++ from_field_is_protected, ++ CHECK_false); + } else { + return false; + } +@@ -308,7 +311,8 @@ + private: + + bool is_reference_assignable_from( +- const VerificationType&, ClassVerifier*, TRAPS) const; ++ const VerificationType&, ClassVerifier*, bool from_field_is_protected, ++ TRAPS) const; + }; + + #endif // SHARE_VM_CLASSFILE_VERIFICATIONTYPE_HPP +--- hotspot/src/share/vm/classfile/verifier.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/classfile/verifier.cpp 2014-10-16 18:26:51.018957825 +0200 +@@ -1737,7 +1737,7 @@ + VerificationType throwable = + VerificationType::reference_type(vmSymbols::java_lang_Throwable()); + bool is_subclass = throwable.is_assignable_from( +- catch_type, this, CHECK_VERIFY(this)); ++ catch_type, this, false, CHECK_VERIFY(this)); + if (!is_subclass) { + // 4286534: should throw VerifyError according to recent spec change + verify_error(ErrorContext::bad_type(handler_pc, +@@ -2192,7 +2192,7 @@ + stack_object_type = current_type(); + } + is_assignable = target_class_type.is_assignable_from( +- stack_object_type, this, CHECK_VERIFY(this)); ++ stack_object_type, this, false, CHECK_VERIFY(this)); + if (!is_assignable) { + verify_error(ErrorContext::bad_type(bci, + current_frame->stack_top_ctx(), +@@ -2219,7 +2219,7 @@ + // It's protected access, check if stack object is assignable to + // current class. + is_assignable = current_type().is_assignable_from( +- stack_object_type, this, CHECK_VERIFY(this)); ++ stack_object_type, this, true, CHECK_VERIFY(this)); + if (!is_assignable) { + verify_error(ErrorContext::bad_type(bci, + current_frame->stack_top_ctx(), +@@ -2492,7 +2492,7 @@ + instanceKlassHandle mh(THREAD, m->method_holder()); + if (m->is_protected() && !mh->is_same_class_package(_klass())) { + bool assignable = current_type().is_assignable_from( +- objectref_type, this, CHECK_VERIFY(this)); ++ objectref_type, this, true, CHECK_VERIFY(this)); + if (!assignable) { + verify_error(ErrorContext::bad_type(bci, + TypeOrigin::cp(new_class_index, objectref_type), +@@ -2667,11 +2667,11 @@ + bool have_imr_indirect = cp->tag_at(index).value() == JVM_CONSTANT_InterfaceMethodref; + if (!current_class()->is_anonymous()) { + subtype = ref_class_type.is_assignable_from( +- current_type(), this, CHECK_VERIFY(this)); ++ current_type(), this, false, CHECK_VERIFY(this)); + } else { + VerificationType host_klass_type = + VerificationType::reference_type(current_class()->host_klass()->name()); +- subtype = ref_class_type.is_assignable_from(host_klass_type, this, CHECK_VERIFY(this)); ++ subtype = ref_class_type.is_assignable_from(host_klass_type, this, false, CHECK_VERIFY(this)); + + // If invokespecial of IMR, need to recheck for same or + // direct interface relative to the host class +@@ -2715,7 +2715,7 @@ + VerificationType top = current_frame->pop_stack(CHECK_VERIFY(this)); + VerificationType hosttype = + VerificationType::reference_type(current_class()->host_klass()->name()); +- bool subtype = hosttype.is_assignable_from(top, this, CHECK_VERIFY(this)); ++ bool subtype = hosttype.is_assignable_from(top, this, false, CHECK_VERIFY(this)); + if (!subtype) { + verify_error( ErrorContext::bad_type(current_frame->offset(), + current_frame->stack_top_ctx(), +@@ -2740,7 +2740,7 @@ + // It's protected access, check if stack object is + // assignable to current class. + bool is_assignable = current_type().is_assignable_from( +- stack_object_type, this, CHECK_VERIFY(this)); ++ stack_object_type, this, true, CHECK_VERIFY(this)); + if (!is_assignable) { + if (ref_class_type.name() == vmSymbols::java_lang_Object() + && stack_object_type.is_array() +@@ -2923,7 +2923,7 @@ + "Method expects a return value"); + return; + } +- bool match = return_type.is_assignable_from(type, this, CHECK_VERIFY(this)); ++ bool match = return_type.is_assignable_from(type, this, false, CHECK_VERIFY(this)); + if (!match) { + verify_error(ErrorContext::bad_type(bci, + current_frame->stack_top_ctx(), TypeOrigin::signature(return_type)), +--- hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2014-10-16 18:26:51.019957802 +0200 +@@ -2733,10 +2733,12 @@ + } + } + +-void CompactibleFreeListSpace:: par_get_chunk_of_blocks(size_t word_sz, size_t n, AdaptiveFreeList* fl) { +- assert(fl->count() == 0, "Precondition."); +- assert(word_sz < CompactibleFreeListSpace::IndexSetSize, +- "Precondition"); ++// Used by par_get_chunk_of_blocks() for the chunks from the ++// indexed_free_lists. Looks for a chunk with size that is a multiple ++// of "word_sz" and if found, splits it into "word_sz" chunks and add ++// to the free list "fl". "n" is the maximum number of chunks to ++// be added to "fl". ++bool CompactibleFreeListSpace:: par_get_chunk_of_blocks_IFL(size_t word_sz, size_t n, AdaptiveFreeList* fl) { + + // We'll try all multiples of word_sz in the indexed set, starting with + // word_sz itself and, if CMSSplitIndexedFreeListBlocks, try larger multiples, +@@ -2817,11 +2819,15 @@ + Mutex::_no_safepoint_check_flag); + ssize_t births = _indexedFreeList[word_sz].split_births() + num; + _indexedFreeList[word_sz].set_split_births(births); +- return; ++ return true; + } + } ++ return found; + } +- // Otherwise, we'll split a block from the dictionary. ++} ++ ++FreeChunk* CompactibleFreeListSpace::get_n_way_chunk_to_split(size_t word_sz, size_t n) { ++ + FreeChunk* fc = NULL; + FreeChunk* rem_fc = NULL; + size_t rem; +@@ -2832,16 +2838,12 @@ + fc = dictionary()->get_chunk(MAX2(n * word_sz, _dictionary->min_size()), + FreeBlockDictionary::atLeast); + if (fc != NULL) { +- _bt.allocated((HeapWord*)fc, fc->size(), true /* reducing */); // update _unallocated_blk +- dictionary()->dict_census_update(fc->size(), +- true /*split*/, +- false /*birth*/); + break; + } else { + n--; + } + } +- if (fc == NULL) return; ++ if (fc == NULL) return NULL; + // Otherwise, split up that block. + assert((ssize_t)n >= 1, "Control point invariant"); + assert(fc->is_free(), "Error: should be a free block"); +@@ -2863,10 +2865,14 @@ + // dictionary and return, leaving "fl" empty. + if (n == 0) { + returnChunkToDictionary(fc); +- assert(fl->count() == 0, "We never allocated any blocks"); +- return; ++ return NULL; + } + ++ _bt.allocated((HeapWord*)fc, fc->size(), true /* reducing */); // update _unallocated_blk ++ dictionary()->dict_census_update(fc->size(), ++ true /*split*/, ++ false /*birth*/); ++ + // First return the remainder, if any. + // Note that we hold the lock until we decide if we're going to give + // back the remainder to the dictionary, since a concurrent allocation +@@ -2899,7 +2905,24 @@ + _indexedFreeList[rem].return_chunk_at_head(rem_fc); + smallSplitBirth(rem); + } +- assert((ssize_t)n > 0 && fc != NULL, "Consistency"); ++ assert(n * word_sz == fc->size(), ++ err_msg("Chunk size " SIZE_FORMAT " is not exactly splittable by " ++ SIZE_FORMAT " sized chunks of size " SIZE_FORMAT, ++ fc->size(), n, word_sz)); ++ return fc; ++} ++ ++void CompactibleFreeListSpace:: par_get_chunk_of_blocks_dictionary(size_t word_sz, size_t targetted_number_of_chunks, AdaptiveFreeList* fl) { ++ ++ FreeChunk* fc = get_n_way_chunk_to_split(word_sz, targetted_number_of_chunks); ++ ++ if (fc == NULL) { ++ return; ++ } ++ ++ size_t n = fc->size() / word_sz; ++ ++ assert((ssize_t)n > 0, "Consistency"); + // Now do the splitting up. + // Must do this in reverse order, so that anybody attempting to + // access the main chunk sees it as a single free block until we +@@ -2947,6 +2970,20 @@ + assert(fl->tail()->next() == NULL, "List invariant."); + } + ++void CompactibleFreeListSpace:: par_get_chunk_of_blocks(size_t word_sz, size_t n, AdaptiveFreeList* fl) { ++ assert(fl->count() == 0, "Precondition."); ++ assert(word_sz < CompactibleFreeListSpace::IndexSetSize, ++ "Precondition"); ++ ++ if (par_get_chunk_of_blocks_IFL(word_sz, n, fl)) { ++ // Got it ++ return; ++ } ++ ++ // Otherwise, we'll split a block from the dictionary. ++ par_get_chunk_of_blocks_dictionary(word_sz, n, fl); ++} ++ + // Set up the space's par_seq_tasks structure for work claiming + // for parallel rescan. See CMSParRemarkTask where this is currently used. + // XXX Need to suitably abstract and generalize this and the next +--- hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp 2014-10-16 18:26:51.020957780 +0200 +@@ -172,6 +172,20 @@ + // list of size "word_sz", and must now be decremented. + void par_get_chunk_of_blocks(size_t word_sz, size_t n, AdaptiveFreeList* fl); + ++ // Used by par_get_chunk_of_blocks() for the chunks from the ++ // indexed_free_lists. ++ bool par_get_chunk_of_blocks_IFL(size_t word_sz, size_t n, AdaptiveFreeList* fl); ++ ++ // Used by par_get_chunk_of_blocks_dictionary() to get a chunk ++ // evenly splittable into "n" "word_sz" chunks. Returns that ++ // evenly splittable chunk. May split a larger chunk to get the ++ // evenly splittable chunk. ++ FreeChunk* get_n_way_chunk_to_split(size_t word_sz, size_t n); ++ ++ // Used by par_get_chunk_of_blocks() for the chunks from the ++ // dictionary. ++ void par_get_chunk_of_blocks_dictionary(size_t word_sz, size_t n, AdaptiveFreeList* fl); ++ + // Allocation helper functions + // Allocate using a strategy that takes from the indexed free lists + // first. This allocation strategy assumes a companion sweeping +--- hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2014-10-16 18:26:51.022957734 +0200 +@@ -2343,6 +2343,7 @@ + case GCCause::_gc_locker: return GCLockerInvokesConcurrent; + case GCCause::_java_lang_system_gc: return ExplicitGCInvokesConcurrent; + case GCCause::_g1_humongous_allocation: return true; ++ case GCCause::_update_allocation_context_stats_inc: return true; + default: return false; + } + } +--- hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp 2014-10-16 18:26:51.022957734 +0200 +@@ -95,8 +95,9 @@ + assert(!_should_initiate_conc_mark || + ((_gc_cause == GCCause::_gc_locker && GCLockerInvokesConcurrent) || + (_gc_cause == GCCause::_java_lang_system_gc && ExplicitGCInvokesConcurrent) || +- _gc_cause == GCCause::_g1_humongous_allocation), +- "only a GC locker, a System.gc() or a hum allocation induced GC should start a cycle"); ++ _gc_cause == GCCause::_g1_humongous_allocation || ++ _gc_cause == GCCause::_update_allocation_context_stats_inc), ++ "only a GC locker, a System.gc(), stats update or a hum allocation induced GC should start a cycle"); + + if (_word_size > 0) { + // An allocation has been requested. So, try to do that first. +--- hotspot/src/share/vm/gc_interface/gcCause.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/gc_interface/gcCause.cpp 2014-10-16 18:26:51.023957711 +0200 +@@ -54,7 +54,8 @@ + case _wb_young_gc: + return "WhiteBox Initiated Young GC"; + +- case _update_allocation_context_stats: ++ case _update_allocation_context_stats_inc: ++ case _update_allocation_context_stats_full: + return "Update Allocation Context Stats"; + + case _no_gc: +--- hotspot/src/share/vm/gc_interface/gcCause.hpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/gc_interface/gcCause.hpp 2014-10-16 18:26:51.023957711 +0200 +@@ -47,7 +47,8 @@ + _heap_inspection, + _heap_dump, + _wb_young_gc, +- _update_allocation_context_stats, ++ _update_allocation_context_stats_inc, ++ _update_allocation_context_stats_full, + + /* implementation independent, but reserved for GC use */ + _no_gc, +--- hotspot/src/share/vm/interpreter/linkResolver.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/interpreter/linkResolver.cpp 2014-10-16 18:26:51.024957688 +0200 +@@ -246,6 +246,12 @@ + // Ignore overpasses so statics can be found during resolution + Method* result_oop = klass->uncached_lookup_method(name, signature, Klass::skip_overpass); + ++ if (klass->oop_is_array()) { ++ // Only consider klass and super klass for arrays ++ result = methodHandle(THREAD, result_oop); ++ return; ++ } ++ + // JDK 8, JVMS 5.4.3.4: Interface method resolution should + // ignore static and non-public methods of java.lang.Object, + // like clone, finalize, registerNatives. +@@ -290,6 +296,11 @@ + result = methodHandle(THREAD, super_klass->uncached_lookup_method(name, signature, Klass::normal)); + } + ++ if (klass->oop_is_array()) { ++ // Only consider klass and super klass for arrays ++ return; ++ } ++ + if (result.is_null()) { + Array* default_methods = InstanceKlass::cast(klass())->default_methods(); + if (default_methods != NULL) { +@@ -546,7 +557,7 @@ + // 2. lookup method in resolved klass and its super klasses + lookup_method_in_klasses(resolved_method, resolved_klass, method_name, method_signature, true, false, CHECK); + +- if (resolved_method.is_null()) { // not found in the class hierarchy ++ if (resolved_method.is_null() && !resolved_klass->oop_is_array()) { // not found in the class hierarchy + // 3. lookup method in all the interfaces implemented by the resolved klass + lookup_method_in_interfaces(resolved_method, resolved_klass, method_name, method_signature, CHECK); + +@@ -559,6 +570,7 @@ + CLEAR_PENDING_EXCEPTION; + } + } ++ } + + if (resolved_method.is_null()) { + // 4. method lookup failed +@@ -569,7 +581,6 @@ + method_signature), + nested_exception); + } +- } + + // 5. access checks, access checking may be turned off when calling from within the VM. + if (check_access) { +@@ -634,9 +645,11 @@ + // JDK8: also look for static methods + lookup_method_in_klasses(resolved_method, resolved_klass, method_name, method_signature, false, true, CHECK); + +- if (resolved_method.is_null()) { ++ if (resolved_method.is_null() && !resolved_klass->oop_is_array()) { + // lookup method in all the super-interfaces + lookup_method_in_interfaces(resolved_method, resolved_klass, method_name, method_signature, CHECK); ++ } ++ + if (resolved_method.is_null()) { + // no method found + ResourceMark rm(THREAD); +@@ -645,7 +658,6 @@ + method_name, + method_signature)); + } +- } + + if (check_access) { + // JDK8 adds non-public interface methods, and accessability check requirement +@@ -776,7 +788,7 @@ + } + + // Resolve instance field +- KlassHandle sel_klass(THREAD, InstanceKlass::cast(resolved_klass())->find_field(field, sig, &fd)); ++ KlassHandle sel_klass(THREAD, resolved_klass->find_field(field, sig, &fd)); + // check if field exists; i.e., if a klass containing the field def has been selected + if (sel_klass.is_null()) { + ResourceMark rm(THREAD); +--- hotspot/src/share/vm/memory/filemap.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/memory/filemap.cpp 2014-10-16 18:26:51.024957688 +0200 +@@ -314,7 +314,6 @@ + fail_continue("The shared archive file has the wrong version."); + return false; + } +- _file_offset = (long)n; + + size_t info_size = _header->_paths_misc_info_size; + _paths_misc_info = NEW_C_HEAP_ARRAY_RETURN_NULL(char, info_size, mtClass); +@@ -330,6 +329,14 @@ + return false; + } + ++ size_t len = lseek(fd, 0, SEEK_END); ++ struct FileMapInfo::FileMapHeader::space_info* si = ++ &_header->_space[MetaspaceShared::mc]; ++ if (si->_file_offset >= len || len - si->_file_offset < si->_used) { ++ fail_continue("The shared archive file has been truncated."); ++ return false; ++ } ++ + _file_offset += (long)n; + return true; + } +@@ -430,6 +437,7 @@ + si->_capacity = capacity; + si->_read_only = read_only; + si->_allow_exec = allow_exec; ++ si->_crc = ClassLoader::crc32(0, base, (jint)size); + write_bytes_aligned(base, (int)size); + } + +@@ -454,14 +462,15 @@ + // Align file position to an allocation unit boundary. + + void FileMapInfo::align_file_position() { +- long new_file_offset = align_size_up(_file_offset, os::vm_allocation_granularity()); ++ size_t new_file_offset = align_size_up(_file_offset, ++ os::vm_allocation_granularity()); + if (new_file_offset != _file_offset) { + _file_offset = new_file_offset; + if (_file_open) { + // Seek one byte back from the target and write a byte to insure + // that the written file is the correct length. + _file_offset -= 1; +- if (lseek(_fd, _file_offset, SEEK_SET) < 0) { ++ if (lseek(_fd, (long)_file_offset, SEEK_SET) < 0) { + fail_stop("Unable to seek.", NULL); + } + char zero = 0; +@@ -568,6 +577,19 @@ + return base; + } + ++bool FileMapInfo::verify_region_checksum(int i) { ++ if (!VerifySharedSpaces) { ++ return true; ++ } ++ const char* buf = _header->_space[i]._base; ++ size_t sz = _header->_space[i]._used; ++ int crc = ClassLoader::crc32(0, buf, (jint)sz); ++ if (crc != _header->_space[i]._crc) { ++ fail_continue("Checksum verification failed."); ++ return false; ++ } ++ return true; ++} + + // Unmap a memory region in the address space. + +@@ -628,15 +650,33 @@ + return true; + } + +-bool FileMapInfo::FileMapHeader::validate() { +- if (_version != current_version()) { +- FileMapInfo::fail_continue("The shared archive file is the wrong version."); +- return false; ++int FileMapInfo::FileMapHeader::compute_crc() { ++ char* header = data(); ++ // start computing from the field after _crc ++ char* buf = (char*)&_crc + sizeof(int); ++ size_t sz = data_size() - (buf - header); ++ int crc = ClassLoader::crc32(0, buf, (jint)sz); ++ return crc; ++} ++ ++int FileMapInfo::compute_header_crc() { ++ return _header->compute_crc(); + } ++ ++bool FileMapInfo::FileMapHeader::validate() { + if (_magic != (int)0xf00baba2) { + FileMapInfo::fail_continue("The shared archive file has a bad magic number."); + return false; + } ++ if (VerifySharedSpaces && compute_crc() != _crc) { ++ fail_continue("Header checksum verification failed."); ++ return false; ++ } ++ if (_version != current_version()) { ++ FileMapInfo::fail_continue("The shared archive file is the wrong version."); ++ ++ return false; ++ } + char header_version[JVM_IDENT_MAX]; + get_header_version(header_version); + if (strncmp(_jvm_ident, header_version, JVM_IDENT_MAX-1) != 0) { +--- hotspot/src/share/vm/memory/filemap.hpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/memory/filemap.hpp 2014-10-16 18:26:51.024957688 +0200 +@@ -61,7 +61,7 @@ + + bool _file_open; + int _fd; +- long _file_offset; ++ size_t _file_offset; + + private: + static SharedClassPathEntry* _classpath_entry_table; +@@ -87,12 +87,14 @@ + } + + int _magic; // identify file type. ++ int _crc; // header crc checksum. + int _version; // (from enum, above.) + size_t _alignment; // how shared archive should be aligned + int _obj_alignment; // value of ObjectAlignmentInBytes + + struct space_info { +- int _file_offset; // sizeof(this) rounded to vm page size ++ int _crc; // crc checksum of the current space ++ size_t _file_offset; // sizeof(this) rounded to vm page size + char* _base; // copy-on-write base address + size_t _capacity; // for validity checking + size_t _used; // for setting space top on read +@@ -135,6 +137,7 @@ + + virtual bool validate(); + virtual void populate(FileMapInfo* info, size_t alignment); ++ int compute_crc(); + }; + + FileMapHeader * _header; +@@ -153,6 +156,8 @@ + ~FileMapInfo(); + + static int current_version() { return _current_version; } ++ int compute_header_crc(); ++ void set_header_crc(int crc) { _header->_crc = crc; } + void populate_header(size_t alignment); + bool validate_header(); + void invalidate(); +@@ -181,6 +186,7 @@ + void write_bytes_aligned(const void* buffer, int count); + char* map_region(int i); + void unmap_region(int i); ++ bool verify_region_checksum(int i); + void close(); + bool is_open() { return _file_open; } + ReservedSpace reserve_shared_memory(); +--- hotspot/src/share/vm/memory/metaspaceShared.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/memory/metaspaceShared.cpp 2014-10-16 18:26:51.025957665 +0200 +@@ -607,6 +607,7 @@ + + // Pass 2 - write data. + mapinfo->open_for_write(); ++ mapinfo->set_header_crc(mapinfo->compute_header_crc()); + mapinfo->write_header(); + mapinfo->write_space(MetaspaceShared::ro, _loader_data->ro_metaspace(), true); + mapinfo->write_space(MetaspaceShared::rw, _loader_data->rw_metaspace(), false); +@@ -936,9 +937,13 @@ + + // Map each shared region + if ((_ro_base = mapinfo->map_region(ro)) != NULL && ++ mapinfo->verify_region_checksum(ro) && + (_rw_base = mapinfo->map_region(rw)) != NULL && ++ mapinfo->verify_region_checksum(rw) && + (_md_base = mapinfo->map_region(md)) != NULL && ++ mapinfo->verify_region_checksum(md) && + (_mc_base = mapinfo->map_region(mc)) != NULL && ++ mapinfo->verify_region_checksum(mc) && + (image_alignment == (size_t)max_alignment()) && + mapinfo->validate_classpath_entry_table()) { + // Success (no need to do anything) +--- hotspot/src/share/vm/oops/arrayKlass.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/oops/arrayKlass.cpp 2014-10-16 18:26:51.025957665 +0200 +@@ -64,6 +64,13 @@ + return NULL; + } + ++// find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined ++Klass* ArrayKlass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const { ++ // There are no fields in an array klass but look to the super class (Object) ++ assert(super(), "super klass must be present"); ++ return super()->find_field(name, sig, fd); ++} ++ + Method* ArrayKlass::uncached_lookup_method(Symbol* name, Symbol* signature, MethodLookupMode mode) const { + // There are no methods in an array klass but the super class (Object) has some + assert(super(), "super klass must be present"); +--- hotspot/src/share/vm/oops/arrayKlass.hpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/oops/arrayKlass.hpp 2014-10-16 18:26:51.026957643 +0200 +@@ -28,6 +28,7 @@ + #include "memory/universe.hpp" + #include "oops/klass.hpp" + ++class fieldDescriptor; + class klassVtable; + + // ArrayKlass is the abstract baseclass for all array classes +@@ -85,6 +86,9 @@ + virtual oop multi_allocate(int rank, jint* sizes, TRAPS); + objArrayOop allocate_arrayArray(int n, int length, TRAPS); + ++ // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined ++ Klass* find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const; ++ + // Lookup operations + Method* uncached_lookup_method(Symbol* name, Symbol* signature, MethodLookupMode mode) const; + +--- hotspot/src/share/vm/oops/klass.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/oops/klass.cpp 2014-10-16 18:26:51.026957643 +0200 +@@ -130,6 +130,15 @@ + return is_subclass_of(k); + } + ++Klass* Klass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const { ++#ifdef ASSERT ++ tty->print_cr("Error: find_field called on a klass oop." ++ " Likely error: reflection method does not correctly" ++ " wrap return value in a mirror object."); ++#endif ++ ShouldNotReachHere(); ++ return NULL; ++} + + Method* Klass::uncached_lookup_method(Symbol* name, Symbol* signature, MethodLookupMode mode) const { + #ifdef ASSERT +--- hotspot/src/share/vm/oops/klass.hpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/oops/klass.hpp 2014-10-16 18:26:51.026957643 +0200 +@@ -90,6 +90,7 @@ + class klassVtable; + class ParCompactionManager; + class KlassSizeStats; ++class fieldDescriptor; + + class Klass : public Metadata { + friend class VMStructs; +@@ -441,6 +442,7 @@ + virtual void initialize(TRAPS); + // lookup operation for MethodLookupCache + friend class MethodLookupCache; ++ virtual Klass* find_field(Symbol* name, Symbol* signature, fieldDescriptor* fd) const; + virtual Method* uncached_lookup_method(Symbol* name, Symbol* signature, MethodLookupMode mode) const; + public: + Method* lookup_method(Symbol* name, Symbol* signature) const { +--- hotspot/src/share/vm/prims/jvm.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/prims/jvm.cpp 2014-10-16 18:26:51.027957620 +0200 +@@ -808,6 +808,7 @@ + return (jclass) JNIHandles::make_local(env, k->java_mirror()); + JVM_END + ++// Not used; JVM_FindClassFromCaller replaces this. + JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name, + jboolean init, jobject loader, + jboolean throwError)) +@@ -834,6 +835,42 @@ + return result; + JVM_END + ++// Find a class with this name in this loader, using the caller's protection domain. ++JVM_ENTRY(jclass, JVM_FindClassFromCaller(JNIEnv* env, const char* name, ++ jboolean init, jobject loader, ++ jclass caller)) ++ JVMWrapper2("JVM_FindClassFromCaller %s throws ClassNotFoundException", name); ++ // Java libraries should ensure that name is never null... ++ if (name == NULL || (int)strlen(name) > Symbol::max_length()) { ++ // It's impossible to create this class; the name cannot fit ++ // into the constant pool. ++ THROW_MSG_0(vmSymbols::java_lang_ClassNotFoundException(), name); ++ } ++ ++ TempNewSymbol h_name = SymbolTable::new_symbol(name, CHECK_NULL); ++ ++ oop loader_oop = JNIHandles::resolve(loader); ++ oop from_class = JNIHandles::resolve(caller); ++ oop protection_domain = NULL; ++ // If loader is null, shouldn't call ClassLoader.checkPackageAccess; otherwise get ++ // NPE. Put it in another way, the bootstrap class loader has all permission and ++ // thus no checkPackageAccess equivalence in the VM class loader. ++ // The caller is also passed as NULL by the java code if there is no security ++ // manager to avoid the performance cost of getting the calling class. ++ if (from_class != NULL && loader_oop != NULL) { ++ protection_domain = java_lang_Class::as_Klass(from_class)->protection_domain(); ++ } ++ ++ Handle h_loader(THREAD, loader_oop); ++ Handle h_prot(THREAD, protection_domain); ++ jclass result = find_class_from_class_loader(env, h_name, init, h_loader, ++ h_prot, false, THREAD); ++ ++ if (TraceClassResolution && result != NULL) { ++ trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result))); ++ } ++ return result; ++JVM_END + + JVM_ENTRY(jclass, JVM_FindClassFromClass(JNIEnv *env, const char *name, + jboolean init, jclass from)) +@@ -4007,10 +4044,15 @@ + + // Shared JNI/JVM entry points ////////////////////////////////////////////////////////////// + +-jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init, Handle loader, Handle protection_domain, jboolean throwError, TRAPS) { ++jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init, ++ Handle loader, Handle protection_domain, ++ jboolean throwError, TRAPS) { + // Security Note: + // The Java level wrapper will perform the necessary security check allowing +- // us to pass the NULL as the initiating class loader. ++ // us to pass the NULL as the initiating class loader. The VM is responsible for ++ // the checkPackageAccess relative to the initiating class loader via the ++ // protection_domain. The protection_domain is passed as NULL by the java code ++ // if there is no security manager in 3-arg Class.forName(). + Klass* klass = SystemDictionary::resolve_or_fail(name, loader, protection_domain, throwError != 0, CHECK_NULL); + + KlassHandle klass_handle(THREAD, klass); +--- hotspot/src/share/vm/prims/jvm.h 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/prims/jvm.h 2014-10-16 18:26:51.028957597 +0200 +@@ -420,6 +420,19 @@ + JVM_FindClassFromBootLoader(JNIEnv *env, const char *name); + + /* ++ * Find a class from a given class loader. Throws ClassNotFoundException. ++ * name: name of class ++ * init: whether initialization is done ++ * loader: class loader to look up the class. This may not be the same as the caller's ++ * class loader. ++ * caller: initiating class. The initiating class may be null when a security ++ * manager is not installed. ++ */ ++JNIEXPORT jclass JNICALL ++JVM_FindClassFromCaller(JNIEnv *env, const char *name, jboolean init, ++ jobject loader, jclass caller); ++ ++/* + * Find a class from a given class. + */ + JNIEXPORT jclass JNICALL +--- hotspot/src/share/vm/runtime/arguments.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/runtime/arguments.cpp 2014-10-16 18:26:51.029957574 +0200 +@@ -2455,6 +2455,10 @@ + warning("The VM option CICompilerCountPerCPU overrides CICompilerCount."); + } + ++#ifdef COMPILER1 ++ status &= verify_interval(SafepointPollOffset, 0, os::vm_page_size() - BytesPerWord, "SafepointPollOffset"); ++#endif ++ + return status; + } + +@@ -3708,6 +3712,11 @@ + return JNI_ENOMEM; + } + ++ // Set up VerifySharedSpaces ++ if (FLAG_IS_DEFAULT(VerifySharedSpaces) && SharedArchiveFile != NULL) { ++ VerifySharedSpaces = true; ++ } ++ + // Delay warning until here so that we've had a chance to process + // the -XX:-PrintWarnings flag + if (needs_hotspotrc_warning) { +--- hotspot/src/share/vm/runtime/globals.hpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/runtime/globals.hpp 2014-10-16 18:26:51.030957551 +0200 +@@ -1166,11 +1166,11 @@ + "Prevent spurious or premature wakeups from object.wait " \ + "(Solaris only)") \ + \ +- product(intx, NativeMonitorTimeout, -1, "(Unstable)") \ ++ experimental(intx, NativeMonitorTimeout, -1, "(Unstable)") \ + \ +- product(intx, NativeMonitorFlags, 0, "(Unstable)") \ ++ experimental(intx, NativeMonitorFlags, 0, "(Unstable)") \ + \ +- product(intx, NativeMonitorSpinLimit, 20, "(Unstable)") \ ++ experimental(intx, NativeMonitorSpinLimit, 20, "(Unstable)") \ + \ + develop(bool, UsePthreads, false, \ + "Use pthread-based instead of libthread-based synchronization " \ +@@ -3787,6 +3787,10 @@ + product(bool, UseSharedSpaces, true, \ + "Use shared spaces for metadata") \ + \ ++ product(bool, VerifySharedSpaces, false, \ ++ "Verify shared spaces (false for default archive, true for " \ ++ "archive specified by -XX:SharedArchiveFile)") \ ++ \ + product(bool, RequireSharedSpaces, false, \ + "Require shared spaces for metadata") \ + \ +--- hotspot/src/share/vm/runtime/reflection.cpp 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/src/share/vm/runtime/reflection.cpp 2014-10-16 18:26:51.031957528 +0200 +@@ -484,7 +484,7 @@ + ik = InstanceKlass::cast(hc); + + // There's no way to make a host class loop short of patching memory. +- // Therefore there cannot be a loop here unles there's another bug. ++ // Therefore there cannot be a loop here unless there's another bug. + // Still, let's check for it. + assert(--inf_loop_check > 0, "no host_klass loop"); + } +@@ -553,7 +553,8 @@ + if (access.is_protected()) { + if (!protected_restriction) { + // See if current_class (or outermost host class) is a subclass of field_class +- if (host_class->is_subclass_of(field_class)) { ++ // An interface may not access protected members of j.l.Object ++ if (!host_class->is_interface() && host_class->is_subclass_of(field_class)) { + if (access.is_static() || // static fields are ok, see 6622385 + current_class == resolved_class || + field_class == resolved_class || +--- hotspot/test/compiler/osr/TestRangeCheck.java 1970-01-01 01:00:00.000000000 +0100 ++++ hotspot/test/compiler/osr/TestRangeCheck.java 2014-10-16 18:26:51.031957528 +0200 +@@ -0,0 +1,52 @@ ++/* ++ * Copyright (c) 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test TestRangeCheck ++ * @bug 8054883 ++ * @summary Tests that range check is not skipped ++ */ ++ ++public class TestRangeCheck { ++ public static void main(String args[]) { ++ try { ++ test(); ++ throw new AssertionError("Expected ArrayIndexOutOfBoundsException was not thrown"); ++ } catch (ArrayIndexOutOfBoundsException e) { ++ System.out.println("Expected ArrayIndexOutOfBoundsException was thrown"); ++ } ++ } ++ ++ private static void test() { ++ int arr[] = new int[1]; ++ int result = 1; ++ ++ // provoke OSR compilation ++ for (int i = 0; i < Integer.MAX_VALUE; i++) { ++ } ++ ++ if (result > 0 && arr[~result] > 0) { ++ arr[~result] = 0; ++ } ++ } ++} +--- hotspot/test/gc/class_unloading/AllocateBeyondMetaspaceSize.java 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/test/gc/class_unloading/AllocateBeyondMetaspaceSize.java 1970-01-01 01:00:00.000000000 +0100 +@@ -1,59 +0,0 @@ +-/* +- * Copyright (c) 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 +- * under the terms of the GNU General Public License version 2 only, as +- * published by the Free Software Foundation. +- * +- * This code is distributed in the hope that it will be useful, but WITHOUT +- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +- * version 2 for more details (a copy is included in the LICENSE file that +- * accompanied this code). +- * +- * You should have received a copy of the GNU General Public License version +- * 2 along with this work; if not, write to the Free Software Foundation, +- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +- * +- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +- * or visit www.oracle.com if you need additional information or have any +- * questions. +- */ +- +-import sun.hotspot.WhiteBox; +- +-class AllocateBeyondMetaspaceSize { +- public static Object dummy; +- +- public static void main(String [] args) { +- if (args.length != 2) { +- throw new IllegalArgumentException("Usage: "); +- } +- +- long metaspaceSize = Long.parseLong(args[0]); +- long youngGenSize = Long.parseLong(args[1]); +- +- run(metaspaceSize, youngGenSize); +- } +- +- private static void run(long metaspaceSize, long youngGenSize) { +- WhiteBox wb = WhiteBox.getWhiteBox(); +- +- long allocationBeyondMetaspaceSize = metaspaceSize * 2; +- long metaspace = wb.allocateMetaspace(null, allocationBeyondMetaspaceSize); +- +- triggerYoungGC(youngGenSize); +- +- wb.freeMetaspace(null, metaspace, metaspace); +- } +- +- private static void triggerYoungGC(long youngGenSize) { +- long approxAllocSize = 32 * 1024; +- long numAllocations = 2 * youngGenSize / approxAllocSize; +- +- for (long i = 0; i < numAllocations; i++) { +- dummy = new byte[(int)approxAllocSize]; +- } +- } +-} +--- hotspot/test/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/test/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java 2014-10-16 18:26:51.032957506 +0200 +@@ -26,7 +26,7 @@ + * @key gc + * @bug 8049831 + * @library /testlibrary /testlibrary/whitebox +- * @build TestCMSClassUnloadingEnabledHWM AllocateBeyondMetaspaceSize ++ * @build TestCMSClassUnloadingEnabledHWM + * @run main ClassFileInstaller sun.hotspot.WhiteBox + * @run driver TestCMSClassUnloadingEnabledHWM + * @summary Test that -XX:-CMSClassUnloadingEnabled will trigger a Full GC when more than MetaspaceSize metadata is allocated. +@@ -34,9 +34,11 @@ + + import com.oracle.java.testlibrary.OutputAnalyzer; + import com.oracle.java.testlibrary.ProcessTools; +- ++import java.lang.management.GarbageCollectorMXBean; ++import java.lang.management.ManagementFactory; + import java.util.ArrayList; + import java.util.Arrays; ++import sun.hotspot.WhiteBox; + + public class TestCMSClassUnloadingEnabledHWM { + private static long MetaspaceSize = 32 * 1024 * 1024; +@@ -47,15 +49,18 @@ + "-Xbootclasspath/a:.", + "-XX:+UnlockDiagnosticVMOptions", + "-XX:+WhiteBoxAPI", ++ "-Xmx128m", ++ "-XX:CMSMaxAbortablePrecleanTime=1", ++ "-XX:CMSWaitDuration=50", + "-XX:MetaspaceSize=" + MetaspaceSize, + "-Xmn" + YoungGenSize, + "-XX:+UseConcMarkSweepGC", + "-XX:" + (enableUnloading ? "+" : "-") + "CMSClassUnloadingEnabled", + "-XX:+PrintHeapAtGC", + "-XX:+PrintGCDetails", +- "AllocateBeyondMetaspaceSize", +- "" + MetaspaceSize, +- "" + YoungGenSize); ++ "-XX:+PrintGCTimeStamps", ++ TestCMSClassUnloadingEnabledHWM.AllocateBeyondMetaspaceSize.class.getName(), ++ "" + MetaspaceSize); + return new OutputAnalyzer(pb.start()); + } + +@@ -87,5 +92,37 @@ + testWithCMSClassUnloading(); + testWithoutCMSClassUnloading(); + } ++ ++ public static class AllocateBeyondMetaspaceSize { ++ public static void main(String [] args) throws Exception { ++ if (args.length != 1) { ++ throw new IllegalArgumentException("Usage: "); ++ } ++ ++ WhiteBox wb = WhiteBox.getWhiteBox(); ++ ++ // Allocate past the MetaspaceSize limit. ++ long metaspaceSize = Long.parseLong(args[0]); ++ long allocationBeyondMetaspaceSize = metaspaceSize * 2; ++ long metaspace = wb.allocateMetaspace(null, allocationBeyondMetaspaceSize); ++ ++ // Wait for at least one GC to occur. The caller will parse the log files produced. ++ GarbageCollectorMXBean cmsGCBean = getCMSGCBean(); ++ while (cmsGCBean.getCollectionCount() == 0) { ++ Thread.sleep(100); ++ } ++ ++ wb.freeMetaspace(null, metaspace, metaspace); ++ } ++ ++ private static GarbageCollectorMXBean getCMSGCBean() { ++ for (GarbageCollectorMXBean gcBean : ManagementFactory.getGarbageCollectorMXBeans()) { ++ if (gcBean.getObjectName().toString().equals("java.lang:type=GarbageCollector,name=ConcurrentMarkSweep")) { ++ return gcBean; ++ } ++ } ++ return null; ++ } ++ } + } + +--- hotspot/test/gc/class_unloading/TestG1ClassUnloadingHWM.java 2014-10-13 11:53:11.000000000 +0200 ++++ hotspot/test/gc/class_unloading/TestG1ClassUnloadingHWM.java 2014-10-16 18:26:51.032957506 +0200 +@@ -26,7 +26,7 @@ + * @key gc + * @bug 8049831 + * @library /testlibrary /testlibrary/whitebox +- * @build TestG1ClassUnloadingHWM AllocateBeyondMetaspaceSize ++ * @build TestG1ClassUnloadingHWM + * @run main ClassFileInstaller sun.hotspot.WhiteBox + * @run driver TestG1ClassUnloadingHWM + * @summary Test that -XX:-ClassUnloadingWithConcurrentMark will trigger a Full GC when more than MetaspaceSize metadata is allocated. +@@ -34,9 +34,9 @@ + + import com.oracle.java.testlibrary.OutputAnalyzer; + import com.oracle.java.testlibrary.ProcessTools; +- + import java.util.ArrayList; + import java.util.Arrays; ++import sun.hotspot.WhiteBox; + + public class TestG1ClassUnloadingHWM { + private static long MetaspaceSize = 32 * 1024 * 1024; +@@ -53,7 +53,7 @@ + "-XX:" + (enableUnloading ? "+" : "-") + "ClassUnloadingWithConcurrentMark", + "-XX:+PrintHeapAtGC", + "-XX:+PrintGCDetails", +- "AllocateBeyondMetaspaceSize", ++ TestG1ClassUnloadingHWM.AllocateBeyondMetaspaceSize.class.getName(), + "" + MetaspaceSize, + "" + YoungGenSize); + return new OutputAnalyzer(pb.start()); +@@ -87,5 +87,36 @@ + testWithG1ClassUnloading(); + testWithoutG1ClassUnloading(); + } ++ ++ public static class AllocateBeyondMetaspaceSize { ++ public static Object dummy; ++ ++ public static void main(String [] args) throws Exception { ++ if (args.length != 2) { ++ throw new IllegalArgumentException("Usage: "); ++ } ++ ++ WhiteBox wb = WhiteBox.getWhiteBox(); ++ ++ // Allocate past the MetaspaceSize limit ++ long metaspaceSize = Long.parseLong(args[0]); ++ long allocationBeyondMetaspaceSize = metaspaceSize * 2; ++ long metaspace = wb.allocateMetaspace(null, allocationBeyondMetaspaceSize); ++ ++ long youngGenSize = Long.parseLong(args[1]); ++ triggerYoungGCs(youngGenSize); ++ ++ wb.freeMetaspace(null, metaspace, metaspace); ++ } ++ ++ public static void triggerYoungGCs(long youngGenSize) { ++ long approxAllocSize = 32 * 1024; ++ long numAllocations = 2 * youngGenSize / approxAllocSize; ++ ++ for (long i = 0; i < numAllocations; i++) { ++ dummy = new byte[(int)approxAllocSize]; ++ } ++ } ++ } + } + diff --git a/bf87d7191166.tar.bz2 b/bf87d7191166.tar.bz2 deleted file mode 100644 index d56ed0a..0000000 --- a/bf87d7191166.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb45bfb81ed4ad2692ef291841c819c28acea4a09df4ce8f6b9478b7fa5bd4ef -size 1018206 diff --git a/c3a4729c70fa.tar.bz2 b/c3a4729c70fa.tar.bz2 new file mode 100644 index 0000000..0369a3f --- /dev/null +++ b/c3a4729c70fa.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a42342472c49db156952249e85c95d6e62f744925bf508b7621e3dd696bde2f2 +size 45298580 diff --git a/c45c0ee41600.tar.bz2 b/c45c0ee41600.tar.bz2 deleted file mode 100644 index 9c47be2..0000000 --- a/c45c0ee41600.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b39ea016b22d7d97ad06d56e791f87746efd0c70e3148f30d79541f24a05fb7b -size 2728589 diff --git a/java-1_8_0-openjdk.changes b/java-1_8_0-openjdk.changes index 4e1b58f..ebad5c0 100644 --- a/java-1_8_0-openjdk.changes +++ b/java-1_8_0-openjdk.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Oct 17 07:18:59 UTC 2014 - fstrba@suse.com + +- Upgrade to upstream tag jdk8u40-b10 + * Unstable snapshot in view of jdk8u40 release + * Contains security fixes from 14 october 2014 +- Add aarch64-jdk8u40-b09_b10.patch + * Manually upgrade the aarch64 hotspot tarball with the changes + between b09 and b10 + ------------------------------------------------------------------- Thu Oct 16 20:07:56 UTC 2014 - fstrba@suse.com @@ -7,6 +17,8 @@ Thu Oct 16 20:07:56 UTC 2014 - fstrba@suse.com * Conditionalize javadoc noarch build for distributions that understand the per-package BuildArch - Try to make the jre-32 and jre-64 provides more automatic +- Disable brp-check-bytecode-version during install + * java8 will have bytecode version 8 in its jars ------------------------------------------------------------------- Tue Oct 7 06:25:32 UTC 2014 - fstrba@suse.com diff --git a/java-1_8_0-openjdk.spec b/java-1_8_0-openjdk.spec index f7cdefe..af5188d 100644 --- a/java-1_8_0-openjdk.spec +++ b/java-1_8_0-openjdk.spec @@ -30,20 +30,20 @@ %global archname %{name} # Standard JPackage naming and versioning defines. %global updatever 40 -%global buildver b09 +%global buildver b10 %global root_project jdk8u %global root_repository jdk8u -%global root_revision 0958d0a9f44e -%global corba_revision bf87d7191166 -%global hotspot_revision 7ff8d51e0d8f -%global jaxp_revision c45c0ee41600 -%global jaxws_revision 26529be4ae77 -%global jdk_revision 064adeb65ce8 -%global langtools_revision 8bb38a350722 -%global nashorn_revision 6a8ecdeae4a9 +%global root_revision 1053aeab6b12 +%global corba_revision a6d92ff8b962 +%global hotspot_revision 1b3abbeee961 +%global jaxp_revision 1f5248bc0714 +%global jaxws_revision 337fb10bc4da +%global jdk_revision c3a4729c70fa +%global langtools_revision 69b84370397f +%global nashorn_revision 076b1f38a5cc %global aarch64_project aarch64-port %global aarch64_repository jdk8 -%global aarch64_hotspot_revision 89ebbc29144c +%global aarch64_hotspot_revision 3ac6832f7901 %global icedtea_sound_version 1.0.1 # priority must be 6 digits in total %global priority 180%{updatever} @@ -194,6 +194,8 @@ Source14: TestCryptoLevel.java Source100: config.guess Source101: config.sub # RPM/distribution specific patches +# Bring the aarch64 hotspot tarball from b09 to b10 manually +Patch1: aarch64-jdk8u40-b09_b10.patch # RHBZ 1015432 Patch2: 1015432.patch # Restrict access to java-atk-wrapper classes @@ -274,6 +276,20 @@ Provides: jre-%{javaver}-openjdk = %{version}-%{release} Provides: jre-openjdk = %{version}-%{release} # Standard JPackage extensions provides. Provides: java-fonts = %{version} +# Required at least by fop +Provides: java-%{bits} = %{javaver} +Provides: java-%{javaver}-%{bits} +Provides: java-openjdk-%{bits} = %{version}-%{release} +Provides: jre-%{bits} = %{javaver} +Provides: jre-%{javaver}-%{bits} +Provides: jre-%{javaver}-openjdk-%{bits} = %{version}-%{release} +Provides: jre-openjdk-%{bits} = %{version}-%{release} +Provides: jre1.3.x +Provides: jre1.4.x +Provides: jre1.5.x +Provides: jre1.6.x +Provides: jre1.7.x +Provides: jre1.8.x BuildRoot: %{_tmppath}/%{name}-%{version}-build # Zero-assembler build requirement. %if %{with zero} @@ -346,20 +362,6 @@ Provides: jndi-dns = %{version} Provides: jndi-ldap = %{version} Provides: jndi-rmi = %{version} Provides: jsse = %{version} -# Required at least by fop -Provides: java-%{bits} = %{javaver} -Provides: java-%{javaver}-%{bits} -Provides: java-openjdk-%{bits} = %{version}-%{release} -Provides: jre-%{bits} = %{javaver} -Provides: jre-%{javaver}-%{bits} -Provides: jre-%{javaver}-openjdk-%{bits} = %{version}-%{release} -Provides: jre-openjdk-%{bits} = %{version}-%{release} -Provides: jre1.3.x -Provides: jre1.4.x -Provides: jre1.5.x -Provides: jre1.6.x -Provides: jre1.7.x -Provides: jre1.8.x %description headless The OpenJDK runtime environment without audio and video support. @@ -493,6 +495,9 @@ rm -rvf jdk/src/share/native/sun/java2d/cmm/lcms/lcms2* %patch204 -p1 %patch205 -p1 +%ifarch %{aarch64} +%patch1 +%endif %patch2 -p1 %patch3 -p1 %patch4 -p1