summaryrefslogtreecommitdiff
path: root/java/openjdk8/files/patch-bsd
diff options
context:
space:
mode:
authorGreg Lewis <glewis@FreeBSD.org>2015-09-07 09:41:49 +0000
committerGreg Lewis <glewis@FreeBSD.org>2015-09-07 09:41:49 +0000
commit519117c04b1d4197a1c72ede7a9bfe6c0fdb015a (patch)
treeab309a80349ce4fa8e6cf8a8b3e76ac47930e7ed /java/openjdk8/files/patch-bsd
parent- Remove BROKEN statement that is not true: port configures and builds fine (diff)
. Update to 8u60.
Notes
Notes: svn path=/head/; revision=396257
Diffstat (limited to 'java/openjdk8/files/patch-bsd')
-rw-r--r--java/openjdk8/files/patch-bsd5411
1 files changed, 4673 insertions, 738 deletions
diff --git a/java/openjdk8/files/patch-bsd b/java/openjdk8/files/patch-bsd
index ed47ea5fad0e..701855b83876 100644
--- a/java/openjdk8/files/patch-bsd
+++ b/java/openjdk8/files/patch-bsd
@@ -1,5 +1,5 @@
---- ./common/autoconf/build-performance.m4 Tue May 26 13:25:56 2015 -0700
-+++ ./common/autoconf/build-performance.m4 Sat Jul 18 13:32:19 2015 -0700
+--- ./common/autoconf/build-performance.m4 Wed Jul 01 21:51:50 2015 -0700
++++ ./common/autoconf/build-performance.m4 Sat Sep 05 06:32:21 2015 -0700
@@ -41,6 +41,10 @@
# Looks like a MacOSX system
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
@@ -38,8 +38,8 @@
AC_MSG_RESULT([no, disabling ccache])
CCACHE=
else
---- ./common/autoconf/generated-configure.sh Tue May 26 13:25:56 2015 -0700
-+++ ./common/autoconf/generated-configure.sh Sat Jul 18 13:32:19 2015 -0700
+--- ./common/autoconf/generated-configure.sh Wed Jul 01 21:51:50 2015 -0700
++++ ./common/autoconf/generated-configure.sh Sat Sep 05 06:32:21 2015 -0700
@@ -646,6 +646,8 @@
LIBM
LIBZIP_CAN_USE_MMAP
@@ -49,7 +49,7 @@
USE_EXTERNAL_LIBGIF
USE_EXTERNAL_LIBJPEG
ALSA_LIBS
-@@ -814,6 +816,7 @@
+@@ -818,6 +820,7 @@
JDK_MAJOR_VERSION
USER_RELEASE_SUFFIX
COMPRESS_JARS
@@ -57,7 +57,7 @@
UNLIMITED_CRYPTO
CACERTS_FILE
TEST_IN_BUILD
-@@ -891,6 +894,7 @@
+@@ -894,6 +897,7 @@
OPENJDK_TARGET_CPU_ARCH
OPENJDK_TARGET_CPU
OPENJDK_TARGET_OS_API
@@ -65,7 +65,7 @@
OPENJDK_TARGET_OS
OPENJDK_BUILD_CPU_ENDIAN
OPENJDK_BUILD_CPU_BITS
-@@ -1022,6 +1026,7 @@
+@@ -1026,6 +1030,7 @@
enable_hotspot_test_in_build
with_cacerts_file
enable_unlimited_crypto
@@ -73,7 +73,7 @@
with_milestone
with_update_version
with_user_release_suffix
-@@ -1048,6 +1053,7 @@
+@@ -1052,6 +1057,7 @@
with_extra_cflags
with_extra_cxxflags
with_extra_ldflags
@@ -81,7 +81,7 @@
enable_debug_symbols
enable_zip_debug_info
enable_macosx_runtime_support
-@@ -1724,6 +1730,7 @@
+@@ -1728,6 +1734,7 @@
run the Queens test after Hotspot build [disabled]
--enable-unlimited-crypto
Enable unlimited crypto policy [disabled]
@@ -89,7 +89,7 @@
--disable-debug-symbols disable generation of debug symbols [enabled]
--disable-zip-debug-info
disable zipping of debug-info files [enabled]
-@@ -1818,6 +1825,8 @@
+@@ -1824,6 +1831,8 @@
--with-extra-cflags extra flags to be used when compiling jdk c-files
--with-extra-cxxflags extra flags to be used when compiling jdk c++-files
--with-extra-ldflags extra flags to be used when linking jdk
@@ -98,16 +98,7 @@
--with-x use the X Window System
--with-cups specify prefix directory for the cups package
(expecting the headers under PATH/include)
-@@ -3872,7 +3881,7 @@
- #CUSTOM_AUTOCONF_INCLUDE
-
- # Do not change or remove the following line, it is needed for consistency checks:
--DATE_WHEN_GENERATED=1416326200
-+DATE_WHEN_GENERATED=1432321778
-
- ###############################################################################
- #
-@@ -6800,11 +6809,27 @@
+@@ -6807,11 +6816,27 @@
as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
;;
esac
@@ -136,7 +127,7 @@
VAR_CPU=x86_64
VAR_CPU_ARCH=x86
VAR_CPU_BITS=64
-@@ -6931,11 +6956,27 @@
+@@ -6944,11 +6969,27 @@
as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
;;
esac
@@ -165,7 +156,7 @@
VAR_CPU=x86_64
VAR_CPU_ARCH=x86
VAR_CPU_BITS=64
-@@ -7002,6 +7043,7 @@
+@@ -7021,6 +7062,7 @@
# ... and setup our own variables. (Do this explicitely to facilitate searching)
OPENJDK_TARGET_OS="$VAR_OS"
@@ -173,7 +164,7 @@
OPENJDK_TARGET_OS_API="$VAR_OS_API"
OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
OPENJDK_TARGET_CPU="$VAR_CPU"
-@@ -7015,6 +7057,7 @@
+@@ -7034,6 +7076,7 @@
@@ -181,7 +172,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
$as_echo_n "checking openjdk-target os-cpu... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
-@@ -7143,8 +7186,8 @@
+@@ -7162,8 +7205,8 @@
# Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
@@ -192,7 +183,7 @@
OPENJDK_TARGET_CPU_OSARCH="i386"
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
# On all platforms except macosx, we replace x86_64 with amd64.
-@@ -11184,6 +11227,24 @@
+@@ -11173,6 +11216,24 @@
###############################################################################
#
@@ -217,7 +208,7 @@
# Enable or disable the elliptic curve crypto implementation
#
-@@ -20223,7 +20284,7 @@
+@@ -20344,7 +20405,7 @@
else
COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
# Check that this is likely to be GCC.
@@ -226,7 +217,7 @@
if test $? -ne 0; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
-@@ -21824,7 +21885,7 @@
+@@ -21945,7 +22006,7 @@
else
COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
# Check that this is likely to be GCC.
@@ -235,7 +226,7 @@
if test $? -ne 0; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
-@@ -27788,7 +27849,7 @@
+@@ -27952,7 +28013,7 @@
# objcopy is used for moving debug symbols to separate files when
# full debug symbols are enabled.
@@ -244,7 +235,7 @@
if test -n "$ac_tool_prefix"; then
for ac_prog in gobjcopy objcopy
do
-@@ -29454,8 +29515,10 @@
+@@ -29309,8 +29370,10 @@
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
SET_SHARED_LIBRARY_MAPFILE=''
SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
@@ -256,7 +247,7 @@
fi
else
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-@@ -29881,22 +29944,37 @@
+@@ -29736,22 +29799,37 @@
CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
# The package path is used only on macosx?
@@ -307,7 +298,7 @@
fi
if test "x$OPENJDK_TARGET_OS" = xlinux; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
-@@ -30395,11 +30473,18 @@
+@@ -30248,11 +30326,18 @@
fi
if test "x$OPENJDK_TARGET_OS" = xbsd; then
@@ -331,7 +322,7 @@
fi
if test "x$OPENJDK" = "xfalse"; then
-@@ -30449,14 +30534,18 @@
+@@ -30288,14 +30373,18 @@
# --x-libraries for the sysroot, if that seems to be correct.
if test "x$SYS_ROOT" != "x/"; then
if test "x$x_includes" = xNONE; then
@@ -352,7 +343,7 @@
x_libraries="$SYS_ROOT/usr/X11R6/lib"
elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
x_libraries="$SYS_ROOT/usr/lib64"
-@@ -31503,6 +31592,10 @@
+@@ -31342,6 +31431,10 @@
# A CSW package seems to be installed!
CUPS_FOUND=yes
CUPS_CFLAGS="-I/opt/csw/include"
@@ -363,7 +354,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
$as_echo "$CUPS_FOUND" >&6; }
-@@ -34668,7 +34761,7 @@
+@@ -34507,7 +34600,7 @@
###############################################################################
#
@@ -372,7 +363,7 @@
#
# Check whether --with-alsa was given.
-@@ -35076,15 +35169,66 @@
+@@ -34915,15 +35008,66 @@
if test "x${with_giflib}" = "xbundled"; then
USE_EXTERNAL_LIBGIF=false
@@ -444,7 +435,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
-@@ -35122,16 +35266,96 @@
+@@ -34961,16 +35105,96 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
@@ -551,7 +542,7 @@
USE_EXTERNAL_LIBGIF=true
else
-@@ -35139,6 +35363,8 @@
+@@ -34978,6 +35202,8 @@
fi
@@ -560,7 +551,7 @@
###############################################################################
#
# Check for the zlib library
-@@ -35706,6 +35932,11 @@
+@@ -35545,6 +35771,11 @@
LIBCXX="-lstdc++"
fi
@@ -572,7 +563,7 @@
-@@ -35779,6 +36010,10 @@
+@@ -35618,6 +35849,10 @@
# Looks like a MacOSX system
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'`
FOUND_CORES=yes
@@ -583,7 +574,7 @@
elif test "x$OPENJDK_BUILD_OS" = xaix ; then
NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
FOUND_CORES=yes
-@@ -35834,6 +36069,15 @@
+@@ -35673,6 +35908,15 @@
MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
FOUND_MEM=yes
@@ -599,7 +590,7 @@
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
# Windows, but without cygwin
MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
-@@ -36241,8 +36485,8 @@
+@@ -36080,8 +36324,8 @@
# precompiled headers.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
@@ -610,9 +601,9 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
$as_echo "no, disabling ccache" >&6; }
CCACHE=
---- ./common/autoconf/jdk-options.m4 Tue May 26 13:25:56 2015 -0700
-+++ ./common/autoconf/jdk-options.m4 Sat Jul 18 13:32:19 2015 -0700
-@@ -407,6 +407,20 @@
+--- ./common/autoconf/jdk-options.m4 Wed Jul 01 21:51:50 2015 -0700
++++ ./common/autoconf/jdk-options.m4 Sat Sep 05 06:32:21 2015 -0700
+@@ -410,6 +410,20 @@
###############################################################################
#
@@ -633,9 +624,9 @@
# Enable or disable the elliptic curve crypto implementation
#
AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
---- ./common/autoconf/libraries.m4 Tue May 26 13:25:56 2015 -0700
-+++ ./common/autoconf/libraries.m4 Sat Jul 18 13:32:19 2015 -0700
-@@ -71,9 +71,15 @@
+--- ./common/autoconf/libraries.m4 Wed Jul 01 21:51:50 2015 -0700
++++ ./common/autoconf/libraries.m4 Sat Sep 05 06:32:21 2015 -0700
+@@ -69,9 +69,15 @@
fi
if test "x$OPENJDK_TARGET_OS" = xbsd; then
@@ -654,7 +645,7 @@
fi
if test "x$OPENJDK" = "xfalse"; then
-@@ -112,14 +118,18 @@
+@@ -99,14 +105,18 @@
# --x-libraries for the sysroot, if that seems to be correct.
if test "x$SYS_ROOT" != "x/"; then
if test "x$x_includes" = xNONE; then
@@ -675,7 +666,7 @@
x_libraries="$SYS_ROOT/usr/X11R6/lib"
elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
x_libraries="$SYS_ROOT/usr/lib64"
-@@ -245,6 +255,10 @@
+@@ -232,6 +242,10 @@
# A CSW package seems to be installed!
CUPS_FOUND=yes
CUPS_CFLAGS="-I/opt/csw/include"
@@ -686,7 +677,7 @@
fi
AC_MSG_RESULT([$CUPS_FOUND])
fi
-@@ -538,7 +552,7 @@
+@@ -525,7 +539,7 @@
###############################################################################
#
@@ -695,7 +686,7 @@
#
AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
[specify prefix directory for the alsa package
-@@ -640,17 +654,61 @@
+@@ -627,17 +641,61 @@
if test "x${with_giflib}" = "xbundled"; then
USE_EXTERNAL_LIBGIF=false
@@ -761,7 +752,7 @@
###############################################################################
#
-@@ -885,5 +943,10 @@
+@@ -872,5 +930,10 @@
LIBCXX="-lstdc++"
fi
@@ -772,8 +763,8 @@
+
AC_SUBST(LIBCXX)
])
---- ./common/autoconf/platform.m4 Tue May 26 13:25:56 2015 -0700
-+++ ./common/autoconf/platform.m4 Sat Jul 18 13:32:19 2015 -0700
+--- ./common/autoconf/platform.m4 Wed Jul 01 21:51:50 2015 -0700
++++ ./common/autoconf/platform.m4 Sat Sep 05 06:32:21 2015 -0700
@@ -30,7 +30,7 @@
[
# First argument is the cpu name from the trip/quad
@@ -783,7 +774,7 @@
VAR_CPU=x86_64
VAR_CPU_ARCH=x86
VAR_CPU_BITS=64
-@@ -141,6 +141,22 @@
+@@ -147,6 +147,22 @@
AC_MSG_ERROR([unsupported operating system $1])
;;
esac
@@ -806,7 +797,7 @@
])
# Expects $host_os $host_cpu $build_os and $build_cpu
-@@ -186,6 +202,7 @@
+@@ -192,6 +208,7 @@
PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
# ... and setup our own variables. (Do this explicitely to facilitate searching)
OPENJDK_TARGET_OS="$VAR_OS"
@@ -814,7 +805,7 @@
OPENJDK_TARGET_OS_API="$VAR_OS_API"
OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
OPENJDK_TARGET_CPU="$VAR_CPU"
-@@ -193,6 +210,7 @@
+@@ -199,6 +216,7 @@
OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
AC_SUBST(OPENJDK_TARGET_OS)
@@ -822,7 +813,7 @@
AC_SUBST(OPENJDK_TARGET_OS_API)
AC_SUBST(OPENJDK_TARGET_CPU)
AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
-@@ -302,8 +320,8 @@
+@@ -308,8 +326,8 @@
# Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
@@ -833,8 +824,8 @@
OPENJDK_TARGET_CPU_OSARCH="i386"
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
# On all platforms except macosx, we replace x86_64 with amd64.
---- ./common/autoconf/spec.gmk.in Tue May 26 13:25:56 2015 -0700
-+++ ./common/autoconf/spec.gmk.in Sat Jul 18 13:32:19 2015 -0700
+--- ./common/autoconf/spec.gmk.in Wed Jul 01 21:51:50 2015 -0700
++++ ./common/autoconf/spec.gmk.in Sat Sep 05 06:32:21 2015 -0700
@@ -76,6 +76,7 @@
OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
@@ -843,7 +834,7 @@
OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
-@@ -275,7 +276,7 @@
+@@ -276,7 +277,7 @@
ALSA_LIBS:=@ALSA_LIBS@
ALSA_CFLAGS:=@ALSA_CFLAGS@
@@ -852,7 +843,7 @@
# Source file for cacerts
CACERTS_FILE=@CACERTS_FILE@
-@@ -283,6 +284,9 @@
+@@ -284,6 +285,9 @@
# Enable unlimited crypto policy
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
@@ -862,7 +853,7 @@
# Necessary additional compiler flags to compile X11
X_CFLAGS:=@X_CFLAGS@
X_LIBS:=@X_LIBS@
-@@ -558,6 +562,8 @@
+@@ -564,6 +568,8 @@
ENABLE_INTREE_EC=@ENABLE_INTREE_EC@
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
@@ -871,8 +862,8 @@
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
MSVCR_DLL:=@MSVCR_DLL@
---- ./common/autoconf/toolchain.m4 Tue May 26 13:25:56 2015 -0700
-+++ ./common/autoconf/toolchain.m4 Sat Jul 18 13:32:19 2015 -0700
+--- ./common/autoconf/toolchain.m4 Wed Jul 01 21:51:50 2015 -0700
++++ ./common/autoconf/toolchain.m4 Sat Sep 05 06:32:21 2015 -0700
@@ -72,7 +72,7 @@
else
COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
@@ -882,7 +873,7 @@
if test $? -ne 0; then
AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler.])
AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION_TEST"])
-@@ -487,7 +487,7 @@
+@@ -571,7 +571,7 @@
# objcopy is used for moving debug symbols to separate files when
# full debug symbols are enabled.
@@ -891,7 +882,7 @@
AC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
# Only call fixup if objcopy was found.
if test -n "$OBJCOPY"; then
-@@ -555,8 +555,10 @@
+@@ -634,8 +634,10 @@
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
SET_SHARED_LIBRARY_MAPFILE=''
SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
@@ -903,7 +894,7 @@
fi
else
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-@@ -960,22 +962,33 @@
+@@ -1039,22 +1041,33 @@
CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
# The package path is used only on macosx?
@@ -949,16 +940,16 @@
fi
if test "x$OPENJDK_TARGET_OS" = xlinux; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
---- ./configure Tue May 26 13:25:56 2015 -0700
-+++ ./configure Sat Jul 18 13:32:19 2015 -0700
+--- ./configure Wed Jul 01 21:51:50 2015 -0700
++++ ./configure Sat Sep 05 06:32:21 2015 -0700
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
---- ./make/Javadoc.gmk Tue May 26 13:25:56 2015 -0700
-+++ ./make/Javadoc.gmk Sat Jul 18 13:32:19 2015 -0700
+--- ./make/Javadoc.gmk Wed Jul 01 21:51:50 2015 -0700
++++ ./make/Javadoc.gmk Sat Sep 05 06:32:21 2015 -0700
@@ -46,8 +46,18 @@
BUILD_NUMBER=$(JDK_BUILD_NUMBER)
@@ -979,8 +970,8 @@
-Djava.awt.headless=true \
$(NEW_JAVADOC) \
-bootclasspath $(JDK_OUTPUTDIR)/classes
---- ./make/Main.gmk Tue May 26 13:25:56 2015 -0700
-+++ ./make/Main.gmk Sat Jul 18 13:32:19 2015 -0700
+--- ./make/Main.gmk Wed Jul 01 21:51:50 2015 -0700
++++ ./make/Main.gmk Sat Sep 05 06:32:21 2015 -0700
@@ -58,7 +58,11 @@
# Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line,
@@ -993,8 +984,8 @@
### Main targets
---- ./make/common/MakeBase.gmk Tue May 26 13:25:56 2015 -0700
-+++ ./make/common/MakeBase.gmk Sat Jul 18 13:32:19 2015 -0700
+--- ./make/common/MakeBase.gmk Wed Jul 01 21:51:50 2015 -0700
++++ ./make/common/MakeBase.gmk Sat Sep 05 06:32:21 2015 -0700
@@ -338,7 +338,7 @@
# (and causing a crash on Cygwin).
# Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris.
@@ -1015,8 +1006,8 @@
endef
# Make directory without forking mkdir if not needed
---- ./make/common/NativeCompilation.gmk Tue May 26 13:25:56 2015 -0700
-+++ ./make/common/NativeCompilation.gmk Sat Jul 18 13:32:19 2015 -0700
+--- ./make/common/NativeCompilation.gmk Wed Jul 01 21:51:50 2015 -0700
++++ ./make/common/NativeCompilation.gmk Sat Sep 05 06:32:21 2015 -0700
@@ -151,9 +151,9 @@
# CC the compiler to use, default is $(CC)
# LDEXE the linker to use for linking executables, default is $(LDEXE)
@@ -1030,8 +1021,268 @@
ifneq (,$$($1_BIN))
$$(error BIN has been replaced with OBJECT_DIR)
---- ./hotspot/make/bsd/makefiles/build_vm_def.sh Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/make/bsd/makefiles/build_vm_def.sh Sat Jul 18 13:32:27 2015 -0700
+--- ./corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java Wed Jul 01 21:51:57 2015 -0700
++++ ./corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java Wed Jul 08 12:11:34 2015 -0700
+@@ -2430,8 +2430,8 @@
+ private void throwAwayData(ValueMember[] fields,
+ com.sun.org.omg.SendingContext.CodeBase sender)
+ throws InvalidClassException, StreamCorruptedException,
+- ClassNotFoundException, IOException
+- {
++ ClassNotFoundException, IOException {
++
+ for (int i = 0; i < fields.length; ++i) {
+
+ try {
+@@ -2566,8 +2566,7 @@
+
+ }
+
+- private static void setObjectField(Object o, Class c, String fieldName, Object v)
+- {
++ private static void setObjectField(Object o, Class c, String fieldName, Object v) {
+ try {
+ Field fld = c.getDeclaredField( fieldName ) ;
+ Class fieldCl = fld.getType();
+@@ -2577,9 +2576,15 @@
+ long key = bridge.objectFieldOffset( fld ) ;
+ bridge.putObject( o, key, v ) ;
+ } catch (Exception e) {
+- throw utilWrapper.errorSetObjectField( e, fieldName,
+- o.toString(),
+- v.toString() ) ;
++ if (o != null) {
++ throw utilWrapper.errorSetObjectField( e, fieldName,
++ o.toString(),
++ v.toString() ) ;
++ } else {
++ throw utilWrapper.errorSetObjectField( e, fieldName,
++ "null " + c.getName() + " object",
++ v.toString() ) ;
++ }
+ }
+ }
+
+@@ -2587,12 +2592,22 @@
+ {
+ try {
+ Field fld = c.getDeclaredField( fieldName ) ;
+- long key = bridge.objectFieldOffset( fld ) ;
+- bridge.putBoolean( o, key, v ) ;
++ if ((fld != null) && (fld.getType() == Boolean.TYPE)) {
++ long key = bridge.objectFieldOffset( fld ) ;
++ bridge.putBoolean( o, key, v ) ;
++ } else {
++ throw new InvalidObjectException("Field Type mismatch");
++ }
+ } catch (Exception e) {
++ if (o != null) {
+ throw utilWrapper.errorSetBooleanField( e, fieldName,
+ o.toString(),
+ new Boolean(v) ) ;
++ } else {
++ throw utilWrapper.errorSetBooleanField( e, fieldName,
++ "null " + c.getName() + " object",
++ new Boolean(v) ) ;
++ }
+ }
+ }
+
+@@ -2600,12 +2615,22 @@
+ {
+ try {
+ Field fld = c.getDeclaredField( fieldName ) ;
+- long key = bridge.objectFieldOffset( fld ) ;
+- bridge.putByte( o, key, v ) ;
++ if ((fld != null) && (fld.getType() == Byte.TYPE)) {
++ long key = bridge.objectFieldOffset( fld ) ;
++ bridge.putByte( o, key, v ) ;
++ } else {
++ throw new InvalidObjectException("Field Type mismatch");
++ }
+ } catch (Exception e) {
+- throw utilWrapper.errorSetByteField( e, fieldName,
+- o.toString(),
+- new Byte(v) ) ;
++ if (o != null) {
++ throw utilWrapper.errorSetByteField( e, fieldName,
++ o.toString(),
++ new Byte(v) ) ;
++ } else {
++ throw utilWrapper.errorSetByteField( e, fieldName,
++ "null " + c.getName() + " object",
++ new Byte(v) ) ;
++ }
+ }
+ }
+
+@@ -2613,12 +2638,22 @@
+ {
+ try {
+ Field fld = c.getDeclaredField( fieldName ) ;
+- long key = bridge.objectFieldOffset( fld ) ;
+- bridge.putChar( o, key, v ) ;
++ if ((fld != null) && (fld.getType() == Character.TYPE)) {
++ long key = bridge.objectFieldOffset( fld ) ;
++ bridge.putChar( o, key, v ) ;
++ } else {
++ throw new InvalidObjectException("Field Type mismatch");
++ }
+ } catch (Exception e) {
+- throw utilWrapper.errorSetCharField( e, fieldName,
+- o.toString(),
+- new Character(v) ) ;
++ if (o != null) {
++ throw utilWrapper.errorSetCharField( e, fieldName,
++ o.toString(),
++ new Character(v) ) ;
++ } else {
++ throw utilWrapper.errorSetCharField( e, fieldName,
++ "null " + c.getName() + " object",
++ new Character(v) ) ;
++ }
+ }
+ }
+
+@@ -2626,12 +2661,22 @@
+ {
+ try {
+ Field fld = c.getDeclaredField( fieldName ) ;
+- long key = bridge.objectFieldOffset( fld ) ;
+- bridge.putShort( o, key, v ) ;
++ if ((fld != null) && (fld.getType() == Short.TYPE)) {
++ long key = bridge.objectFieldOffset( fld ) ;
++ bridge.putShort( o, key, v ) ;
++ } else {
++ throw new InvalidObjectException("Field Type mismatch");
++ }
+ } catch (Exception e) {
++ if (o != null) {
+ throw utilWrapper.errorSetShortField( e, fieldName,
+ o.toString(),
+ new Short(v) ) ;
++ } else {
++ throw utilWrapper.errorSetShortField( e, fieldName,
++ "null " + c.getName() + " object",
++ new Short(v) ) ;
++ }
+ }
+ }
+
+@@ -2639,12 +2684,22 @@
+ {
+ try {
+ Field fld = c.getDeclaredField( fieldName ) ;
+- long key = bridge.objectFieldOffset( fld ) ;
+- bridge.putInt( o, key, v ) ;
++ if ((fld != null) && (fld.getType() == Integer.TYPE)) {
++ long key = bridge.objectFieldOffset( fld ) ;
++ bridge.putInt( o, key, v ) ;
++ } else {
++ throw new InvalidObjectException("Field Type mismatch");
++ }
+ } catch (Exception e) {
+- throw utilWrapper.errorSetIntField( e, fieldName,
+- o.toString(),
+- new Integer(v) ) ;
++ if (o != null) {
++ throw utilWrapper.errorSetIntField( e, fieldName,
++ o.toString(),
++ new Integer(v) ) ;
++ } else {
++ throw utilWrapper.errorSetIntField( e, fieldName,
++ "null " + c.getName() + " object",
++ new Integer(v) ) ;
++ }
+ }
+ }
+
+@@ -2652,12 +2707,22 @@
+ {
+ try {
+ Field fld = c.getDeclaredField( fieldName ) ;
+- long key = bridge.objectFieldOffset( fld ) ;
+- bridge.putLong( o, key, v ) ;
++ if ((fld != null) && (fld.getType() == Long.TYPE)) {
++ long key = bridge.objectFieldOffset( fld ) ;
++ bridge.putLong( o, key, v ) ;
++ } else {
++ throw new InvalidObjectException("Field Type mismatch");
++ }
+ } catch (Exception e) {
+- throw utilWrapper.errorSetLongField( e, fieldName,
+- o.toString(),
+- new Long(v) ) ;
++ if (o != null) {
++ throw utilWrapper.errorSetLongField( e, fieldName,
++ o.toString(),
++ new Long(v) ) ;
++ } else {
++ throw utilWrapper.errorSetLongField( e, fieldName,
++ "null " + c.getName() + " object",
++ new Long(v) ) ;
++ }
+ }
+ }
+
+@@ -2665,12 +2730,22 @@
+ {
+ try {
+ Field fld = c.getDeclaredField( fieldName ) ;
+- long key = bridge.objectFieldOffset( fld ) ;
+- bridge.putFloat( o, key, v ) ;
++ if ((fld != null) && (fld.getType() == Float.TYPE)) {
++ long key = bridge.objectFieldOffset( fld ) ;
++ bridge.putFloat( o, key, v ) ;
++ } else {
++ throw new InvalidObjectException("Field Type mismatch");
++ }
+ } catch (Exception e) {
+- throw utilWrapper.errorSetFloatField( e, fieldName,
+- o.toString(),
+- new Float(v) ) ;
++ if (o != null) {
++ throw utilWrapper.errorSetFloatField( e, fieldName,
++ o.toString(),
++ new Float(v) ) ;
++ } else {
++ throw utilWrapper.errorSetFloatField( e, fieldName,
++ "null " + c.getName() + " object",
++ new Float(v) ) ;
++ }
+ }
+ }
+
+@@ -2678,12 +2753,22 @@
+ {
+ try {
+ Field fld = c.getDeclaredField( fieldName ) ;
+- long key = bridge.objectFieldOffset( fld ) ;
+- bridge.putDouble( o, key, v ) ;
++ if ((fld != null) && (fld.getType() == Double.TYPE)) {
++ long key = bridge.objectFieldOffset( fld ) ;
++ bridge.putDouble( o, key, v ) ;
++ } else {
++ throw new InvalidObjectException("Field Type mismatch");
++ }
+ } catch (Exception e) {
+- throw utilWrapper.errorSetDoubleField( e, fieldName,
+- o.toString(),
+- new Double(v) ) ;
++ if (o != null) {
++ throw utilWrapper.errorSetDoubleField( e, fieldName,
++ o.toString(),
++ new Double(v) ) ;
++ } else {
++ throw utilWrapper.errorSetDoubleField( e, fieldName,
++ "null " + c.getName() + " object",
++ new Double(v) ) ;
++ }
+ }
+ }
+
+--- ./hotspot/make/bsd/makefiles/build_vm_def.sh Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/make/bsd/makefiles/build_vm_def.sh Sat Sep 05 06:33:34 2015 -0700
@@ -1,12 +1,28 @@
#!/bin/sh
@@ -1067,8 +1318,8 @@
+ if ($3 ~ /^_ZN9Arguments17SharedArchivePathE$/) print "\t" $3 ";"
+ }' | sort -u ;;
+esac
---- ./hotspot/make/bsd/makefiles/debug.make Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/make/bsd/makefiles/debug.make Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/make/bsd/makefiles/debug.make Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/make/bsd/makefiles/debug.make Sat Sep 05 06:33:34 2015 -0700
@@ -35,7 +35,10 @@
# to inhibit the effect of the previous line on CFLAGS.
@@ -1081,8 +1332,8 @@
VERSION = debug
SYSDEFS += -DASSERT
---- ./hotspot/make/bsd/makefiles/fastdebug.make Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/make/bsd/makefiles/fastdebug.make Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/make/bsd/makefiles/fastdebug.make Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/make/bsd/makefiles/fastdebug.make Sat Sep 05 06:33:34 2015 -0700
@@ -56,7 +56,10 @@
# to inhibit the effect of the previous line on CFLAGS.
@@ -1095,8 +1346,8 @@
VERSION = fastdebug
SYSDEFS += -DASSERT -DCHECK_UNHANDLED_OOPS
---- ./hotspot/make/bsd/makefiles/gcc.make Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/make/bsd/makefiles/gcc.make Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/make/bsd/makefiles/gcc.make Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/make/bsd/makefiles/gcc.make Sat Sep 05 06:33:34 2015 -0700
@@ -168,6 +168,9 @@
CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
endif
@@ -1171,7 +1422,7 @@
OPT_CFLAGS/ppc = -g
OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./hotspot/make/bsd/makefiles/launcher.make Sat Jul 18 13:32:27 2015 -0700
++++ ./hotspot/make/bsd/makefiles/launcher.make Sat Sep 05 06:33:34 2015 -0700
@@ -0,0 +1,117 @@
+#
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
@@ -1290,8 +1541,8 @@
+ $(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@
+ $(QUIETLY) chmod +x $@
+
---- ./hotspot/make/bsd/makefiles/mapfile-vers-debug Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/make/bsd/makefiles/mapfile-vers-debug Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/make/bsd/makefiles/mapfile-vers-debug Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/make/bsd/makefiles/mapfile-vers-debug Sat Sep 05 06:33:34 2015 -0700
@@ -21,246 +21,254 @@
# questions.
#
@@ -1779,7 +2030,7 @@
+ *;
+};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./hotspot/make/bsd/makefiles/mapfile-vers-debug.macosx Sat Jul 18 13:32:27 2015 -0700
++++ ./hotspot/make/bsd/makefiles/mapfile-vers-debug.macosx Sat Sep 05 06:33:34 2015 -0700
@@ -0,0 +1,266 @@
+#
+# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
@@ -2047,8 +2298,8 @@
+
+ # INSERT VTABLE SYMBOLS HERE
+
---- ./hotspot/make/bsd/makefiles/mapfile-vers-product Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/make/bsd/makefiles/mapfile-vers-product Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/make/bsd/makefiles/mapfile-vers-product Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/make/bsd/makefiles/mapfile-vers-product Sat Sep 05 06:33:34 2015 -0700
@@ -21,241 +21,249 @@
# questions.
#
@@ -2527,7 +2778,7 @@
+ *;
+};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./hotspot/make/bsd/makefiles/mapfile-vers-product.macosx Sat Jul 18 13:32:27 2015 -0700
++++ ./hotspot/make/bsd/makefiles/mapfile-vers-product.macosx Sat Sep 05 06:33:34 2015 -0700
@@ -0,0 +1,261 @@
+#
+# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
@@ -2790,8 +3041,8 @@
+
+ # INSERT VTABLE SYMBOLS HERE
+
---- ./hotspot/make/bsd/makefiles/optimized.make Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/make/bsd/makefiles/optimized.make Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/make/bsd/makefiles/optimized.make Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/make/bsd/makefiles/optimized.make Sat Sep 05 06:33:34 2015 -0700
@@ -38,6 +38,9 @@
# to inhibit the effect of the previous line on CFLAGS.
@@ -2803,8 +3054,8 @@
+MAPFILE = $(GAMMADIR)/make/bsd/makefiles/mapfile-vers-debug$(MAPSUFX)
VERSION = optimized
---- ./hotspot/make/bsd/makefiles/product.make Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/make/bsd/makefiles/product.make Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/make/bsd/makefiles/product.make Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/make/bsd/makefiles/product.make Sat Sep 05 06:33:34 2015 -0700
@@ -38,7 +38,10 @@
# to inhibit the effect of the previous line on CFLAGS.
@@ -2817,8 +3068,8 @@
SYSDEFS += -DPRODUCT
VERSION = optimized
---- ./hotspot/make/bsd/makefiles/rules.make Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/make/bsd/makefiles/rules.make Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/make/bsd/makefiles/rules.make Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/make/bsd/makefiles/rules.make Sat Sep 05 06:33:34 2015 -0700
@@ -34,7 +34,7 @@
CC_COMPILE = $(CC) $(CXXFLAGS) $(CFLAGS)
CXX_COMPILE = $(CXX) $(CXXFLAGS) $(CFLAGS)
@@ -2828,8 +3079,8 @@
COMPILE.CC = $(CC_COMPILE) -c
GENASM.CC = $(CC_COMPILE) -S
---- ./hotspot/make/bsd/makefiles/vm.make Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/make/bsd/makefiles/vm.make Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/make/bsd/makefiles/vm.make Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/make/bsd/makefiles/vm.make Sat Sep 05 06:33:34 2015 -0700
@@ -107,7 +107,7 @@
# File specific flags
CXXFLAGS += $(CXXFLAGS/BYFILE)
@@ -2839,8 +3090,19 @@
CXXFLAGS += -DDEFAULT_LIBPATH="\"$(DEFAULT_LIBPATH)\""
endif
---- ./hotspot/src/cpu/x86/vm/jni_x86.h Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/cpu/x86/vm/jni_x86.h Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/make/hotspot_version Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/make/hotspot_version Sat Sep 05 06:33:34 2015 -0700
+@@ -35,7 +35,7 @@
+
+ HS_MAJOR_VER=25
+ HS_MINOR_VER=60
+-HS_BUILD_NUMBER=22
++HS_BUILD_NUMBER=23
+
+ JDK_MAJOR_VER=1
+ JDK_MINOR_VER=8
+--- ./hotspot/src/cpu/x86/vm/jni_x86.h Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/cpu/x86/vm/jni_x86.h Sat Sep 05 06:33:34 2015 -0700
@@ -34,7 +34,7 @@
#ifndef __has_attribute
#define __has_attribute(x) 0
@@ -2850,8 +3112,8 @@
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT __attribute__((visibility("default")))
#else
---- ./hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp Sat Sep 05 06:33:34 2015 -0700
@@ -2266,7 +2266,7 @@
if (!is_critical_native) {
// reset handle block
@@ -2861,8 +3123,8 @@
// Any exception pending?
__ cmpptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD);
---- ./hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp Sat Sep 05 06:33:34 2015 -0700
@@ -1287,7 +1287,7 @@
// reset handle block
@@ -2872,9 +3134,9 @@
// If result was an oop then unbox and save it in the frame
{ Label L;
---- ./hotspot/src/cpu/x86/vm/x86_32.ad Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/cpu/x86/vm/x86_32.ad Sat Jul 18 13:32:27 2015 -0700
-@@ -1210,6 +1210,7 @@
+--- ./hotspot/src/cpu/x86/vm/x86_32.ad Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/cpu/x86/vm/x86_32.ad Sat Sep 05 06:33:34 2015 -0700
+@@ -1246,6 +1246,7 @@
Unimplemented();
@@ -2882,8 +3144,21 @@
}
#ifndef PRODUCT
+--- ./hotspot/src/os/aix/vm/os_aix.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/os/aix/vm/os_aix.cpp Sat Sep 05 06:33:34 2015 -0700
+@@ -5236,6 +5236,10 @@
+ return 0;
+ }
+
++ const int n = strlen(buffer);
++
++ jio_snprintf(buffer + n, bufferSize - n, "/core or core.%d", current_process_id());
++
+ return strlen(buffer);
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./hotspot/src/os/bsd/vm/decoder_bsd.cpp Sat Jul 18 13:32:27 2015 -0700
++++ ./hotspot/src/os/bsd/vm/decoder_bsd.cpp Sat Sep 05 06:33:34 2015 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
@@ -2932,8 +3207,8 @@
+ return false;
+}
+#endif
---- ./hotspot/src/os/bsd/vm/jsig.c Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/os/bsd/vm/jsig.c Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/src/os/bsd/vm/jsig.c Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/os/bsd/vm/jsig.c Sat Sep 05 06:33:34 2015 -0700
@@ -140,9 +140,8 @@
}
@@ -2946,8 +3221,8 @@
static int call_os_sigaction(int sig, const struct sigaction *act,
struct sigaction *oact) {
---- ./hotspot/src/os/bsd/vm/jvm_bsd.cpp Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/os/bsd/vm/jvm_bsd.cpp Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/src/os/bsd/vm/jvm_bsd.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/os/bsd/vm/jvm_bsd.cpp Sat Sep 05 06:33:34 2015 -0700
@@ -50,6 +50,7 @@
case INTERRUPT_SIGNAL:
case SIGFPE:
@@ -3057,8 +3332,8 @@
+ jio_snprintf(buf, len, "SIG%s", signame);
+ return true;
}
---- ./hotspot/src/os/bsd/vm/jvm_bsd.h Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/os/bsd/vm/jvm_bsd.h Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/src/os/bsd/vm/jvm_bsd.h Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/os/bsd/vm/jvm_bsd.h Sat Sep 05 06:33:34 2015 -0700
@@ -112,20 +112,6 @@
#define SHUTDOWN2_SIGNAL SIGINT
#define SHUTDOWN3_SIGNAL SIGTERM
@@ -3080,8 +3355,8 @@
#endif /* JVM_MD_H */
#endif // OS_BSD_VM_JVM_BSD_H
---- ./hotspot/src/os/bsd/vm/osThread_bsd.cpp Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/os/bsd/vm/osThread_bsd.cpp Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/src/os/bsd/vm/osThread_bsd.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/os/bsd/vm/osThread_bsd.cpp Sat Sep 05 06:33:34 2015 -0700
@@ -30,7 +30,7 @@
void OSThread::pd_initialize() {
@@ -3091,9 +3366,16 @@
_thread_id = 0;
#else
_thread_id = NULL;
---- ./hotspot/src/os/bsd/vm/os_bsd.cpp Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/os/bsd/vm/os_bsd.cpp Sat Jul 18 13:32:27 2015 -0700
-@@ -103,10 +103,24 @@
+--- ./hotspot/src/os/bsd/vm/os_bsd.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/os/bsd/vm/os_bsd.cpp Sat Sep 05 06:33:34 2015 -0700
+@@ -97,16 +97,31 @@
+ # include <sys/shm.h>
+ #ifndef __APPLE__
+ # include <link.h>
++# include <stdlib.h>
+ #endif
+ # include <stdint.h>
+ # include <inttypes.h>
# include <sys/ioctl.h>
# include <sys/syscall.h>
@@ -3118,7 +3400,7 @@
#ifdef __APPLE__
# include <mach/mach.h> // semaphore_* API
# include <mach-o/dyld.h>
-@@ -169,6 +183,27 @@
+@@ -169,6 +184,27 @@
// available here means free
julong os::Bsd::available_memory() {
@@ -3146,7 +3428,7 @@
uint64_t available = physical_memory() >> 2;
#ifdef __APPLE__
mach_msg_type_number_t count = HOST_VM_INFO64_COUNT;
-@@ -208,7 +243,7 @@
+@@ -208,7 +244,7 @@
static bool init = false;
static bool privileges = false;
if (!init) {
@@ -3155,7 +3437,7 @@
init = true;
}
return privileges;
-@@ -411,12 +446,21 @@
+@@ -411,12 +447,21 @@
const char *v = ::getenv("LD_LIBRARY_PATH");
const char *v_colon = ":";
if (v == NULL) { v = ""; v_colon = ""; }
@@ -3177,7 +3459,7 @@
Arguments::set_library_path(ld_library_path);
FREE_C_HEAP_ARRAY(char, ld_library_path, mtInternal);
}
-@@ -1190,29 +1234,38 @@
+@@ -1190,35 +1235,38 @@
pid_t os::Bsd::gettid() {
int retval = -1;
@@ -3189,21 +3471,26 @@
guarantee(retval != 0, "just checking");
return retval;
--#elif __FreeBSD__
-- retval = syscall(SYS_thr_self);
--#elif __OpenBSD__
+#elif defined(__FreeBSD__)
+#if __FreeBSD_version > 900030
+ return ::pthread_getthreadid_np();
-+#else
+ #else
+- #ifdef __FreeBSD__
+- retval = syscall(SYS_thr_self);
+- #else
+- #ifdef __OpenBSD__
+ long tid;
+ thr_self(&tid);
+ return (pid_t)tid;
+#endif
+#elif defined(__OpenBSD__)
retval = syscall(SYS_getthrid);
--#elif __NetBSD__
+- #else
+- #ifdef __NetBSD__
- retval = (pid_t) syscall(SYS__lwp_self);
+- #endif
+- #endif
+- #endif
+#elif defined(__NetBSD__)
+ retval = (pid_t) _lwp_self();
#endif
@@ -3223,7 +3510,7 @@
#else
return (intx)::pthread_self();
#endif
-@@ -1690,14 +1743,14 @@
+@@ -1696,14 +1744,14 @@
}
void os::print_os_info_brief(outputStream* st) {
@@ -3240,7 +3527,7 @@
os::Posix::print_uname_info(st);
-@@ -1710,6 +1763,29 @@
+@@ -1716,6 +1764,29 @@
// Nothing to do for now.
}
@@ -3270,7 +3557,7 @@
void os::print_memory_info(outputStream* st) {
st->print("Memory:");
-@@ -1719,11 +1795,14 @@
+@@ -1725,11 +1796,14 @@
os::physical_memory() >> 10);
st->print("(" UINT64_FORMAT "k free)",
os::available_memory() >> 10);
@@ -3290,7 +3577,7 @@
st->cr();
}
-@@ -1959,7 +2038,7 @@
+@@ -1965,7 +2039,7 @@
os_semaphore_t _semaphore;
};
@@ -3299,7 +3586,7 @@
SEM_INIT(_semaphore, 0);
}
-@@ -2147,7 +2226,7 @@
+@@ -2153,7 +2227,7 @@
if (::write(fd, "", 1) == 1) {
mmap(base, size,
PROT_READ|PROT_WRITE|PROT_EXEC,
@@ -3308,7 +3595,7 @@
}
}
::close(fd);
-@@ -2257,7 +2336,7 @@
+@@ -2263,7 +2337,7 @@
return ::mprotect(addr, size, PROT_NONE) == 0;
#else
uintptr_t res = (uintptr_t) ::mmap(addr, size, PROT_NONE,
@@ -3317,7 +3604,7 @@
return res != (uintptr_t) MAP_FAILED;
#endif
}
-@@ -2284,7 +2363,7 @@
+@@ -2290,7 +2364,7 @@
char * addr;
int flags;
@@ -3326,7 +3613,7 @@
if (fixed) {
assert((uintptr_t)requested_addr % os::Bsd::page_size() == 0, "unaligned address");
flags |= MAP_FIXED;
-@@ -2773,6 +2852,7 @@
+@@ -2779,6 +2853,7 @@
return OS_OK;
#elif defined(__FreeBSD__)
int ret = pthread_setprio(thread->osthread()->pthread_id(), newpri);
@@ -3334,7 +3621,7 @@
#elif defined(__APPLE__) || defined(__NetBSD__)
struct sched_param sp;
int policy;
-@@ -3367,18 +3447,6 @@
+@@ -3373,18 +3448,6 @@
}
}
@@ -3353,7 +3640,7 @@
static const char* get_signal_handler_name(address handler,
char* buf, int buflen) {
int offset;
-@@ -3402,9 +3470,6 @@
+@@ -3408,9 +3471,6 @@
sigaction(sig, NULL, &sa);
@@ -3363,7 +3650,7 @@
st->print("%s: ", os::exception_name(sig, buf, buflen));
address handler = (sa.sa_flags & SA_SIGINFO)
-@@ -3426,7 +3491,7 @@
+@@ -3432,7 +3492,7 @@
// May be, handler was resetted by VMError?
if(rh != NULL) {
handler = rh;
@@ -3372,7 +3659,7 @@
}
st->print(", sa_flags=");
-@@ -3502,8 +3567,6 @@
+@@ -3508,8 +3568,6 @@
os_sigaction(sig, (struct sigaction*)NULL, &act);
@@ -3381,7 +3668,7 @@
address thisHandler = (act.sa_flags & SA_SIGINFO)
? CAST_FROM_FN_PTR(address, act.sa_sigaction)
: CAST_FROM_FN_PTR(address, act.sa_handler) ;
-@@ -3563,6 +3626,14 @@
+@@ -3574,6 +3632,14 @@
extern bool signal_name(int signo, char* buf, size_t len);
@@ -3396,7 +3683,7 @@
const char* os::exception_name(int exception_code, char* buf, size_t size) {
if (0 < exception_code && exception_code <= SIGRTMAX) {
// signal
-@@ -3762,6 +3833,19 @@
+@@ -3770,6 +3836,19 @@
};
int os::active_processor_count() {
@@ -3416,7 +3703,7 @@
return _processor_count;
}
-@@ -3973,7 +4057,10 @@
+@@ -3981,7 +4060,10 @@
}
int fd;
int o_delete = (oflag & O_DELETE);
@@ -3428,7 +3715,7 @@
fd = ::open(path, oflag, mode);
if (fd == -1) return -1;
-@@ -4018,7 +4105,7 @@
+@@ -4026,7 +4108,7 @@
* 4843136: (process) pipe file descriptor from Runtime.exec not being closed
* 6339493: (process) Runtime.exec does not close all file descriptors on Solaris 9
*/
@@ -3437,8 +3724,45 @@
{
int flags = ::fcntl(fd, F_GETFD);
if (flags != -1)
---- ./hotspot/src/os/bsd/vm/vmError_bsd.cpp Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/os/bsd/vm/vmError_bsd.cpp Sat Jul 18 13:32:27 2015 -0700
+@@ -4822,13 +4904,29 @@
+
+ // Get the default path to the core file
+ // Returns the length of the string
+-int os::get_core_path(char* buffer, size_t bufferSize) {
+- int n = jio_snprintf(buffer, bufferSize, "/cores");
+-
+- // Truncate if theoretical string was longer than bufferSize
+- n = MIN2(n, (int)bufferSize);
+-
+- return n;
++int os::get_core_path(char *buffer, size_t bufferSize) {
++#ifdef __APPLE__
++ jio_snprintf(buffer, bufferSize, "/cores/core.%d", current_process_id());
++#else
++ const char *p = get_current_directory(buffer, bufferSize);
++
++ if (p == NULL) {
++ assert(p != NULL, "failed to get current directory");
++ return 0;
++ }
++
++ const char *q = getprogname();
++
++ if (q == NULL) {
++ assert(q != NULL, "failed to get progname");
++ return 0;
++ }
++
++ const int n = strlen(buffer);
++
++ jio_snprintf(buffer + n, bufferSize - n, "/%s.core", q);
++#endif
++ return strlen(buffer);
+ }
+
+ #ifndef PRODUCT
+--- ./hotspot/src/os/bsd/vm/vmError_bsd.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/os/bsd/vm/vmError_bsd.cpp Sat Sep 05 06:33:34 2015 -0700
@@ -33,30 +33,50 @@
#include <sys/syscall.h>
#include <unistd.h>
@@ -3500,9 +3824,45 @@
os::fork_and_exec(buf);
yes = false;
}
---- ./hotspot/src/os/posix/vm/os_posix.cpp Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/os/posix/vm/os_posix.cpp Sat Jul 18 13:32:27 2015 -0700
-@@ -201,8 +201,13 @@
+--- ./hotspot/src/os/linux/vm/os_linux.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/os/linux/vm/os_linux.cpp Sat Sep 05 06:33:34 2015 -0700
+@@ -6046,6 +6046,10 @@
+ return 0;
+ }
+
++ const int n = strlen(buffer);
++
++ jio_snprintf(buffer + n, bufferSize - n, "/core or core.%d", current_process_id());
++
+ return strlen(buffer);
+ }
+
+--- ./hotspot/src/os/posix/vm/os_posix.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/os/posix/vm/os_posix.cpp Sat Sep 05 06:33:34 2015 -0700
+@@ -53,12 +53,11 @@
+ n = get_core_path(buffer, bufferSize);
+
+ if (getrlimit(RLIMIT_CORE, &rlim) != 0) {
+- jio_snprintf(buffer + n, bufferSize - n, "/core or core.%d (may not exist)", current_process_id());
++ jio_snprintf(buffer + n, bufferSize - n, " (may not exist)");
+ success = true;
+ } else {
+ switch(rlim.rlim_cur) {
+ case RLIM_INFINITY:
+- jio_snprintf(buffer + n, bufferSize - n, "/core or core.%d", current_process_id());
+ success = true;
+ break;
+ case 0:
+@@ -66,7 +65,7 @@
+ success = false;
+ break;
+ default:
+- jio_snprintf(buffer + n, bufferSize - n, "/core or core.%d (max size %lu kB). To ensure a full core dump, try \"ulimit -c unlimited\" before starting Java again", current_process_id(), (unsigned long)(rlim.rlim_cur >> 10));
++ jio_snprintf(buffer + n, bufferSize - n, " (max size %lu kB). To ensure a full core dump, try \"ulimit -c unlimited\" before starting Java again", (unsigned long)(rlim.rlim_cur >> 10));
+ success = true;
+ break;
+ }
+@@ -201,8 +200,13 @@
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
else st->print("%d", rlim.rlim_cur);
@@ -3516,7 +3876,7 @@
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
else st->print("%uk", rlim.rlim_cur >> 10);
st->cr();
-@@ -222,7 +227,11 @@
+@@ -222,7 +226,11 @@
bool os::has_allocatable_memory_limit(julong* limit) {
struct rlimit rlim;
@@ -3528,7 +3888,7 @@
// if there was an error when calling getrlimit, assume that there is no limitation
// on virtual memory.
bool result;
-@@ -706,8 +715,12 @@
+@@ -706,8 +714,12 @@
{ SI_USER, "SI_USER", "Signal sent by kill()." },
{ SI_QUEUE, "SI_QUEUE", "Signal sent by the sigqueue()." },
{ SI_TIMER, "SI_TIMER", "Signal generated by expiration of a timer set by timer_settime()." },
@@ -3541,8 +3901,178 @@
// Linux specific
#ifdef SI_TKILL
{ SI_TKILL, "SI_TKILL", "Signal sent by tkill (pthread_kill)" },
---- ./hotspot/src/share/vm/opto/node.cpp Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/share/vm/opto/node.cpp Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/src/os/solaris/vm/os_solaris.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/os/solaris/vm/os_solaris.cpp Sat Sep 05 06:33:34 2015 -0700
+@@ -6500,6 +6500,10 @@
+ return 0;
+ }
+
++ const int n = strlen(buffer);
++
++ jio_snprintf(buffer + n, bufferSize - n, "/core or core.%d", current_process_id());
++
+ return strlen(buffer);
+ }
+
+--- ./hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp Sat Sep 05 06:33:34 2015 -0700
+@@ -189,7 +189,7 @@
+ return CPUVisitor::visit(nodeh, state);
+ }
+
+- PICL(bool is_fujitsu) : _L1_data_cache_line_size(0), _L2_data_cache_line_size(0), _dl_handle(NULL) {
++ PICL(bool is_fujitsu, bool is_sun4v) : _L1_data_cache_line_size(0), _L2_data_cache_line_size(0), _dl_handle(NULL) {
+ if (!open_library()) {
+ return;
+ }
+@@ -201,7 +201,7 @@
+ if (is_fujitsu) {
+ cpu_class = "core";
+ }
+- CPUVisitor cpu_visitor(this, os::processor_count());
++ CPUVisitor cpu_visitor(this, (is_sun4v && !is_fujitsu) ? 1 : os::processor_count());
+ _picl_walk_tree_by_class(rooth, cpu_class, &cpu_visitor, PICL_visit_cpu_helper);
+ if (cpu_visitor.l1_visitor()->is_assigned()) { // Is there a value?
+ _L1_data_cache_line_size = cpu_visitor.l1_visitor()->value();
+@@ -494,7 +494,7 @@
+ }
+
+ // Figure out cache line sizes using PICL
+- PICL picl((features & sparc64_family_m) != 0);
++ PICL picl((features & sparc64_family_m) != 0, (features & sun4v_m) != 0);
+ _L2_data_cache_line_size = picl.L2_data_cache_line_size();
+
+ return features;
+--- ./hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Sat Sep 05 06:33:34 2015 -0700
+@@ -2189,7 +2189,15 @@
+ if (log2_scale != 0) {
+ // temporary fix (platform dependent code without shift on Intel would be better)
+ // TODO: ARM also allows embedded shift in the address
+- __ shift_left(index_op, log2_scale, index_op);
++ LIR_Opr tmp = new_pointer_register();
++ if (TwoOperandLIRForm) {
++ __ move(index_op, tmp);
++ index_op = tmp;
++ }
++ __ shift_left(index_op, log2_scale, tmp);
++ if (!TwoOperandLIRForm) {
++ index_op = tmp;
++ }
+ }
+
+ LIR_Address* addr = new LIR_Address(base_op, index_op, x->basic_type());
+--- ./hotspot/src/share/vm/classfile/systemDictionary.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/share/vm/classfile/systemDictionary.cpp Sat Sep 05 06:33:34 2015 -0700
+@@ -2349,9 +2349,6 @@
+ assert(!THREAD->is_Compiler_thread(), "");
+ Handle method_type =
+ SystemDictionary::find_method_handle_type(signature, accessing_klass, CHECK_(empty));
+- if (false) { // FIXME: Decide if the Java upcall should resolve signatures.
+- method_type = java_lang_String::create_from_symbol(signature, CHECK_(empty));
+- }
+
+ KlassHandle mh_klass = SystemDictionary::MethodHandle_klass();
+ int ref_kind = JVM_REF_invokeVirtual;
+@@ -2383,6 +2380,24 @@
+ return unpack_method_and_appendix(mname, accessing_klass, appendix_box, appendix_result, THREAD);
+ }
+
++// Decide if we can globally cache a lookup of this class, to be returned to any client that asks.
++// We must ensure that all class loaders everywhere will reach this class, for any client.
++// This is a safe bet for public classes in java.lang, such as Object and String.
++// We also include public classes in java.lang.invoke, because they appear frequently in system-level method types.
++// Out of an abundance of caution, we do not include any other classes, not even for packages like java.util.
++static bool is_always_visible_class(oop mirror) {
++ Klass* klass = java_lang_Class::as_Klass(mirror);
++ if (klass->oop_is_objArray()) {
++ klass = ObjArrayKlass::cast(klass)->bottom_klass(); // check element type
++ }
++ if (klass->oop_is_typeArray()) {
++ return true; // primitive array
++ }
++ assert(klass->oop_is_instance(), klass->external_name());
++ return klass->is_public() &&
++ (InstanceKlass::cast(klass)->is_same_class_package(SystemDictionary::Object_klass()) || // java.lang
++ InstanceKlass::cast(klass)->is_same_class_package(SystemDictionary::MethodHandle_klass())); // java.lang.invoke
++}
+
+ // Ask Java code to find or construct a java.lang.invoke.MethodType for the given
+ // signature, as interpreted relative to the given class loader.
+@@ -2405,32 +2420,33 @@
+ }
+
+ Handle class_loader, protection_domain;
+- bool is_on_bcp = true; // keep this true as long as we can materialize from the boot classloader
++ if (accessing_klass.not_null()) {
++ class_loader = Handle(THREAD, InstanceKlass::cast(accessing_klass())->class_loader());
++ protection_domain = Handle(THREAD, InstanceKlass::cast(accessing_klass())->protection_domain());
++ }
++ bool can_be_cached = true;
+ int npts = ArgumentCount(signature).size();
+ objArrayHandle pts = oopFactory::new_objArray(SystemDictionary::Class_klass(), npts, CHECK_(empty));
+ int arg = 0;
+- Handle rt; // the return type from the signature
++ Handle rt; // the return type from the signature
+ ResourceMark rm(THREAD);
+ for (SignatureStream ss(signature); !ss.is_done(); ss.next()) {
+ oop mirror = NULL;
+- if (is_on_bcp) {
+- // Note: class_loader & protection_domain are both null at this point.
+- mirror = ss.as_java_mirror(class_loader, protection_domain,
++ if (can_be_cached) {
++ // Use neutral class loader to lookup candidate classes to be placed in the cache.
++ mirror = ss.as_java_mirror(Handle(), Handle(),
+ SignatureStream::ReturnNull, CHECK_(empty));
+- if (mirror == NULL) {
+- // fall back from BCP to accessing_klass
+- if (accessing_klass.not_null()) {
+- class_loader = Handle(THREAD, InstanceKlass::cast(accessing_klass())->class_loader());
+- protection_domain = Handle(THREAD, InstanceKlass::cast(accessing_klass())->protection_domain());
+- }
+- is_on_bcp = false;
++ if (mirror == NULL || (ss.is_object() && !is_always_visible_class(mirror))) {
++ // Fall back to accessing_klass context.
++ can_be_cached = false;
+ }
+ }
+- if (!is_on_bcp) {
++ if (!can_be_cached) {
+ // Resolve, throwing a real error if it doesn't work.
+ mirror = ss.as_java_mirror(class_loader, protection_domain,
+ SignatureStream::NCDFError, CHECK_(empty));
+ }
++ assert(!oopDesc::is_null(mirror), ss.as_symbol(THREAD)->as_C_string());
+ if (ss.at_return_type())
+ rt = Handle(THREAD, mirror);
+ else
+@@ -2462,7 +2478,7 @@
+ &args, CHECK_(empty));
+ Handle method_type(THREAD, (oop) result.get_jobject());
+
+- if (is_on_bcp) {
++ if (can_be_cached) {
+ // We can cache this MethodType inside the JVM.
+ MutexLocker ml(SystemDictionary_lock, THREAD);
+ spe = invoke_method_table()->find_entry(index, hash, signature, null_iid);
+--- ./hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Sat Sep 05 06:33:34 2015 -0700
+@@ -3339,9 +3339,11 @@
+ // Not unloading classes this cycle
+ assert(!should_unload_classes(), "Inconsitency!");
+
++ // If we are not unloading classes then add SO_AllCodeCache to root
++ // scanning options.
++ add_root_scanning_option(rso);
++
+ if ((!verifying() || unloaded_classes_last_cycle()) && should_verify) {
+- // Include symbols, strings and code cache elements to prevent their resurrection.
+- add_root_scanning_option(rso);
+ set_verifying(true);
+ } else if (verifying() && !should_verify) {
+ // We were verifying, but some verification flags got disabled.
+--- ./hotspot/src/share/vm/opto/node.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/share/vm/opto/node.cpp Sat Sep 05 06:33:34 2015 -0700
@@ -286,6 +286,10 @@
#ifdef _MSC_VER // the IDX_INIT hack falls foul of warning C4355
#pragma warning( disable:4355 ) // 'this' : used in base member initializer list
@@ -3565,8 +4095,8 @@
//------------------------------clone------------------------------------------
// Clone a Node.
---- ./hotspot/src/share/vm/runtime/os.cpp Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/share/vm/runtime/os.cpp Sat Jul 18 13:32:27 2015 -0700
+--- ./hotspot/src/share/vm/runtime/os.cpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/share/vm/runtime/os.cpp Sat Sep 05 06:33:34 2015 -0700
@@ -420,15 +420,6 @@
if (_native_java_library == NULL) {
vm_exit_during_initialization("Unable to load native library", ebuf);
@@ -3583,9 +4113,9 @@
}
static jboolean onLoaded = JNI_FALSE;
if (onLoaded) {
---- ./hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Mon Jun 01 11:24:34 2015 -0700
-+++ ./hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Sat Jul 18 13:32:27 2015 -0700
-@@ -250,7 +250,7 @@
+--- ./hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Wed Jul 01 21:52:18 2015 -0700
++++ ./hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Sat Sep 05 06:33:34 2015 -0700
+@@ -242,7 +242,7 @@
#endif
// GCC 4.3 does not allow 0.0/0.0 to produce a NAN value
@@ -3594,8 +4124,8 @@
#define CAN_USE_NAN_DEFINE 1
#endif
---- ./jdk/make/CompileDemos.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/CompileDemos.gmk Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/CompileDemos.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/CompileDemos.gmk Sat Sep 05 06:34:07 2015 -0700
@@ -323,7 +323,7 @@
$(eval $(call SetupJVMTIDemo,hprof, java_crw_demo, \
-I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
@@ -3605,9 +4135,9 @@
$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo))
$(eval $(call SetupJVMTIDemo,mtrace, agent_util java_crw_demo))
---- ./jdk/make/CompileJavaClasses.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/CompileJavaClasses.gmk Sat Jul 18 13:32:37 2015 -0700
-@@ -130,23 +130,32 @@
+--- ./jdk/make/CompileJavaClasses.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/CompileJavaClasses.gmk Sat Sep 05 06:34:07 2015 -0700
+@@ -128,23 +128,32 @@
sun/nio/fs/LinuxFileStore.java \
sun/nio/fs/LinuxFileSystem.java \
sun/nio/fs/LinuxFileSystemProvider.java \
@@ -3644,7 +4174,7 @@
sun/tools/attach/BsdAttachProvider.java \
sun/tools/attach/BsdVirtualMachine.java
endif
-@@ -233,9 +242,9 @@
+@@ -231,9 +240,9 @@
# Exclude another implicitly not included file.
EXFILES += sun/util/locale/AsciiUtil.java
@@ -3656,8 +4186,8 @@
#
EXFILES += sun/nio/fs/PollingWatchService.java
endif
-@@ -275,21 +284,26 @@
- $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS_API_DIR)/classes
+@@ -273,21 +282,26 @@
+ $(wildcard $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS_API_DIR)/classes)
endif
-MACOSX_SRC_DIRS :=
@@ -3690,7 +4220,7 @@
endif
# The security classes should not end up in the classes directory as that will prevent them
-@@ -339,6 +353,7 @@
+@@ -337,6 +351,7 @@
SRC:=$(JDK_TOPDIR)/src/share/classes \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
$(MACOSX_SRC_DIRS) \
@@ -3698,7 +4228,7 @@
$(AIX_SRC_DIRS) \
$(JDK_OUTPUTDIR)/gensrc \
$(JDK_OUTPUTDIR)/gensrc_no_srczip \
-@@ -358,7 +373,7 @@
+@@ -356,7 +371,7 @@
SETUP := GENERATE_JDKBYTECODE, \
SRC := $(JDK_TOPDIR)/src/share/classes \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
@@ -3707,8 +4237,8 @@
$(CLOSED_SRC_DIRS), \
INCLUDES := $(SECURITY_PKGS), \
EXCLUDES := $(EXCLUDES), \
---- ./jdk/make/CompileLaunchers.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/CompileLaunchers.gmk Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/CompileLaunchers.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/CompileLaunchers.gmk Sat Sep 05 06:34:07 2015 -0700
@@ -49,7 +49,7 @@
ORIGIN_ROOT := /..
endif
@@ -3813,8 +4343,8 @@
BUILD_JSPAWNHELPER := 1
endif
---- ./jdk/make/CopyFiles.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/CopyFiles.gmk Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/CopyFiles.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/CopyFiles.gmk Sat Sep 05 06:34:07 2015 -0700
@@ -29,6 +29,8 @@
ifeq ($(OPENJDK_TARGET_OS), windows)
@@ -3857,9 +4387,9 @@
endif
endif
endif
---- ./jdk/make/Images.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/Images.gmk Sat Jul 18 13:32:37 2015 -0700
-@@ -234,11 +234,11 @@
+--- ./jdk/make/Images.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/Images.gmk Sat Sep 05 06:34:07 2015 -0700
+@@ -236,11 +236,11 @@
endif
JDK_LIB_FILES := $(NOT_JRE_LIB_FILES)
@@ -3873,7 +4403,7 @@
JDK_LIB_FILES += $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
endif
-@@ -389,7 +389,7 @@
+@@ -391,7 +391,7 @@
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/solaris/doc
MAN1_SUBDIR = sun/man/man1
endif
@@ -3882,7 +4412,7 @@
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/bsd/doc
MAN1_SUBDIR = man
endif
-@@ -445,7 +445,7 @@
+@@ -447,7 +447,7 @@
$(install-file)
endif
@@ -3891,7 +4421,7 @@
$(JRE_IMAGE_DIR)/man/ja:
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
-@@ -453,19 +453,7 @@
+@@ -455,19 +455,7 @@
$(JDK_IMAGE_DIR)/man/ja:
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
@@ -3911,7 +4441,7 @@
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \
$(JRE_IMAGE_DIR)/man/ja
-@@ -487,16 +475,6 @@
+@@ -489,16 +477,6 @@
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES))
endif
@@ -3929,7 +4459,7 @@
################################################################################
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/make/data/classlist/classlist.bsd Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/make/data/classlist/classlist.bsd Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,2803 @@
+com/sun/java/swing/SwingUtilities3
+com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI
@@ -6734,8 +7264,8 @@
+sun/util/resources/en/TimeZoneNames_en
+sun/util/spi/CalendarProvider
+# ca392e7ee7285d72
---- ./jdk/make/gendata/GendataFontConfig.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/gendata/GendataFontConfig.gmk Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/gendata/GendataFontConfig.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/gendata/GendataFontConfig.gmk Sat Sep 05 06:34:07 2015 -0700
@@ -73,6 +73,13 @@
GENDATA_FONT_CONFIG_SRC_PREFIX := aix.
endif
@@ -6750,8 +7280,8 @@
###
$(GENDATA_FONT_CONFIG_DST)/%.src: \
---- ./jdk/make/lib/Awt2dLibraries.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/lib/Awt2dLibraries.gmk Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/lib/Awt2dLibraries.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/lib/Awt2dLibraries.gmk Sat Sep 05 06:34:07 2015 -0700
@@ -309,7 +309,7 @@
debug_trace.c \
debug_util.c
@@ -6761,7 +7291,7 @@
LIBAWT_FILES += awt_LoadLibrary.c initIDs.c img_colors.c
endif
-@@ -482,6 +482,7 @@
+@@ -481,6 +481,7 @@
LDFLAGS_SUFFIX_linux := -ljvm $(LIBM) $(LIBDL) -ljava, \
LDFLAGS_SUFFIX_solaris := -ljvm $(LIBM) $(LIBDL) -ljava -lc, \
LDFLAGS_SUFFIX_aix :=-ljvm $(LIBM) $(LIBDL) -ljava -lm,\
@@ -6769,7 +7299,7 @@
LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \
-framework Cocoa \
-framework OpenGL \
-@@ -559,6 +560,16 @@
+@@ -557,6 +558,16 @@
endif
endif
@@ -6786,7 +7316,7 @@
ifeq ($(MILESTONE), internal)
LIBAWT_XAWT_CFLAGS += -DINTERNAL_BUILD
endif
-@@ -627,6 +638,11 @@
+@@ -625,6 +636,11 @@
LIBAWT_XAWT_LDFLAGS += -lpthread
endif
@@ -6798,7 +7328,7 @@
$(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \
LIBRARY := awt_xawt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
-@@ -648,6 +664,7 @@
+@@ -646,6 +662,7 @@
-R/usr/dt/lib$(OPENJDK_TARGET_CPU_ISADIR) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(call SET_SHARED_LIBRARY_ORIGIN,/..), \
@@ -6806,7 +7336,7 @@
LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-@@ -690,6 +707,7 @@
+@@ -688,6 +705,7 @@
LDFLAGS_SUFFIX_macosx := $(LIBM) -lawt -ljava -ljvm, \
LDFLAGS_SUFFIX_linux := -lm -lawt -ljava -ljvm, \
LDFLAGS_SUFFIX_aix := -lm -lawt -ljava -ljvm,\
@@ -6814,15 +7344,15 @@
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=lcms.dll" \
-@@ -829,6 +847,7 @@
+@@ -827,6 +845,7 @@
LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
- LDFLAGS_SUFFIX_solaris := -lawt -lawt_xawt -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
- LDFLAGS_SUFFIX_aix := -lawt -lawt_xawt $(LIBM) $(LIBCXX) -ljava -ljvm,\
+ LDFLAGS_SUFFIX_solaris := -lawt -lawt_headless -lc $(LIBM) $(LIBCXX) -ljava -ljvm, \
+ LDFLAGS_SUFFIX_aix := -lawt -lawt_headless $(LIBM) $(LIBCXX) -ljava -ljvm,\
+ LDFLAGS_SUFFIX_bsd := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_macosx := -lawt $(LIBM) $(LIBCXX) -undefined dynamic_lookup \
-ljava -ljvm, \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
-@@ -972,6 +991,7 @@
+@@ -970,6 +989,7 @@
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
CFLAGS_linux := $(HEADLESS_CFLAG), \
@@ -6830,7 +7360,7 @@
CFLAGS_macosx := -I$(JDK_TOPDIR)/src/solaris/native/sun/awt, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-@@ -980,6 +1000,7 @@
+@@ -978,6 +998,7 @@
LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
LDFLAGS_SUFFIX_solaris := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX) -lXrender, \
@@ -6838,7 +7368,7 @@
LDFLAGS_SUFFIX_macosx := -Xlinker -rpath -Xlinker @loader_path $(JAWT_LIBS) \
-framework Cocoa $(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawt, \
-@@ -1181,6 +1202,7 @@
+@@ -1173,6 +1194,7 @@
LDFLAGS_SUFFIX_linux := -ljvm -lawt -lm $(LIBDL) -ljava, \
LDFLAGS_SUFFIX_aix := -ljvm -lawt -ljava,\
LDFLAGS_SUFFIX_solaris := $(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc, \
@@ -6846,7 +7376,7 @@
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libawt_headless, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-@@ -1200,7 +1222,7 @@
+@@ -1192,7 +1214,7 @@
$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
ifeq ($(USE_EXTERNAL_LIBGIF), true)
@@ -6855,7 +7385,7 @@
else
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/giflib
GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
-@@ -1234,6 +1256,11 @@
+@@ -1225,6 +1247,11 @@
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
else ifeq ($(OPENJDK_TARGET_OS), solaris)
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
@@ -6867,7 +7397,7 @@
else
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
endif
-@@ -1257,6 +1284,8 @@
+@@ -1247,6 +1274,8 @@
else ifeq ($(OPENJDK_TARGET_OS), solaris)
# Solaris still uses OPENWIN_LIB ..
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += -L$(OPENWIN_LIB)$(OPENJDK_TARGET_CPU_ISADIR) -lX11 -lXext $(LIBM) -lpthread
@@ -6876,8 +7406,8 @@
else # .. all other Unixes can use X_LIBS
LIBSPLASHSCREEN_LDFLAGS_SUFFIX += $(X_LIBS) -lX11 -lXext $(LIBM) -lpthread
endif
---- ./jdk/make/lib/CoreLibraries.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/lib/CoreLibraries.gmk Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/lib/CoreLibraries.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/lib/CoreLibraries.gmk Sat Sep 05 06:34:07 2015 -0700
@@ -82,7 +82,7 @@
endif
@@ -6964,8 +7494,8 @@
LDFLAGS_macosx := -liconv, \
LDFLAGS_SUFFIX_windows := -export:nptInitialize -export:nptTerminate, \
LDFLAGS_SUFFIX_solaris := -lc, \
---- ./jdk/make/lib/NetworkingLibraries.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/lib/NetworkingLibraries.gmk Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/lib/NetworkingLibraries.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/lib/NetworkingLibraries.gmk Sat Sep 05 06:34:07 2015 -0700
@@ -42,7 +42,7 @@
LIBNET_EXCLUDE_FILES += linux_close.c
endif
@@ -6994,8 +7524,8 @@
LDFLAGS_SUFFIX_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
-DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \
---- ./jdk/make/lib/NioLibraries.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/lib/NioLibraries.gmk Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/lib/NioLibraries.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/lib/NioLibraries.gmk Sat Sep 05 06:34:07 2015 -0700
@@ -77,9 +77,28 @@
UnixNativeDispatcher.c
endif
@@ -7056,8 +7586,8 @@
endif
+ endif
endif
---- ./jdk/make/lib/ServiceabilityLibraries.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/lib/ServiceabilityLibraries.gmk Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/lib/ServiceabilityLibraries.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/lib/ServiceabilityLibraries.gmk Sat Sep 05 06:34:07 2015 -0700
@@ -34,7 +34,7 @@
ifneq ($(OPENJDK_TARGET_OS), linux)
LIBATTACH_EXCLUDE_FILES += LinuxVirtualMachine.c
@@ -7147,8 +7677,8 @@
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBHPROF_OPTIMIZATION := LOW
endif
---- ./jdk/make/lib/SoundLibraries.gmk Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/lib/SoundLibraries.gmk Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/lib/SoundLibraries.gmk Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/lib/SoundLibraries.gmk Sat Sep 05 06:34:07 2015 -0700
@@ -75,6 +75,13 @@
LIBJSOUND_CFLAGS += -DX_PLATFORM=X_AIX
endif # OPENJDK_TARGET_OS aix
@@ -7180,8 +7710,8 @@
LDFLAGS_SUFFIX := $(ALSA_LIBS) -ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsoundalsa, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
---- ./jdk/make/mapfiles/launchers/mapfile-x86 Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/mapfiles/launchers/mapfile-x86 Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/mapfiles/launchers/mapfile-x86 Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/mapfiles/launchers/mapfile-x86 Sat Sep 05 06:34:07 2015 -0700
@@ -33,6 +33,7 @@
environ; # Public symbols and required by Java run time
_environ;
@@ -7190,8 +7720,8 @@
___Argv; # The following are private, but as they are
_start; # exported from ctr1/crtn, the clever hacker
_init; # might know about them. However note, that
---- ./jdk/make/mapfiles/launchers/mapfile-x86_64 Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/mapfiles/launchers/mapfile-x86_64 Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/mapfiles/launchers/mapfile-x86_64 Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/mapfiles/launchers/mapfile-x86_64 Sat Sep 05 06:34:07 2015 -0700
@@ -33,6 +33,7 @@
environ; # Public symbols and required by Java run time
_environ;
@@ -7201,7 +7731,7 @@
local:
*;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/make/mapfiles/libattach/mapfile-bsd Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/make/mapfiles/libattach/mapfile-bsd Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,42 @@
+#
+# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
@@ -7246,7 +7776,7 @@
+ *;
+};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/make/mapfiles/libnio/mapfile-bsd Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/make/mapfiles/libnio/mapfile-bsd Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,195 @@
+#
+# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
@@ -7443,8 +7973,8 @@
+ local:
+ *;
+};
---- ./jdk/make/mapfiles/libunpack/mapfile-vers-unpack200 Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/mapfiles/libunpack/mapfile-vers-unpack200 Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/mapfiles/libunpack/mapfile-vers-unpack200 Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/mapfiles/libunpack/mapfile-vers-unpack200 Sat Sep 05 06:34:07 2015 -0700
@@ -26,6 +26,9 @@
# Define library interface.
@@ -7456,7 +7986,7 @@
*;
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/make/netbeans/common/bsd-sources.ent Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/make/netbeans/common/bsd-sources.ent Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
@@ -7504,7 +8034,7 @@
+ <location>${root}/src/bsd/classes</location>
+</source-folder>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/make/netbeans/common/bsd-view.ent Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/make/netbeans/common/bsd-view.ent Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
@@ -7545,8 +8075,8 @@
+ <includes>${includes}</includes>
+ <excludes>${excludes}</excludes>
+</source-folder>
---- ./jdk/make/netbeans/common/java-data-native.ent Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/netbeans/common/java-data-native.ent Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/netbeans/common/java-data-native.ent Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/netbeans/common/java-data-native.ent Sat Sep 05 06:34:07 2015 -0700
@@ -34,6 +34,7 @@
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/4">
<compilation-unit>
@@ -7555,8 +8085,8 @@
<package-root>${root}/src/macosx/classes</package-root>
<package-root>${root}/src/solaris/classes</package-root>
<package-root>${root}/src/windows/classes</package-root>
---- ./jdk/make/netbeans/common/make.xml Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/netbeans/common/make.xml Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/netbeans/common/make.xml Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/netbeans/common/make.xml Sat Sep 05 06:34:07 2015 -0700
@@ -32,16 +32,21 @@
-->
@@ -7591,8 +8121,8 @@
<macrodef name="make-run">
<attribute name="target"/>
<attribute name="dir"/>
---- ./jdk/make/netbeans/j2se/nbproject/project.xml Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/netbeans/j2se/nbproject/project.xml Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/netbeans/j2se/nbproject/project.xml Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/netbeans/j2se/nbproject/project.xml Sat Sep 05 06:34:07 2015 -0700
@@ -34,6 +34,7 @@
<!DOCTYPE project [
<!ENTITY properties SYSTEM "../../common/properties.ent">
@@ -7625,8 +8155,8 @@
&macosx-view;
&unix-view;
&windows-view;
---- ./jdk/make/netbeans/world/nbproject/project.xml Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/make/netbeans/world/nbproject/project.xml Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/make/netbeans/world/nbproject/project.xml Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/netbeans/world/nbproject/project.xml Sat Sep 05 06:34:07 2015 -0700
@@ -34,12 +34,14 @@
<!DOCTYPE project [
<!ENTITY properties SYSTEM "../../common/properties.ent">
@@ -7658,8 +8188,26 @@
&macosx-view;
&unix-view;
&windows-view;
+--- ./jdk/make/profile-rtjar-includes.txt Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/make/profile-rtjar-includes.txt Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
++# Copyright (c) 2012, 2015, 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
+@@ -207,6 +207,8 @@
+ javax/xml/bind \
+ javax/xml/soap \
+ javax/xml/ws \
++ jdk/internal/instrumentation \
++ jdk/management/resource \
+ org/omg \
+ sun/applet \
+ sun/audio \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/src/bsd/classes/java/net/DefaultInterface.java Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/src/bsd/classes/java/net/DefaultInterface.java Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
@@ -7759,7 +8307,7 @@
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/src/bsd/classes/sun/nio/ch/DefaultSelectorProvider.java Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/src/bsd/classes/sun/nio/ch/DefaultSelectorProvider.java Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
@@ -7810,7 +8358,7 @@
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/src/bsd/classes/sun/nio/ch/KQueueArrayWrapper.java Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/src/bsd/classes/sun/nio/ch/KQueueArrayWrapper.java Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
@@ -8026,7 +8574,7 @@
+ private static native void interrupt(int fd);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/src/bsd/classes/sun/nio/ch/KQueueSelectorImpl.java Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/src/bsd/classes/sun/nio/ch/KQueueSelectorImpl.java Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,249 @@
+/*
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
@@ -8278,7 +8826,7 @@
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/src/bsd/classes/sun/nio/ch/KQueueSelectorProvider.java Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/src/bsd/classes/sun/nio/ch/KQueueSelectorProvider.java Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
@@ -8324,9 +8872,9 @@
+ return new KQueueSelectorImpl(this);
+ }
+}
---- ./jdk/src/bsd/doc/man/javah.1 Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/bsd/doc/man/javah.1 Sat Jul 18 13:32:37 2015 -0700
-@@ -110,7 +110,7 @@
+--- ./jdk/src/bsd/doc/man/javah.1 Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/bsd/doc/man/javah.1 Sat Sep 05 06:34:07 2015 -0700
+@@ -109,7 +109,7 @@
\&.:\fIyour-path\fR
@@ -8335,9 +8883,9 @@
\fIWindows\fR:
---- ./jdk/src/bsd/doc/man/rmic.1 Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/bsd/doc/man/rmic.1 Sat Jul 18 13:32:37 2015 -0700
-@@ -93,7 +93,7 @@
+--- ./jdk/src/bsd/doc/man/rmic.1 Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/bsd/doc/man/rmic.1 Sat Sep 05 06:34:07 2015 -0700
+@@ -92,7 +92,7 @@
.TP
-classpath path
.br
@@ -8346,7 +8894,7 @@
.TP
-d \fIdirectory\fR
.br
-@@ -207,7 +207,7 @@
+@@ -206,7 +206,7 @@
.SH ENVIRONMENT\ VARIABLES
.TP
CLASSPATH
@@ -8355,9 +8903,9 @@
.SH SEE\ ALSO
.TP 0.2i
\(bu
---- ./jdk/src/bsd/doc/man/rmid.1 Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/bsd/doc/man/rmid.1 Sat Jul 18 13:32:37 2015 -0700
-@@ -301,7 +301,7 @@
+--- ./jdk/src/bsd/doc/man/rmid.1 Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/bsd/doc/man/rmid.1 Sat Sep 05 06:34:07 2015 -0700
+@@ -300,7 +300,7 @@
.SH ENVIRONMENT\ VARIABLES
.TP
CLASSPATH
@@ -8367,7 +8915,7 @@
.TP 0.2i
\(bu
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/src/bsd/native/sun/nio/ch/KQueueArrayWrapper.c Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/src/bsd/native/sun/nio/ch/KQueueArrayWrapper.c Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
@@ -8540,7 +9088,22 @@
+ }
+}
+
---- ./jdk/src/macosx/classes/java/net/DefaultInterface.java Tue May 26 13:28:17 2015 -0700
+--- ./jdk/src/macosx/bin/java_md_macosx.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/macosx/bin/java_md_macosx.c Sat Sep 05 06:34:07 2015 -0700
+@@ -616,7 +616,11 @@
+ if (access(libjava, F_OK) == 0) {
+ return JNI_TRUE;
+ }
+-
++ /* ensure storage for path + /jre + NULL */
++ if ((JLI_StrLen(path) + 4 + 1) > pathsize) {
++ JLI_TraceLauncher("Insufficient space to store JRE path\n");
++ return JNI_FALSE;
++ }
+ /* Does the app ship a private JRE in <apphome>/jre directory? */
+ JLI_Snprintf(libjava, sizeof(libjava), "%s/jre/lib/" JAVA_DLL, path);
+ if (access(libjava, F_OK) == 0) {
+--- ./jdk/src/macosx/classes/java/net/DefaultInterface.java Wed Jul 01 21:53:30 2015 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
@@ -8640,7 +9203,7 @@
- return (ppp != null) ? ppp : loopback;
- }
-}
---- ./jdk/src/macosx/classes/sun/nio/ch/DefaultSelectorProvider.java Tue May 26 13:28:17 2015 -0700
+--- ./jdk/src/macosx/classes/sun/nio/ch/DefaultSelectorProvider.java Wed Jul 01 21:53:30 2015 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
@@ -8691,7 +9254,7 @@
- }
-
-}
---- ./jdk/src/macosx/classes/sun/nio/ch/KQueueArrayWrapper.java Tue May 26 13:28:17 2015 -0700
+--- ./jdk/src/macosx/classes/sun/nio/ch/KQueueArrayWrapper.java Wed Jul 01 21:53:30 2015 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +0,0 @@
-/*
@@ -8907,7 +9470,7 @@
- long timeout);
- private static native void interrupt(int fd);
-}
---- ./jdk/src/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java Tue May 26 13:28:17 2015 -0700
+--- ./jdk/src/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java Wed Jul 01 21:53:30 2015 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,249 +0,0 @@
-/*
@@ -9159,7 +9722,7 @@
- return this;
- }
-}
---- ./jdk/src/macosx/classes/sun/nio/ch/KQueueSelectorProvider.java Tue May 26 13:28:17 2015 -0700
+--- ./jdk/src/macosx/classes/sun/nio/ch/KQueueSelectorProvider.java Wed Jul 01 21:53:30 2015 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
@@ -9206,7 +9769,7 @@
- return new KQueueSelectorImpl(this);
- }
-}
---- ./jdk/src/macosx/native/sun/nio/ch/KQueueArrayWrapper.c Tue May 26 13:28:17 2015 -0700
+--- ./jdk/src/macosx/native/sun/nio/ch/KQueueArrayWrapper.c Wed Jul 01 21:53:30 2015 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-/*
@@ -9380,8 +9943,8 @@
- }
-}
-
---- ./jdk/src/share/bin/jli_util.h Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/bin/jli_util.h Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/bin/jli_util.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/bin/jli_util.h Sat Sep 05 06:34:07 2015 -0700
@@ -87,7 +87,7 @@
#define _LARGFILE64_SOURCE
#define JLI_Lseek lseek64
@@ -9391,8 +9954,797 @@
#define JLI_Lseek lseek
#endif
#ifdef _AIX
---- ./jdk/src/share/classes/sun/awt/FontConfiguration.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/classes/sun/awt/FontConfiguration.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/classes/com/sun/crypto/provider/AESCrypt.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/com/sun/crypto/provider/AESCrypt.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2002, 2015, 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
+@@ -37,7 +37,7 @@
+ package com.sun.crypto.provider;
+
+ import java.security.InvalidKeyException;
+-import java.util.Arrays;
++import java.security.MessageDigest;
+
+ /**
+ * Rijndael --pronounced Reindaal-- is a symmetric cipher with a 128-bit
+@@ -88,7 +88,7 @@
+ key.length + " bytes");
+ }
+
+- if (!Arrays.equals(key, lastKey)) {
++ if (!MessageDigest.isEqual(key, lastKey)) {
+ // re-generate session key 'sessionK' when cipher key changes
+ makeSessionKey(key);
+ lastKey = key.clone(); // save cipher key
+--- ./jdk/src/share/classes/com/sun/crypto/provider/CipherCore.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/com/sun/crypto/provider/CipherCore.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2002, 2015, 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
+@@ -568,7 +568,7 @@
+ // check key+iv for encryption in GCM mode
+ requireReinit =
+ Arrays.equals(ivBytes, lastEncIv) &&
+- Arrays.equals(keyBytes, lastEncKey);
++ MessageDigest.isEqual(keyBytes, lastEncKey);
+ if (requireReinit) {
+ throw new InvalidAlgorithmParameterException
+ ("Cannot reuse iv for GCM encryption");
+--- ./jdk/src/share/classes/com/sun/crypto/provider/DESKey.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/com/sun/crypto/provider/DESKey.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1997, 2015, 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
+@@ -25,6 +25,7 @@
+
+ package com.sun.crypto.provider;
+
++import java.security.MessageDigest;
+ import java.security.KeyRep;
+ import java.security.InvalidKeyException;
+ import javax.crypto.SecretKey;
+@@ -113,7 +114,7 @@
+ return false;
+
+ byte[] thatKey = ((SecretKey)obj).getEncoded();
+- boolean ret = java.util.Arrays.equals(this.key, thatKey);
++ boolean ret = MessageDigest.isEqual(this.key, thatKey);
+ java.util.Arrays.fill(thatKey, (byte)0x00);
+ return ret;
+ }
+--- ./jdk/src/share/classes/com/sun/crypto/provider/DESedeKey.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/com/sun/crypto/provider/DESedeKey.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1997, 2015, 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
+@@ -25,6 +25,7 @@
+
+ package com.sun.crypto.provider;
+
++import java.security.MessageDigest;
+ import java.security.KeyRep;
+ import java.security.InvalidKeyException;
+ import javax.crypto.SecretKey;
+@@ -114,7 +115,7 @@
+ return false;
+
+ byte[] thatKey = ((SecretKey)obj).getEncoded();
+- boolean ret = java.util.Arrays.equals(this.key, thatKey);
++ boolean ret = MessageDigest.isEqual(this.key, thatKey);
+ java.util.Arrays.fill(thatKey, (byte)0x00);
+ return ret;
+ }
+--- ./jdk/src/share/classes/com/sun/crypto/provider/PBEKey.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/com/sun/crypto/provider/PBEKey.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1997, 2015, 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
+@@ -25,6 +25,7 @@
+
+ package com.sun.crypto.provider;
+
++import java.security.MessageDigest;
+ import java.security.KeyRep;
+ import java.security.spec.InvalidKeySpecException;
+ import java.util.Locale;
+@@ -108,7 +109,7 @@
+ return false;
+
+ byte[] thatEncoded = that.getEncoded();
+- boolean ret = java.util.Arrays.equals(this.key, thatEncoded);
++ boolean ret = MessageDigest.isEqual(this.key, thatEncoded);
+ java.util.Arrays.fill(thatEncoded, (byte)0x00);
+ return ret;
+ }
+--- ./jdk/src/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2005, 2015, 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
+@@ -30,6 +30,7 @@
+ import java.nio.CharBuffer;
+ import java.nio.charset.Charset;
+ import java.util.Arrays;
++import java.security.MessageDigest;
+ import java.util.Locale;
+ import java.security.KeyRep;
+ import java.security.GeneralSecurityException;
+@@ -153,7 +154,7 @@
+ SecretKey sk = (SecretKey)obj;
+ return prf.getAlgorithm().equalsIgnoreCase(
+ sk.getAlgorithm()) &&
+- Arrays.equals(password, sk.getEncoded());
++ MessageDigest.isEqual(password, sk.getEncoded());
+ }
+ };
+ prf.init(macKey);
+@@ -239,7 +240,7 @@
+ if (!(that.getFormat().equalsIgnoreCase("RAW")))
+ return false;
+ byte[] thatEncoded = that.getEncoded();
+- boolean ret = Arrays.equals(key, that.getEncoded());
++ boolean ret = MessageDigest.isEqual(key, that.getEncoded());
+ java.util.Arrays.fill(thatEncoded, (byte)0x00);
+ return ret;
+ }
+--- ./jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2000, 2015, 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
+@@ -184,119 +184,124 @@
+ Exception caughtException = null;
+ boolean[] doNotRetry = new boolean[servers.length];
+
+- //
+- // The UDP retry strategy is to try the 1st server, and then
+- // each server in order. If no answer, double the timeout
+- // and try each server again.
+- //
+- for (int retry = 0; retry < retries; retry++) {
++ try {
++ //
++ // The UDP retry strategy is to try the 1st server, and then
++ // each server in order. If no answer, double the timeout
++ // and try each server again.
++ //
++ for (int retry = 0; retry < retries; retry++) {
+
+- // Try each name server.
+- for (int i = 0; i < servers.length; i++) {
+- if (doNotRetry[i]) {
+- continue;
+- }
+-
+- // send the request packet and wait for a response.
+- try {
+- if (debug) {
+- dprint("SEND ID (" + (retry + 1) + "): " + xid);
++ // Try each name server.
++ for (int i = 0; i < servers.length; i++) {
++ if (doNotRetry[i]) {
++ continue;
+ }
+
+- byte[] msg = null;
+- msg = doUdpQuery(pkt, servers[i], serverPorts[i],
+- retry, xid);
+- //
+- // If the matching response is not got within the
+- // given timeout, check if the response was enqueued
+- // by some other thread, if not proceed with the next
+- // server or retry.
+- //
+- if (msg == null) {
+- if (resps.size() > 0) {
+- msg = lookupResponse(xid);
++ // send the request packet and wait for a response.
++ try {
++ if (debug) {
++ dprint("SEND ID (" + (retry + 1) + "): " + xid);
+ }
+- if (msg == null) { // try next server or retry
++
++ byte[] msg = null;
++ msg = doUdpQuery(pkt, servers[i], serverPorts[i],
++ retry, xid);
++ //
++ // If the matching response is not got within the
++ // given timeout, check if the response was enqueued
++ // by some other thread, if not proceed with the next
++ // server or retry.
++ //
++ if (msg == null) {
++ if (resps.size() > 0) {
++ msg = lookupResponse(xid);
++ }
++ if (msg == null) { // try next server or retry
++ continue;
++ }
++ }
++ Header hdr = new Header(msg, msg.length);
++
++ if (auth && !hdr.authoritative) {
++ caughtException = new NameNotFoundException(
++ "DNS response not authoritative");
++ doNotRetry[i] = true;
+ continue;
+ }
+- }
+- Header hdr = new Header(msg, msg.length);
++ if (hdr.truncated) { // message is truncated -- try TCP
+
+- if (auth && !hdr.authoritative) {
+- caughtException = new NameNotFoundException(
+- "DNS response not authoritative");
+- doNotRetry[i] = true;
+- continue;
+- }
+- if (hdr.truncated) { // message is truncated -- try TCP
++ // Try each server, starting with the one that just
++ // provided the truncated message.
++ for (int j = 0; j < servers.length; j++) {
++ int ij = (i + j) % servers.length;
++ if (doNotRetry[ij]) {
++ continue;
++ }
++ try {
++ Tcp tcp =
++ new Tcp(servers[ij], serverPorts[ij]);
++ byte[] msg2;
++ try {
++ msg2 = doTcpQuery(tcp, pkt);
++ } finally {
++ tcp.close();
++ }
++ Header hdr2 = new Header(msg2, msg2.length);
++ if (hdr2.query) {
++ throw new CommunicationException(
++ "DNS error: expecting response");
++ }
++ checkResponseCode(hdr2);
+
+- // Try each server, starting with the one that just
+- // provided the truncated message.
+- for (int j = 0; j < servers.length; j++) {
+- int ij = (i + j) % servers.length;
+- if (doNotRetry[ij]) {
+- continue;
+- }
+- try {
+- Tcp tcp =
+- new Tcp(servers[ij], serverPorts[ij]);
+- byte[] msg2;
+- try {
+- msg2 = doTcpQuery(tcp, pkt);
+- } finally {
+- tcp.close();
++ if (!auth || hdr2.authoritative) {
++ // Got a valid response
++ hdr = hdr2;
++ msg = msg2;
++ break;
++ } else {
++ doNotRetry[ij] = true;
++ }
++ } catch (Exception e) {
++ // Try next server, or use UDP response
+ }
+- Header hdr2 = new Header(msg2, msg2.length);
+- if (hdr2.query) {
+- throw new CommunicationException(
+- "DNS error: expecting response");
+- }
+- checkResponseCode(hdr2);
++ } // servers
++ }
++ return new ResourceRecords(msg, msg.length, hdr, false);
+
+- if (!auth || hdr2.authoritative) {
+- // Got a valid response
+- hdr = hdr2;
+- msg = msg2;
+- break;
+- } else {
+- doNotRetry[ij] = true;
+- }
+- } catch (Exception e) {
+- // Try next server, or use UDP response
+- }
+- } // servers
+- }
+- return new ResourceRecords(msg, msg.length, hdr, false);
+-
+- } catch (IOException e) {
+- if (debug) {
+- dprint("Caught IOException:" + e);
+- }
+- if (caughtException == null) {
+- caughtException = e;
+- }
+- // Use reflection to allow pre-1.4 compilation.
+- // This won't be needed much longer.
+- if (e.getClass().getName().equals(
+- "java.net.PortUnreachableException")) {
++ } catch (IOException e) {
++ if (debug) {
++ dprint("Caught IOException:" + e);
++ }
++ if (caughtException == null) {
++ caughtException = e;
++ }
++ // Use reflection to allow pre-1.4 compilation.
++ // This won't be needed much longer.
++ if (e.getClass().getName().equals(
++ "java.net.PortUnreachableException")) {
++ doNotRetry[i] = true;
++ }
++ } catch (NameNotFoundException e) {
++ // This is authoritative, so return immediately
++ throw e;
++ } catch (CommunicationException e) {
++ if (caughtException == null) {
++ caughtException = e;
++ }
++ } catch (NamingException e) {
++ if (caughtException == null) {
++ caughtException = e;
++ }
+ doNotRetry[i] = true;
+ }
+- } catch (NameNotFoundException e) {
+- throw e;
+- } catch (CommunicationException e) {
+- if (caughtException == null) {
+- caughtException = e;
+- }
+- } catch (NamingException e) {
+- if (caughtException == null) {
+- caughtException = e;
+- }
+- doNotRetry[i] = true;
+- }
+- } // servers
+- } // retries
++ } // servers
++ } // retries
+
+- reqs.remove(xid);
++ } finally {
++ reqs.remove(xid); // cleanup
++ }
++
+ if (caughtException instanceof NamingException) {
+ throw (NamingException) caughtException;
+ }
+--- ./jdk/src/share/classes/java/io/ObjectInputStream.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/java/io/ObjectInputStream.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1829,6 +1829,8 @@
+ throws IOException
+ {
+ SerialCallbackContext oldContext = curContext;
++ if (oldContext != null)
++ oldContext.check();
+ curContext = null;
+ try {
+ boolean blocked = desc.hasBlockExternalData();
+@@ -1853,6 +1855,8 @@
+ skipCustomData();
+ }
+ } finally {
++ if (oldContext != null)
++ oldContext.check();
+ curContext = oldContext;
+ }
+ /*
+@@ -1883,12 +1887,12 @@
+ ObjectStreamClass slotDesc = slots[i].desc;
+
+ if (slots[i].hasData) {
+- if (obj != null &&
+- slotDesc.hasReadObjectMethod() &&
+- handles.lookupException(passHandle) == null)
+- {
++ if (obj == null || handles.lookupException(passHandle) != null) {
++ defaultReadFields(null, slotDesc); // skip field values
++ } else if (slotDesc.hasReadObjectMethod()) {
+ SerialCallbackContext oldContext = curContext;
+-
++ if (oldContext != null)
++ oldContext.check();
+ try {
+ curContext = new SerialCallbackContext(obj, slotDesc);
+
+@@ -1905,6 +1909,8 @@
+ handles.markException(passHandle, ex);
+ } finally {
+ curContext.setUsed();
++ if (oldContext!= null)
++ oldContext.check();
+ curContext = oldContext;
+ }
+
+@@ -1917,6 +1923,7 @@
+ } else {
+ defaultReadFields(obj, slotDesc);
+ }
++
+ if (slotDesc.hasWriteObjectData()) {
+ skipCustomData();
+ } else {
+--- ./jdk/src/share/classes/java/io/SerialCallbackContext.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/java/io/SerialCallbackContext.java Sat Sep 05 06:34:07 2015 -0700
+@@ -60,6 +60,13 @@
+ return desc;
+ }
+
++ public void check() throws NotActiveException {
++ if (thread != null && thread != Thread.currentThread()) {
++ throw new NotActiveException(
++ "expected thread: " + thread + ", but got: " + Thread.currentThread());
++ }
++ }
++
+ private void checkAndSetUsed() throws NotActiveException {
+ if (thread != Thread.currentThread()) {
+ throw new NotActiveException(
+--- ./jdk/src/share/classes/java/net/InetAddress.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/java/net/InetAddress.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1995, 2015, 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
+@@ -203,16 +203,33 @@
+ static transient boolean preferIPv6Address = false;
+
+ static class InetAddressHolder {
++ /**
++ * Reserve the original application specified hostname.
++ *
++ * The original hostname is useful for domain-based endpoint
++ * identification (see RFC 2818 and RFC 6125). If an address
++ * was created with a raw IP address, a reverse name lookup
++ * may introduce endpoint identification security issue via
++ * DNS forging.
++ *
++ * Oracle JSSE provider is using this original hostname, via
++ * sun.misc.JavaNetAccess, for SSL/TLS endpoint identification.
++ *
++ * Note: May define a new public method in the future if necessary.
++ */
++ private String originalHostName;
+
+ InetAddressHolder() {}
+
+ InetAddressHolder(String hostName, int address, int family) {
++ this.originalHostName = hostName;
+ this.hostName = hostName;
+ this.address = address;
+ this.family = family;
+ }
+
+ void init(String hostName, int family) {
++ this.originalHostName = hostName;
+ this.hostName = hostName;
+ if (family != -1) {
+ this.family = family;
+@@ -225,6 +242,10 @@
+ return hostName;
+ }
+
++ String getOriginalHostName() {
++ return originalHostName;
++ }
++
+ /**
+ * Holds a 32-bit IPv4 address.
+ */
+--- ./jdk/src/share/classes/java/net/URLClassLoader.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/java/net/URLClassLoader.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1997, 2015, 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
+@@ -774,6 +774,10 @@
+ public URLClassPath getURLClassPath (URLClassLoader u) {
+ return u.ucp;
+ }
++
++ public String getOriginalHostName(InetAddress ia) {
++ return ia.holder.getOriginalHostName();
++ }
+ }
+ );
+ ClassLoader.registerAsParallelCapable();
+--- ./jdk/src/share/classes/java/rmi/server/RemoteObjectInvocationHandler.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/java/rmi/server/RemoteObjectInvocationHandler.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2003, 2015, 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
+@@ -31,6 +31,7 @@
+ import java.rmi.Remote;
+ import java.rmi.UnexpectedException;
+ import java.rmi.activation.Activatable;
++import java.security.PrivilegedAction;
+ import java.util.Map;
+ import java.util.WeakHashMap;
+ import sun.rmi.server.Util;
+@@ -56,6 +57,25 @@
+ {
+ private static final long serialVersionUID = 2L;
+
++ // set to true if invocation handler allows finalize method (legacy behavior)
++ private static final boolean allowFinalizeInvocation;
++
++ static {
++ String propName = "sun.rmi.server.invocationhandler.allowFinalizeInvocation";
++ String allowProp = java.security.AccessController.doPrivileged(
++ new PrivilegedAction<String>() {
++ @Override
++ public String run() {
++ return System.getProperty(propName);
++ }
++ });
++ if ("".equals(allowProp)) {
++ allowFinalizeInvocation = true;
++ } else {
++ allowFinalizeInvocation = Boolean.parseBoolean(allowProp);
++ }
++ }
++
+ /**
+ * A weak hash map, mapping classes to weak hash maps that map
+ * method objects to method hashes.
+@@ -144,6 +164,9 @@
+ {
+ if (method.getDeclaringClass() == Object.class) {
+ return invokeObjectMethod(proxy, method, args);
++ } else if ("finalize".equals(method.getName()) && method.getParameterCount() == 0 &&
++ !allowFinalizeInvocation) {
++ return null; // ignore
+ } else {
+ return invokeRemoteMethod(proxy, method, args);
+ }
+--- ./jdk/src/share/classes/java/security/Identity.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/java/security/Identity.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1996, 2015, 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
+@@ -261,7 +261,7 @@
+ certificates.addElement(certificate);
+ }
+
+- private boolean keyEquals(Key aKey, Key anotherKey) {
++ private boolean keyEquals(PublicKey aKey, PublicKey anotherKey) {
+ String aKeyFormat = aKey.getFormat();
+ String anotherKeyFormat = anotherKey.getFormat();
+ if ((aKeyFormat == null) ^ (anotherKeyFormat == null))
+--- ./jdk/src/share/classes/java/security/MessageDigest.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/java/security/MessageDigest.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1996, 2015, 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
+@@ -440,6 +440,10 @@
+ * @return true if the digests are equal, false otherwise.
+ */
+ public static boolean isEqual(byte[] digesta, byte[] digestb) {
++ if (digesta == digestb) return true;
++ if (digesta == null || digestb == null) {
++ return false;
++ }
+ if (digesta.length != digestb.length) {
+ return false;
+ }
+--- ./jdk/src/share/classes/java/security/Signature.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/java/security/Signature.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1996, 2015, 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
+@@ -1316,7 +1316,7 @@
+ byte[] out = cipher.doFinal(sigBytes);
+ byte[] dataBytes = data.toByteArray();
+ data.reset();
+- return Arrays.equals(out, dataBytes);
++ return MessageDigest.isEqual(out, dataBytes);
+ } catch (BadPaddingException e) {
+ // e.g. wrong public key used
+ // return false rather than throwing exception
+--- ./jdk/src/share/classes/java/security/cert/X509CRLSelector.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/java/security/cert/X509CRLSelector.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2000, 2015, 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
+@@ -679,10 +679,14 @@
+ nowPlusSkew = new Date(dateAndTime.getTime() + skew);
+ nowMinusSkew = new Date(dateAndTime.getTime() - skew);
+ }
++
++ // Check that the test date is within the validity interval:
++ // [ thisUpdate - MAX_CLOCK_SKEW,
++ // nextUpdate + MAX_CLOCK_SKEW ]
+ if (nowMinusSkew.after(nextUpdate)
+ || nowPlusSkew.before(crlThisUpdate)) {
+ if (debug != null) {
+- debug.println("X509CRLSelector.match: update out of range");
++ debug.println("X509CRLSelector.match: update out-of-range");
+ }
+ return false;
+ }
+--- ./jdk/src/share/classes/javax/crypto/spec/SecretKeySpec.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/javax/crypto/spec/SecretKeySpec.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1998, 2015, 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
+@@ -25,6 +25,7 @@
+
+ package javax.crypto.spec;
+
++import java.security.MessageDigest;
+ import java.security.spec.KeySpec;
+ import java.util.Locale;
+ import javax.crypto.SecretKey;
+@@ -228,6 +229,6 @@
+
+ byte[] thatKey = ((SecretKey)obj).getEncoded();
+
+- return java.util.Arrays.equals(this.key, thatKey);
++ return MessageDigest.isEqual(this.key, thatKey);
+ }
+ }
+--- ./jdk/src/share/classes/javax/management/MBeanServerInvocationHandler.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/javax/management/MBeanServerInvocationHandler.java Sat Sep 05 06:34:07 2015 -0700
+@@ -141,6 +141,12 @@
+ if (connection == null) {
+ throw new IllegalArgumentException("Null connection");
+ }
++ if (Proxy.isProxyClass(connection.getClass())) {
++ if (MBeanServerInvocationHandler.class.isAssignableFrom(
++ Proxy.getInvocationHandler(connection).getClass())) {
++ throw new IllegalArgumentException("Wrapping MBeanServerInvocationHandler");
++ }
++ }
+ if (objectName == null) {
+ throw new IllegalArgumentException("Null object name");
+ }
+@@ -418,6 +424,10 @@
+ new Class<?>[] {Object.class})
+ && isLocal(proxy, method))
+ return true;
++ if (methodName.equals("finalize")
++ && method.getParameterTypes().length == 0) {
++ return true;
++ }
+ return false;
+ }
+
+@@ -453,6 +463,9 @@
+ connection + "[" + objectName + "])";
+ } else if (methodName.equals("hashCode")) {
+ return objectName.hashCode()+connection.hashCode();
++ } else if (methodName.equals("finalize")) {
++ // ignore the finalizer invocation via proxy
++ return null;
+ }
+
+ throw new RuntimeException("Unexpected method name: " + methodName);
+--- ./jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java Sat Sep 05 06:34:07 2015 -0700
+@@ -32,7 +32,6 @@
+ import java.security.AccessControlContext;
+ import java.security.AccessController;
+ import java.security.Permission;
+-import java.security.PermissionCollection;
+ import java.security.Permissions;
+ import java.security.PrivilegedAction;
+ import java.security.PrivilegedActionException;
+@@ -59,6 +58,7 @@
+ import com.sun.jmx.remote.util.ClassLogger;
+ import com.sun.jmx.remote.util.EnvHelp;
+ import com.sun.jmx.remote.util.OrderClassLoaders;
++import javax.management.loading.ClassLoaderRepository;
+
+ /**
+ * <p>Implementation of the {@link RMIConnection} interface. User
+@@ -131,20 +131,24 @@
+
+ final ClassLoader dcl = defaultClassLoader;
+
+- this.classLoaderWithRepository =
+- AccessController.doPrivileged(
+- new PrivilegedAction<ClassLoaderWithRepository>() {
+- public ClassLoaderWithRepository run() {
+- return new ClassLoaderWithRepository(
+- mbeanServer.getClassLoaderRepository(),
+- dcl);
+- }
+- },
+-
+- withPermissions( new MBeanPermission("*", "getClassLoaderRepository"),
+- new RuntimePermission("createClassLoader"))
+- );
+-
++ ClassLoaderRepository repository = AccessController.doPrivileged(
++ new PrivilegedAction<ClassLoaderRepository>() {
++ public ClassLoaderRepository run() {
++ return mbeanServer.getClassLoaderRepository();
++ }
++ },
++ withPermissions(new MBeanPermission("*", "getClassLoaderRepository"))
++ );
++ this.classLoaderWithRepository = AccessController.doPrivileged(
++ new PrivilegedAction<ClassLoaderWithRepository>() {
++ public ClassLoaderWithRepository run() {
++ return new ClassLoaderWithRepository(
++ repository,
++ dcl);
++ }
++ },
++ withPermissions(new RuntimePermission("createClassLoader"))
++ );
+
+ this.defaultContextClassLoader =
+ AccessController.doPrivileged(
+--- ./jdk/src/share/classes/sun/awt/FontConfiguration.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/awt/FontConfiguration.java Sat Sep 05 06:34:07 2015 -0700
@@ -1146,7 +1146,7 @@
*/
HashMap<String, Boolean> existsMap;
@@ -9402,8 +10754,8 @@
return false;
} else if (existsMap == null) {
existsMap = new HashMap<String, Boolean>();
---- ./jdk/src/share/classes/sun/awt/OSInfo.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/classes/sun/awt/OSInfo.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/classes/sun/awt/OSInfo.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/awt/OSInfo.java Sat Sep 05 06:34:07 2015 -0700
@@ -39,6 +39,7 @@
WINDOWS,
LINUX,
@@ -9423,8 +10775,8 @@
if (osName.contains("OS X")) {
return MACOSX;
}
---- ./jdk/src/share/classes/sun/font/FontUtilities.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/classes/sun/font/FontUtilities.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/classes/sun/font/FontUtilities.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/font/FontUtilities.java Sat Sep 05 06:34:07 2015 -0700
@@ -48,6 +48,8 @@
public static boolean isLinux;
@@ -9443,8 +10795,8 @@
isMacOSX = osName.contains("OS X"); // TODO: MacOSX
String t2kStr = System.getProperty("sun.java2d.font.scaler");
---- ./jdk/src/share/classes/sun/font/SunFontManager.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/classes/sun/font/SunFontManager.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/classes/sun/font/SunFontManager.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/font/SunFontManager.java Sat Sep 05 06:34:07 2015 -0700
@@ -418,7 +418,7 @@
* registerFonts method as on-screen these JRE fonts
* always go through the T2K rasteriser.
@@ -9454,9 +10806,36 @@
/* Linux font configuration uses these fonts */
registerFontDir(jreFontDirName);
}
---- ./jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java Sat Jul 18 13:32:37 2015 -0700
-@@ -1298,7 +1298,7 @@
+--- ./jdk/src/share/classes/sun/misc/JavaNetAccess.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/misc/JavaNetAccess.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2006, 2015, 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
+@@ -26,10 +26,17 @@
+ package sun.misc;
+
+ import java.net.URLClassLoader;
++import java.net.InetAddress;
+
+ public interface JavaNetAccess {
+ /**
+ * return the URLClassPath belonging to the given loader
+ */
+ URLClassPath getURLClassPath (URLClassLoader u);
++
++ /**
++ * Return the original application specified hostname of
++ * the given InetAddress object.
++ */
++ String getOriginalHostName(InetAddress ia);
+ }
+--- ./jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1306,7 +1306,7 @@
String osName = AccessController.doPrivileged(
new GetPropertyAction("os.name"));
if ("SunOS".equals(osName) || "Linux".equals(osName) || "AIX".equals(osName)
@@ -9465,8 +10844,8 @@
charset("x-COMPOUND_TEXT", "COMPOUND_TEXT",
new String[] {
"COMPOUND_TEXT", // JDK historical
---- ./jdk/src/share/classes/sun/print/PSPrinterJob.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/classes/sun/print/PSPrinterJob.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/classes/sun/print/PSPrinterJob.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/print/PSPrinterJob.java Sat Sep 05 06:34:07 2015 -0700
@@ -1587,9 +1587,31 @@
}
@@ -9501,8 +10880,8 @@
if ((pFlags & PRINTER) != 0) {
execCmd[n++] = "-P" + printer;
}
---- ./jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java Sat Sep 05 06:34:07 2015 -0700
@@ -48,6 +48,7 @@
public Boolean run() {
String osname = System.getProperty("os.name");
@@ -9511,8 +10890,8 @@
osname.contains("OS X") ||
osname.startsWith("Linux")) {
return new Boolean(System.getProperty
---- ./jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java Sat Sep 05 06:34:07 2015 -0700
@@ -90,6 +90,12 @@
"libgssapi_krb5.so",
"libgssapi_krb5.so.2",
@@ -9526,16 +10905,1844 @@
} else if (osname.contains("OS X")) {
gssLibs = new String[]{
"libgssapi_krb5.dylib",
---- ./jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/classes/sun/security/pkcs11/P11Key.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/pkcs11/P11Key.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2003, 2015, 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
+@@ -164,7 +164,7 @@
+ } else {
+ otherEnc = other.getEncoded();
+ }
+- return Arrays.equals(thisEnc, otherEnc);
++ return MessageDigest.isEqual(thisEnc, otherEnc);
+ }
+
+ public int hashCode() {
+--- ./jdk/src/share/classes/sun/security/pkcs11/wrapper/Functions.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/pkcs11/wrapper/Functions.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ */
+
+ /* Copyright (c) 2002 Graz University of Technology. All rights reserved.
+@@ -447,22 +447,6 @@
+ /**
+ * Check the given arrays for equalitiy. This method considers both arrays as
+ * equal, if both are <code>null</code> or both have the same length and
+- * contain exactly the same byte values.
+- *
+- * @param array1 The first array.
+- * @param array2 The second array.
+- * @return True, if both arrays are <code>null</code> or both have the same
+- * length and contain exactly the same byte values. False, otherwise.
+- * @preconditions
+- * @postconditions
+- */
+- public static boolean equals(byte[] array1, byte[] array2) {
+- return Arrays.equals(array1, array2);
+- }
+-
+- /**
+- * Check the given arrays for equalitiy. This method considers both arrays as
+- * equal, if both are <code>null</code> or both have the same length and
+ * contain exactly the same char values.
+ *
+ * @param array1 The first array.
+@@ -472,7 +456,7 @@
+ * @preconditions
+ * @postconditions
+ */
+- public static boolean equals(char[] array1, char[] array2) {
++ private static boolean equals(char[] array1, char[] array2) {
+ return Arrays.equals(array1, array2);
+ }
+
+--- ./jdk/src/share/classes/sun/security/pkcs12/PKCS12KeyStore.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/pkcs12/PKCS12KeyStore.java Sat Sep 05 06:34:07 2015 -0700
+@@ -2050,7 +2050,7 @@
+ "(MAC algorithm: " + m.getAlgorithm() + ")");
+ }
+
+- if (!Arrays.equals(macData.getDigest(), macResult)) {
++ if (!MessageDigest.isEqual(macData.getDigest(), macResult)) {
+ throw new SecurityException("Failed PKCS12" +
+ " integrity checking");
+ }
+--- ./jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2003, 2015, 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
+@@ -151,8 +151,8 @@
+ private static final int DEFAULT_MAX_CLOCK_SKEW = 900000;
+
+ /**
+- * Integer value indicating the maximum allowable clock skew, in seconds,
+- * to be used for the OCSP check.
++ * Integer value indicating the maximum allowable clock skew,
++ * in milliseconds, to be used for the OCSP check.
+ */
+ private static final int MAX_CLOCK_SKEW = initializeClockSkew();
+
+@@ -586,13 +586,14 @@
+ "Unable to verify OCSP Response's signature");
+ }
+
+- // Check freshness of OCSPResponse
+ if (nonce != null) {
+ if (responseNonce != null && !Arrays.equals(nonce, responseNonce)) {
+ throw new CertPathValidatorException("Nonces don't match");
+ }
+ }
+
++ // Check freshness of OCSPResponse
++
+ long now = (date == null) ? System.currentTimeMillis() : date.getTime();
+ Date nowPlusSkew = new Date(now + MAX_CLOCK_SKEW);
+ Date nowMinusSkew = new Date(now - MAX_CLOCK_SKEW);
+@@ -602,13 +603,18 @@
+ if (sr.nextUpdate != null) {
+ until = " until " + sr.nextUpdate;
+ }
+- debug.println("Response's validity interval is from " +
++ debug.println("OCSP response validity interval is from " +
+ sr.thisUpdate + until);
++ debug.println("Checking validity of OCSP response on: " +
++ new Date(now));
+ }
+
+- // Check that the test date is within the validity interval
+- if ((sr.thisUpdate != null && nowPlusSkew.before(sr.thisUpdate)) ||
+- (sr.nextUpdate != null && nowMinusSkew.after(sr.nextUpdate)))
++ // Check that the test date is within the validity interval:
++ // [ thisUpdate - MAX_CLOCK_SKEW,
++ // MAX(thisUpdate, nextUpdate) + MAX_CLOCK_SKEW ]
++ if (nowPlusSkew.before(sr.thisUpdate) ||
++ nowMinusSkew.after(
++ sr.nextUpdate != null ? sr.nextUpdate : sr.thisUpdate))
+ {
+ throw new CertPathValidatorException(
+ "Response is unreliable: its validity " +
+--- ./jdk/src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2000, 2015, 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
+@@ -159,12 +159,19 @@
+ ValidatorParams params)
+ throws CertPathValidatorException
+ {
++ // check if anchor is untrusted
++ UntrustedChecker untrustedChecker = new UntrustedChecker();
++ X509Certificate anchorCert = anchor.getTrustedCert();
++ if (anchorCert != null) {
++ untrustedChecker.check(anchorCert);
++ }
++
+ int certPathLen = params.certificates().size();
+
+ // create PKIXCertPathCheckers
+ List<PKIXCertPathChecker> certPathCheckers = new ArrayList<>();
+ // add standard checkers that we will be using
+- certPathCheckers.add(new UntrustedChecker());
++ certPathCheckers.add(untrustedChecker);
+ certPathCheckers.add(new AlgorithmChecker(anchor));
+ certPathCheckers.add(new KeyChecker(certPathLen,
+ params.targetCertConstraints()));
+--- ./jdk/src/share/classes/sun/security/rsa/RSASignature.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/rsa/RSASignature.java Sat Sep 05 06:34:07 2015 -0700
+@@ -27,7 +27,6 @@
+
+ import java.io.IOException;
+ import java.nio.ByteBuffer;
+-import java.util.Arrays;
+
+ import java.security.*;
+ import java.security.interfaces.*;
+@@ -194,7 +193,7 @@
+ byte[] decrypted = RSACore.rsa(sigBytes, publicKey);
+ byte[] unpadded = padding.unpad(decrypted);
+ byte[] decodedDigest = decodeSignature(digestOID, unpadded);
+- return Arrays.equals(digest, decodedDigest);
++ return MessageDigest.isEqual(digest, decodedDigest);
+ } catch (javax.crypto.BadPaddingException e) {
+ // occurs if the app has used the wrong RSA public key
+ // or if sigBytes is invalid
+--- ./jdk/src/share/classes/sun/security/ssl/CipherSuite.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/ssl/CipherSuite.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2002, 2015, 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
+@@ -968,7 +968,7 @@
+ * 1. Prefer Suite B compliant cipher suites, see RFC6460 (To be
+ * changed later, see below).
+ * 2. Prefer the stronger bulk cipher, in the order of AES_256(GCM),
+- * AES_128(GCM), AES_256, AES_128, 3DES-EDE, RC-4.
++ * AES_128(GCM), AES_256, AES_128, 3DES-EDE.
+ * 3. Prefer the stronger MAC algorithm, in the order of SHA384,
+ * SHA256, SHA, MD5.
+ * 4. Prefer the better performance of key exchange and digital
+@@ -1115,20 +1115,6 @@
+ add("SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
+ 0x0013, --p, K_DHE_DSS, B_3DES, N);
+
+- // RC-4
+- add("TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
+- 0xC007, --p, K_ECDHE_ECDSA, B_RC4_128, N);
+- add("TLS_ECDHE_RSA_WITH_RC4_128_SHA",
+- 0xC011, --p, K_ECDHE_RSA, B_RC4_128, N);
+- add("SSL_RSA_WITH_RC4_128_SHA",
+- 0x0005, --p, K_RSA, B_RC4_128, N);
+- add("TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
+- 0xC002, --p, K_ECDH_ECDSA, B_RC4_128, N);
+- add("TLS_ECDH_RSA_WITH_RC4_128_SHA",
+- 0xC00C, --p, K_ECDH_RSA, B_RC4_128, N);
+- add("SSL_RSA_WITH_RC4_128_MD5",
+- 0x0004, --p, K_RSA, B_RC4_128, N);
+-
+ // Renegotiation protection request Signalling Cipher Suite Value (SCSV)
+ add("TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
+ 0x00ff, --p, K_SCSV, B_NULL, T);
+@@ -1178,6 +1164,20 @@
+ add("SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
+ 0x001b, --p, K_DH_ANON, B_3DES, N);
+
++ // RC-4
++ add("TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
++ 0xC007, --p, K_ECDHE_ECDSA, B_RC4_128, N);
++ add("TLS_ECDHE_RSA_WITH_RC4_128_SHA",
++ 0xC011, --p, K_ECDHE_RSA, B_RC4_128, N);
++ add("SSL_RSA_WITH_RC4_128_SHA",
++ 0x0005, --p, K_RSA, B_RC4_128, N);
++ add("TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
++ 0xC002, --p, K_ECDH_ECDSA, B_RC4_128, N);
++ add("TLS_ECDH_RSA_WITH_RC4_128_SHA",
++ 0xC00C, --p, K_ECDH_RSA, B_RC4_128, N);
++ add("SSL_RSA_WITH_RC4_128_MD5",
++ 0x0004, --p, K_RSA, B_RC4_128, N);
++
+ add("TLS_ECDH_anon_WITH_RC4_128_SHA",
+ 0xC016, --p, K_ECDH_ANON, B_RC4_128, N);
+ add("SSL_DH_anon_WITH_RC4_128_MD5",
+--- ./jdk/src/share/classes/sun/security/ssl/ClientHandshaker.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/ssl/ClientHandshaker.java Sat Sep 05 06:34:07 2015 -0700
+@@ -489,7 +489,7 @@
+ 0, clientVerifyData.length);
+ System.arraycopy(serverVerifyData, 0, verifyData,
+ clientVerifyData.length, serverVerifyData.length);
+- if (!Arrays.equals(verifyData,
++ if (!MessageDigest.isEqual(verifyData,
+ serverHelloRI.getRenegotiatedConnection())) {
+ fatalSE(Alerts.alert_handshake_failure,
+ "Incorrect verify data in ServerHello " +
+@@ -679,6 +679,14 @@
+ // NOTREACHED
+ }
+ ephemeralServerKey = mesg.getPublicKey();
++
++ // check constraints of RSA PublicKey
++ if (!algorithmConstraints.permits(
++ EnumSet.of(CryptoPrimitive.KEY_AGREEMENT), ephemeralServerKey)) {
++
++ throw new SSLHandshakeException("RSA ServerKeyExchange " +
++ "does not comply to algorithm constraints");
++ }
+ }
+
+
+@@ -696,6 +704,9 @@
+ dh = new DHCrypt(mesg.getModulus(), mesg.getBase(),
+ sslContext.getSecureRandom());
+ serverDH = mesg.getServerPublicKey();
++
++ // check algorithm constraints
++ dh.checkConstraints(algorithmConstraints, serverDH);
+ }
+
+ private void serverKeyExchange(ECDH_ServerKeyExchange mesg)
+@@ -706,6 +717,14 @@
+ ECPublicKey key = mesg.getPublicKey();
+ ecdh = new ECDHCrypt(key.getParams(), sslContext.getSecureRandom());
+ ephemeralServerKey = key;
++
++ // check constraints of EC PublicKey
++ if (!algorithmConstraints.permits(
++ EnumSet.of(CryptoPrimitive.KEY_AGREEMENT), ephemeralServerKey)) {
++
++ throw new SSLHandshakeException("ECDH ServerKeyExchange " +
++ "does not comply to algorithm constraints");
++ }
+ }
+
+ /*
+--- ./jdk/src/share/classes/sun/security/ssl/DHCrypt.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/ssl/DHCrypt.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1996, 2015, 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
+@@ -34,6 +34,7 @@
+ import javax.crypto.KeyAgreement;
+ import javax.crypto.interfaces.DHPublicKey;
+ import javax.crypto.spec.*;
++import java.util.EnumSet;
+
+ import sun.security.util.KeyUtil;
+
+@@ -216,6 +217,28 @@
+ }
+ }
+
++ // Check constraints of the specified DH public key.
++ void checkConstraints(AlgorithmConstraints constraints,
++ BigInteger peerPublicValue) throws SSLHandshakeException {
++
++ try {
++ KeyFactory kf = JsseJce.getKeyFactory("DiffieHellman");
++ DHPublicKeySpec spec =
++ new DHPublicKeySpec(peerPublicValue, modulus, base);
++ DHPublicKey publicKey = (DHPublicKey)kf.generatePublic(spec);
++
++ // check constraints of DHPublicKey
++ if (!constraints.permits(
++ EnumSet.of(CryptoPrimitive.KEY_AGREEMENT), publicKey)) {
++ throw new SSLHandshakeException(
++ "DHPublicKey does not comply to algorithm constraints");
++ }
++ } catch (GeneralSecurityException gse) {
++ throw (SSLHandshakeException) new SSLHandshakeException(
++ "Could not generate DHPublicKey").initCause(gse);
++ }
++ }
++
+ // Generate and validate DHPublicKeySpec
+ private DHPublicKeySpec generateDHPublicKeySpec(KeyPairGenerator kpg)
+ throws GeneralSecurityException {
+--- ./jdk/src/share/classes/sun/security/ssl/ECDHCrypt.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/ssl/ECDHCrypt.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2006, 2015, 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
+@@ -29,6 +29,7 @@
+ import java.security.interfaces.ECPublicKey;
+ import java.security.spec.*;
+
++import java.util.EnumSet;
+ import javax.crypto.SecretKey;
+ import javax.crypto.KeyAgreement;
+ import javax.net.ssl.SSLHandshakeException;
+@@ -88,8 +89,11 @@
+ return publicKey;
+ }
+
+- // called by ClientHandshaker with either the server's static or ephemeral public key
+- SecretKey getAgreedSecret(PublicKey peerPublicKey) throws SSLHandshakeException {
++ // called by ClientHandshaker with either the server's static or
++ // ephemeral public key
++ SecretKey getAgreedSecret(
++ PublicKey peerPublicKey) throws SSLHandshakeException {
++
+ try {
+ KeyAgreement ka = JsseJce.getKeyAgreement("ECDH");
+ ka.init(privateKey);
+@@ -102,10 +106,13 @@
+ }
+
+ // called by ServerHandshaker
+- SecretKey getAgreedSecret(byte[] encodedPoint) throws SSLHandshakeException {
++ SecretKey getAgreedSecret(
++ byte[] encodedPoint) throws SSLHandshakeException {
++
+ try {
+ ECParameterSpec params = publicKey.getParams();
+- ECPoint point = JsseJce.decodePoint(encodedPoint, params.getCurve());
++ ECPoint point =
++ JsseJce.decodePoint(encodedPoint, params.getCurve());
+ KeyFactory kf = JsseJce.getKeyFactory("EC");
+ ECPublicKeySpec spec = new ECPublicKeySpec(point, params);
+ PublicKey peerPublicKey = kf.generatePublic(spec);
+@@ -116,4 +123,30 @@
+ }
+ }
+
++ // Check constraints of the specified EC public key.
++ void checkConstraints(AlgorithmConstraints constraints,
++ byte[] encodedPoint) throws SSLHandshakeException {
++
++ try {
++
++ ECParameterSpec params = publicKey.getParams();
++ ECPoint point =
++ JsseJce.decodePoint(encodedPoint, params.getCurve());
++ ECPublicKeySpec spec = new ECPublicKeySpec(point, params);
++
++ KeyFactory kf = JsseJce.getKeyFactory("EC");
++ ECPublicKey publicKey = (ECPublicKey)kf.generatePublic(spec);
++
++ // check constraints of ECPublicKey
++ if (!constraints.permits(
++ EnumSet.of(CryptoPrimitive.KEY_AGREEMENT), publicKey)) {
++ throw new SSLHandshakeException(
++ "ECPublicKey does not comply to algorithm constraints");
++ }
++ } catch (GeneralSecurityException | java.io.IOException e) {
++ throw (SSLHandshakeException) new SSLHandshakeException(
++ "Could not generate ECPublicKey").initCause(e);
++ }
++ }
++
+ }
+--- ./jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1912,7 +1912,7 @@
+ */
+ boolean verify(HandshakeHash handshakeHash, int sender, SecretKey master) {
+ byte[] myFinished = getFinished(handshakeHash, sender, master);
+- return Arrays.equals(myFinished, verifyData);
++ return MessageDigest.isEqual(myFinished, verifyData);
+ }
+
+ /*
+--- ./jdk/src/share/classes/sun/security/ssl/Handshaker.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/ssl/Handshaker.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1996, 2015, 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
+@@ -86,7 +86,7 @@
+ String identificationProtocol;
+
+ // The cryptographic algorithm constraints
+- private AlgorithmConstraints algorithmConstraints = null;
++ AlgorithmConstraints algorithmConstraints = null;
+
+ // Local supported signature and algorithms
+ Collection<SignatureAndHashAlgorithm> localSupportedSignAlgs;
+--- ./jdk/src/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2010, 2015, 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
+@@ -34,9 +34,9 @@
+ import java.security.Key;
+
+ import java.util.Set;
+-import java.util.HashSet;
+
+ import sun.security.util.DisabledAlgorithmConstraints;
++import static sun.security.util.DisabledAlgorithmConstraints.*;
+ import sun.security.ssl.CipherSuite.*;
+
+ /**
+@@ -46,10 +46,15 @@
+ * for the syntax of the disabled algorithm string.
+ */
+ final class SSLAlgorithmConstraints implements AlgorithmConstraints {
++
+ private final static AlgorithmConstraints tlsDisabledAlgConstraints =
+- new TLSDisabledAlgConstraints();
++ new DisabledAlgorithmConstraints(PROPERTY_TLS_DISABLED_ALGS,
++ new SSLAlgorithmDecomposer());
++
+ private final static AlgorithmConstraints x509DisabledAlgConstraints =
+- new X509DisabledAlgConstraints();
++ new DisabledAlgorithmConstraints(PROPERTY_CERTPATH_DISABLED_ALGS,
++ new SSLAlgorithmDecomposer(true));
++
+ private AlgorithmConstraints userAlgConstraints = null;
+ private AlgorithmConstraints peerAlgConstraints = null;
+
+@@ -267,217 +272,4 @@
+ }
+ }
+
+- static private class BasicDisabledAlgConstraints
+- extends DisabledAlgorithmConstraints {
+- BasicDisabledAlgConstraints(String propertyName) {
+- super(propertyName);
+- }
+-
+- protected Set<String> decomposes(KeyExchange keyExchange,
+- boolean forCertPathOnly) {
+- Set<String> components = new HashSet<>();
+- switch (keyExchange) {
+- case K_NULL:
+- if (!forCertPathOnly) {
+- components.add("NULL");
+- }
+- break;
+- case K_RSA:
+- components.add("RSA");
+- break;
+- case K_RSA_EXPORT:
+- components.add("RSA");
+- components.add("RSA_EXPORT");
+- break;
+- case K_DH_RSA:
+- components.add("RSA");
+- components.add("DH");
+- components.add("DiffieHellman");
+- components.add("DH_RSA");
+- break;
+- case K_DH_DSS:
+- components.add("DSA");
+- components.add("DSS");
+- components.add("DH");
+- components.add("DiffieHellman");
+- components.add("DH_DSS");
+- break;
+- case K_DHE_DSS:
+- components.add("DSA");
+- components.add("DSS");
+- components.add("DH");
+- components.add("DHE");
+- components.add("DiffieHellman");
+- components.add("DHE_DSS");
+- break;
+- case K_DHE_RSA:
+- components.add("RSA");
+- components.add("DH");
+- components.add("DHE");
+- components.add("DiffieHellman");
+- components.add("DHE_RSA");
+- break;
+- case K_DH_ANON:
+- if (!forCertPathOnly) {
+- components.add("ANON");
+- components.add("DH");
+- components.add("DiffieHellman");
+- components.add("DH_ANON");
+- }
+- break;
+- case K_ECDH_ECDSA:
+- components.add("ECDH");
+- components.add("ECDSA");
+- components.add("ECDH_ECDSA");
+- break;
+- case K_ECDH_RSA:
+- components.add("ECDH");
+- components.add("RSA");
+- components.add("ECDH_RSA");
+- break;
+- case K_ECDHE_ECDSA:
+- components.add("ECDHE");
+- components.add("ECDSA");
+- components.add("ECDHE_ECDSA");
+- break;
+- case K_ECDHE_RSA:
+- components.add("ECDHE");
+- components.add("RSA");
+- components.add("ECDHE_RSA");
+- break;
+- case K_ECDH_ANON:
+- if (!forCertPathOnly) {
+- components.add("ECDH");
+- components.add("ANON");
+- components.add("ECDH_ANON");
+- }
+- break;
+- case K_KRB5:
+- if (!forCertPathOnly) {
+- components.add("KRB5");
+- }
+- break;
+- case K_KRB5_EXPORT:
+- if (!forCertPathOnly) {
+- components.add("KRB5_EXPORT");
+- }
+- break;
+- default:
+- // ignore
+- }
+-
+- return components;
+- }
+-
+- protected Set<String> decomposes(BulkCipher bulkCipher) {
+- Set<String> components = new HashSet<>();
+-
+- if (bulkCipher.transformation != null) {
+- components.addAll(super.decomposes(bulkCipher.transformation));
+- }
+-
+- return components;
+- }
+-
+- protected Set<String> decomposes(MacAlg macAlg) {
+- Set<String> components = new HashSet<>();
+-
+- if (macAlg == CipherSuite.M_MD5) {
+- components.add("MD5");
+- components.add("HmacMD5");
+- } else if (macAlg == CipherSuite.M_SHA) {
+- components.add("SHA1");
+- components.add("SHA-1");
+- components.add("HmacSHA1");
+- } else if (macAlg == CipherSuite.M_SHA256) {
+- components.add("SHA256");
+- components.add("SHA-256");
+- components.add("HmacSHA256");
+- } else if (macAlg == CipherSuite.M_SHA384) {
+- components.add("SHA384");
+- components.add("SHA-384");
+- components.add("HmacSHA384");
+- }
+-
+- return components;
+- }
+- }
+-
+- static private class TLSDisabledAlgConstraints
+- extends BasicDisabledAlgConstraints {
+-
+- TLSDisabledAlgConstraints() {
+- super(DisabledAlgorithmConstraints.PROPERTY_TLS_DISABLED_ALGS);
+- }
+-
+- @Override
+- protected Set<String> decomposes(String algorithm) {
+- if (algorithm.startsWith("SSL_") || algorithm.startsWith("TLS_")) {
+- CipherSuite cipherSuite = null;
+- try {
+- cipherSuite = CipherSuite.valueOf(algorithm);
+- } catch (IllegalArgumentException iae) {
+- // ignore: unknown or unsupported ciphersuite
+- }
+-
+- if (cipherSuite != null) {
+- Set<String> components = new HashSet<>();
+-
+- if(cipherSuite.keyExchange != null) {
+- components.addAll(
+- decomposes(cipherSuite.keyExchange, false));
+- }
+-
+- if (cipherSuite.cipher != null) {
+- components.addAll(decomposes(cipherSuite.cipher));
+- }
+-
+- if (cipherSuite.macAlg != null) {
+- components.addAll(decomposes(cipherSuite.macAlg));
+- }
+-
+- return components;
+- }
+- }
+-
+- return super.decomposes(algorithm);
+- }
+- }
+-
+- static private class X509DisabledAlgConstraints
+- extends BasicDisabledAlgConstraints {
+-
+- X509DisabledAlgConstraints() {
+- super(DisabledAlgorithmConstraints.PROPERTY_CERTPATH_DISABLED_ALGS);
+- }
+-
+- @Override
+- protected Set<String> decomposes(String algorithm) {
+- if (algorithm.startsWith("SSL_") || algorithm.startsWith("TLS_")) {
+- CipherSuite cipherSuite = null;
+- try {
+- cipherSuite = CipherSuite.valueOf(algorithm);
+- } catch (IllegalArgumentException iae) {
+- // ignore: unknown or unsupported ciphersuite
+- }
+-
+- if (cipherSuite != null) {
+- Set<String> components = new HashSet<>();
+-
+- if(cipherSuite.keyExchange != null) {
+- components.addAll(
+- decomposes(cipherSuite.keyExchange, true));
+- }
+-
+- // Certification path algorithm constraints do not apply
+- // to cipherSuite.cipher and cipherSuite.macAlg.
+-
+- return components;
+- }
+- }
+-
+- return super.decomposes(algorithm);
+- }
+- }
+ }
+-
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ ./jdk/src/share/classes/sun/security/ssl/SSLAlgorithmDecomposer.java Sat Sep 05 06:34:07 2015 -0700
+@@ -0,0 +1,251 @@
++/*
++ * Copyright (c) 2015, 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. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * 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.
++ */
++
++package sun.security.ssl;
++
++import java.util.HashSet;
++import java.util.Set;
++import sun.security.util.AlgorithmDecomposer;
++import static sun.security.ssl.CipherSuite.*;
++import static sun.security.ssl.CipherSuite.KeyExchange.*;
++
++/**
++ * The class decomposes standard SSL/TLS cipher suites into sub-elements.
++ */
++class SSLAlgorithmDecomposer extends AlgorithmDecomposer {
++
++ // indicates that only certification path algorithms need to be used
++ private final boolean onlyX509;
++
++ SSLAlgorithmDecomposer(boolean onlyX509) {
++ this.onlyX509 = onlyX509;
++ }
++
++ SSLAlgorithmDecomposer() {
++ this(false);
++ }
++
++ private Set<String> decomposes(CipherSuite.KeyExchange keyExchange) {
++ Set<String> components = new HashSet<>();
++ switch (keyExchange) {
++ case K_NULL:
++ if (!onlyX509) {
++ components.add("K_NULL");
++ }
++ break;
++ case K_RSA:
++ components.add("RSA");
++ break;
++ case K_RSA_EXPORT:
++ components.add("RSA");
++ components.add("RSA_EXPORT");
++ break;
++ case K_DH_RSA:
++ components.add("RSA");
++ components.add("DH");
++ components.add("DiffieHellman");
++ components.add("DH_RSA");
++ break;
++ case K_DH_DSS:
++ components.add("DSA");
++ components.add("DSS");
++ components.add("DH");
++ components.add("DiffieHellman");
++ components.add("DH_DSS");
++ break;
++ case K_DHE_DSS:
++ components.add("DSA");
++ components.add("DSS");
++ components.add("DH");
++ components.add("DHE");
++ components.add("DiffieHellman");
++ components.add("DHE_DSS");
++ break;
++ case K_DHE_RSA:
++ components.add("RSA");
++ components.add("DH");
++ components.add("DHE");
++ components.add("DiffieHellman");
++ components.add("DHE_RSA");
++ break;
++ case K_DH_ANON:
++ if (!onlyX509) {
++ components.add("ANON");
++ components.add("DH");
++ components.add("DiffieHellman");
++ components.add("DH_ANON");
++ }
++ break;
++ case K_ECDH_ECDSA:
++ components.add("ECDH");
++ components.add("ECDSA");
++ components.add("ECDH_ECDSA");
++ break;
++ case K_ECDH_RSA:
++ components.add("ECDH");
++ components.add("RSA");
++ components.add("ECDH_RSA");
++ break;
++ case K_ECDHE_ECDSA:
++ components.add("ECDHE");
++ components.add("ECDSA");
++ components.add("ECDHE_ECDSA");
++ break;
++ case K_ECDHE_RSA:
++ components.add("ECDHE");
++ components.add("RSA");
++ components.add("ECDHE_RSA");
++ break;
++ case K_ECDH_ANON:
++ if (!onlyX509) {
++ components.add("ECDH");
++ components.add("ANON");
++ components.add("ECDH_ANON");
++ }
++ break;
++ case K_KRB5:
++ if (!onlyX509) {
++ components.add("KRB5");
++ }
++ break;
++ case K_KRB5_EXPORT:
++ if (!onlyX509) {
++ components.add("KRB5_EXPORT");
++ }
++ break;
++ default:
++ // ignore
++ }
++
++ return components;
++ }
++
++ private Set<String> decomposes(CipherSuite.BulkCipher bulkCipher) {
++ Set<String> components = new HashSet<>();
++
++ if (bulkCipher.transformation != null) {
++ components.addAll(super.decompose(bulkCipher.transformation));
++ }
++
++ if (bulkCipher == B_NULL) {
++ components.add("C_NULL");
++ } else if (bulkCipher == B_RC2_40) {
++ components.add("RC2_CBC_40");
++ } else if (bulkCipher == B_RC4_40) {
++ components.add("RC4_40");
++ } else if (bulkCipher == B_RC4_128) {
++ components.add("RC4_128");
++ } else if (bulkCipher == B_DES_40) {
++ components.add("DES40_CBC");
++ components.add("DES_CBC_40");
++ } else if (bulkCipher == B_DES) {
++ components.add("DES_CBC");
++ } else if (bulkCipher == B_3DES) {
++ components.add("3DES_EDE_CBC");
++ } else if (bulkCipher == B_AES_128) {
++ components.add("AES_128_CBC");
++ } else if (bulkCipher == B_AES_256) {
++ components.add("AES_256_CBC");
++ } else if (bulkCipher == B_AES_128_GCM) {
++ components.add("AES_128_GCM");
++ } else if (bulkCipher == B_AES_256_GCM) {
++ components.add("AES_256_GCM");
++ }
++
++ return components;
++ }
++
++ private Set<String> decomposes(CipherSuite.MacAlg macAlg,
++ BulkCipher cipher) {
++ Set<String> components = new HashSet<>();
++
++ if (macAlg == M_NULL
++ && cipher.cipherType != CipherType.AEAD_CIPHER) {
++ components.add("M_NULL");
++ } else if (macAlg == M_MD5) {
++ components.add("MD5");
++ components.add("HmacMD5");
++ } else if (macAlg == M_SHA) {
++ components.add("SHA1");
++ components.add("SHA-1");
++ components.add("HmacSHA1");
++ } else if (macAlg == M_SHA256) {
++ components.add("SHA256");
++ components.add("SHA-256");
++ components.add("HmacSHA256");
++ } else if (macAlg == M_SHA384) {
++ components.add("SHA384");
++ components.add("SHA-384");
++ components.add("HmacSHA384");
++ }
++
++ return components;
++ }
++
++ private Set<String> decompose(KeyExchange keyExchange, BulkCipher cipher,
++ MacAlg macAlg) {
++ Set<String> components = new HashSet<>();
++
++ if (keyExchange != null) {
++ components.addAll(decomposes(keyExchange));
++ }
++
++ if (onlyX509) {
++ // Certification path algorithm constraints do not apply
++ // to cipher and macAlg.
++ return components;
++ }
++
++ if (cipher != null) {
++ components.addAll(decomposes(cipher));
++ }
++
++ if (macAlg != null) {
++ components.addAll(decomposes(macAlg, cipher));
++ }
++
++ return components;
++ }
++
++ @Override
++ public Set<String> decompose(String algorithm) {
++ if (algorithm.startsWith("SSL_") || algorithm.startsWith("TLS_")) {
++ CipherSuite cipherSuite = null;
++ try {
++ cipherSuite = CipherSuite.valueOf(algorithm);
++ } catch (IllegalArgumentException iae) {
++ // ignore: unknown or unsupported ciphersuite
++ }
++
++ if (cipherSuite != null) {
++ return decompose(cipherSuite.keyExchange, cipherSuite.cipher,
++ cipherSuite.macAlg);
++ }
++ }
++
++ return super.decompose(algorithm);
++ }
++
++}
+--- ./jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1996, 2015, 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
+@@ -40,6 +40,9 @@
+ import javax.crypto.BadPaddingException;
+ import javax.net.ssl.*;
+
++import sun.misc.JavaNetAccess;
++import sun.misc.SharedSecrets;
++
+ /**
+ * Implementation of an SSL socket. This is a normal connection type
+ * socket, implementing SSL over some lower level socket, such as TCP.
+@@ -389,6 +392,15 @@
+ */
+ private boolean preferLocalCipherSuites = false;
+
++ /*
++ * Is the local name service trustworthy?
++ *
++ * If the local name service is not trustworthy, reverse host name
++ * resolution should not be performed for endpoint identification.
++ */
++ static final boolean trustNameService =
++ Debug.getBooleanProperty("jdk.tls.trustNameService", false);
++
+ //
+ // CONSTRUCTORS AND INITIALIZATION CODE
+ //
+@@ -2149,11 +2161,41 @@
+ synchronized String getHost() {
+ // Note that the host may be null or empty for localhost.
+ if (host == null || host.length() == 0) {
+- host = getInetAddress().getHostName();
++ if (!trustNameService) {
++ // If the local name service is not trustworthy, reverse host
++ // name resolution should not be performed for endpoint
++ // identification. Use the application original specified
++ // hostname or IP address instead.
++ host = getOriginalHostname(getInetAddress());
++ } else {
++ host = getInetAddress().getHostName();
++ }
+ }
++
+ return host;
+ }
+
++ /*
++ * Get the original application specified hostname.
++ */
++ private static String getOriginalHostname(InetAddress inetAddress) {
++ /*
++ * Get the original hostname via sun.misc.SharedSecrets.
++ */
++ JavaNetAccess jna = SharedSecrets.getJavaNetAccess();
++ String originalHostname = jna.getOriginalHostName(inetAddress);
++
++ /*
++ * If no application specified hostname, use the IP address.
++ */
++ if (originalHostname == null || originalHostname.length() == 0) {
++ originalHostname = inetAddress.getHostAddress();
++ }
++
++ return originalHostname;
++ }
++
++
+ // ONLY used by HttpsClient to setup the URI specified hostname
+ //
+ // Please NOTE that this method MUST be called before calling to
+--- ./jdk/src/share/classes/sun/security/ssl/ServerHandshaker.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/ssl/ServerHandshaker.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1996, 2015, 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
+@@ -32,6 +32,7 @@
+ import java.security.cert.*;
+ import java.security.interfaces.*;
+ import java.security.spec.ECParameterSpec;
++import java.math.BigInteger;
+
+ import javax.crypto.SecretKey;
+ import javax.crypto.spec.SecretKeySpec;
+@@ -41,6 +42,7 @@
+ import javax.security.auth.Subject;
+
+ import sun.security.util.KeyUtil;
++import sun.security.util.LegacyAlgorithmConstraints;
+ import sun.security.action.GetPropertyAction;
+ import sun.security.ssl.HandshakeMessage.*;
+ import sun.security.ssl.CipherSuite.*;
+@@ -106,6 +108,12 @@
+ // The customized ephemeral DH key size for non-exportable cipher suites.
+ private static final int customizedDHKeySize;
+
++ // legacy algorithm constraints
++ private static final AlgorithmConstraints legacyAlgorithmConstraints =
++ new LegacyAlgorithmConstraints(
++ LegacyAlgorithmConstraints.PROPERTY_TLS_LEGACY_ALGS,
++ new SSLAlgorithmDecomposer());
++
+ static {
+ String property = AccessController.doPrivileged(
+ new GetPropertyAction("jdk.tls.ephemeralDHKeySize"));
+@@ -406,7 +414,7 @@
+ }
+
+ // verify the client_verify_data value
+- if (!Arrays.equals(clientVerifyData,
++ if (!MessageDigest.isEqual(clientVerifyData,
+ clientHelloRI.getRenegotiatedConnection())) {
+ fatalSE(Alerts.alert_handshake_failure,
+ "Incorrect verify data in ClientHello " +
+@@ -995,6 +1003,7 @@
+ proposed = getActiveCipherSuites();
+ }
+
++ List<CipherSuite> legacySuites = new ArrayList<>();
+ for (CipherSuite suite : prefered.collection()) {
+ if (isNegotiable(proposed, suite) == false) {
+ continue;
+@@ -1006,11 +1015,24 @@
+ continue;
+ }
+ }
++
++ if (!legacyAlgorithmConstraints.permits(null, suite.name, null)) {
++ legacySuites.add(suite);
++ continue;
++ }
++
+ if (trySetCipherSuite(suite) == false) {
+ continue;
+ }
+ return;
+ }
++
++ for (CipherSuite suite : legacySuites) {
++ if (trySetCipherSuite(suite)) {
++ return;
++ }
++ }
++
+ fatalSE(Alerts.alert_handshake_failure, "no cipher suites in common");
+ }
+
+@@ -1543,7 +1565,13 @@
+ if (debug != null && Debug.isOn("handshake")) {
+ mesg.print(System.out);
+ }
+- return dh.getAgreedSecret(mesg.getClientPublicKey(), false);
++
++ BigInteger publicKeyValue = mesg.getClientPublicKey();
++
++ // check algorithm constraints
++ dh.checkConstraints(algorithmConstraints, publicKeyValue);
++
++ return dh.getAgreedSecret(publicKeyValue, false);
+ }
+
+ private SecretKey clientKeyExchange(ECDHClientKeyExchange mesg)
+@@ -1552,7 +1580,13 @@
+ if (debug != null && Debug.isOn("handshake")) {
+ mesg.print(System.out);
+ }
+- return ecdh.getAgreedSecret(mesg.getEncodedPoint());
++
++ byte[] publicPoint = mesg.getEncodedPoint();
++
++ // check algorithm constraints
++ ecdh.checkConstraints(algorithmConstraints, publicPoint);
++
++ return ecdh.getAgreedSecret(publicPoint);
+ }
+
+ /*
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ ./jdk/src/share/classes/sun/security/util/AbstractAlgorithmConstraints.java Sat Sep 05 06:34:07 2015 -0700
+@@ -0,0 +1,119 @@
++/*
++ * Copyright (c) 2015, 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. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * 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.
++ */
++
++package sun.security.util;
++
++import java.security.AccessController;
++import java.security.AlgorithmConstraints;
++import java.security.PrivilegedAction;
++import java.security.Security;
++import java.util.Map;
++import java.util.Set;
++
++/**
++ * The class contains common functionality for algorithm constraints classes.
++ */
++public abstract class AbstractAlgorithmConstraints
++ implements AlgorithmConstraints {
++
++ protected final AlgorithmDecomposer decomposer;
++
++ protected AbstractAlgorithmConstraints(AlgorithmDecomposer decomposer) {
++ this.decomposer = decomposer;
++ }
++
++ // Get algorithm constraints from the specified security property.
++ private static void loadAlgorithmsMap(Map<String, String[]> algorithmsMap,
++ String propertyName) {
++ String property = AccessController.doPrivileged(
++ (PrivilegedAction<String>) () -> Security.getProperty(
++ propertyName));
++
++ String[] algorithmsInProperty = null;
++ if (property != null && !property.isEmpty()) {
++ // remove double quote marks from beginning/end of the property
++ if (property.charAt(0) == '"'
++ && property.charAt(property.length() - 1) == '"') {
++ property = property.substring(1, property.length() - 1);
++ }
++ algorithmsInProperty = property.split(",");
++ for (int i = 0; i < algorithmsInProperty.length;
++ i++) {
++ algorithmsInProperty[i] = algorithmsInProperty[i].trim();
++ }
++ }
++
++ // map the disabled algorithms
++ if (algorithmsInProperty == null) {
++ algorithmsInProperty = new String[0];
++ }
++ algorithmsMap.put(propertyName, algorithmsInProperty);
++ }
++
++ static String[] getAlgorithms(Map<String, String[]> algorithmsMap,
++ String propertyName) {
++ synchronized (algorithmsMap) {
++ if (!algorithmsMap.containsKey(propertyName)) {
++ loadAlgorithmsMap(algorithmsMap, propertyName);
++ }
++
++ return algorithmsMap.get(propertyName);
++ }
++ }
++
++ static boolean checkAlgorithm(String[] algorithms, String algorithm,
++ AlgorithmDecomposer decomposer) {
++ if (algorithm == null || algorithm.length() == 0) {
++ throw new IllegalArgumentException("No algorithm name specified");
++ }
++
++ Set<String> elements = null;
++ for (String item : algorithms) {
++ if (item == null || item.isEmpty()) {
++ continue;
++ }
++
++ // check the full name
++ if (item.equalsIgnoreCase(algorithm)) {
++ return false;
++ }
++
++ // decompose the algorithm into sub-elements
++ if (elements == null) {
++ elements = decomposer.decompose(algorithm);
++ }
++
++ // check the items of the algorithm
++ for (String element : elements) {
++ if (item.equalsIgnoreCase(element)) {
++ return false;
++ }
++ }
++ }
++
++ return true;
++ }
++
++}
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ ./jdk/src/share/classes/sun/security/util/AlgorithmDecomposer.java Sat Sep 05 06:34:07 2015 -0700
+@@ -0,0 +1,130 @@
++/*
++ * Copyright (c) 2015, 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. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * 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.
++ */
++
++package sun.security.util;
++
++import java.util.HashSet;
++import java.util.Set;
++import java.util.regex.Pattern;
++
++/**
++ * The class decomposes standard algorithms into sub-elements.
++ */
++public class AlgorithmDecomposer {
++
++ private static final Pattern transPattern = Pattern.compile("/");
++ private static final Pattern pattern =
++ Pattern.compile("with|and", Pattern.CASE_INSENSITIVE);
++
++ /**
++ * Decompose the standard algorithm name into sub-elements.
++ * <p>
++ * For example, we need to decompose "SHA1WithRSA" into "SHA1" and "RSA"
++ * so that we can check the "SHA1" and "RSA" algorithm constraints
++ * separately.
++ * <p>
++ * Please override the method if need to support more name pattern.
++ */
++ public Set<String> decompose(String algorithm) {
++ if (algorithm == null || algorithm.length() == 0) {
++ return new HashSet<>();
++ }
++
++ // algorithm/mode/padding
++ String[] transTockens = transPattern.split(algorithm);
++
++ Set<String> elements = new HashSet<>();
++ for (String transTocken : transTockens) {
++ if (transTocken == null || transTocken.length() == 0) {
++ continue;
++ }
++
++ // PBEWith<digest>And<encryption>
++ // PBEWith<prf>And<encryption>
++ // OAEPWith<digest>And<mgf>Padding
++ // <digest>with<encryption>
++ // <digest>with<encryption>and<mgf>
++ String[] tokens = pattern.split(transTocken);
++
++ for (String token : tokens) {
++ if (token == null || token.length() == 0) {
++ continue;
++ }
++
++ elements.add(token);
++ }
++ }
++
++ // In Java standard algorithm name specification, for different
++ // purpose, the SHA-1 and SHA-2 algorithm names are different. For
++ // example, for MessageDigest, the standard name is "SHA-256", while
++ // for Signature, the digest algorithm component is "SHA256" for
++ // signature algorithm "SHA256withRSA". So we need to check both
++ // "SHA-256" and "SHA256" to make the right constraint checking.
++
++ // handle special name: SHA-1 and SHA1
++ if (elements.contains("SHA1") && !elements.contains("SHA-1")) {
++ elements.add("SHA-1");
++ }
++ if (elements.contains("SHA-1") && !elements.contains("SHA1")) {
++ elements.add("SHA1");
++ }
++
++ // handle special name: SHA-224 and SHA224
++ if (elements.contains("SHA224") && !elements.contains("SHA-224")) {
++ elements.add("SHA-224");
++ }
++ if (elements.contains("SHA-224") && !elements.contains("SHA224")) {
++ elements.add("SHA224");
++ }
++
++ // handle special name: SHA-256 and SHA256
++ if (elements.contains("SHA256") && !elements.contains("SHA-256")) {
++ elements.add("SHA-256");
++ }
++ if (elements.contains("SHA-256") && !elements.contains("SHA256")) {
++ elements.add("SHA256");
++ }
++
++ // handle special name: SHA-384 and SHA384
++ if (elements.contains("SHA384") && !elements.contains("SHA-384")) {
++ elements.add("SHA-384");
++ }
++ if (elements.contains("SHA-384") && !elements.contains("SHA384")) {
++ elements.add("SHA384");
++ }
++
++ // handle special name: SHA-512 and SHA512
++ if (elements.contains("SHA512") && !elements.contains("SHA-512")) {
++ elements.add("SHA-512");
++ }
++ if (elements.contains("SHA-512") && !elements.contains("SHA512")) {
++ elements.add("SHA512");
++ }
++
++ return elements;
++ }
++
++}
+--- ./jdk/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2010, 2015, 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
+@@ -25,15 +25,9 @@
+
+ package sun.security.util;
+
+-import java.security.AlgorithmConstraints;
+ import java.security.CryptoPrimitive;
+ import java.security.AlgorithmParameters;
+-
+ import java.security.Key;
+-import java.security.Security;
+-import java.security.PrivilegedAction;
+-import java.security.AccessController;
+-
+ import java.util.Locale;
+ import java.util.Set;
+ import java.util.Collections;
+@@ -49,7 +43,7 @@
+ * See the "jdk.certpath.disabledAlgorithms" specification in java.security
+ * for the syntax of the disabled algorithm string.
+ */
+-public class DisabledAlgorithmConstraints implements AlgorithmConstraints {
++public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints {
+
+ // the known security property, jdk.certpath.disabledAlgorithms
+ public final static String PROPERTY_CERTPATH_DISABLED_ALGS =
+@@ -64,8 +58,8 @@
+ private final static Map<String, KeySizeConstraints> keySizeConstraintsMap =
+ new HashMap<>();
+
+- private String[] disabledAlgorithms;
+- private KeySizeConstraints keySizeConstraints;
++ private final String[] disabledAlgorithms;
++ private final KeySizeConstraints keySizeConstraints;
+
+ /**
+ * Initialize algorithm constraints with the specified security property.
+@@ -74,56 +68,27 @@
+ * algorithm constraints
+ */
+ public DisabledAlgorithmConstraints(String propertyName) {
+- // Both disabledAlgorithmsMap and keySizeConstraintsMap are
+- // synchronized with the lock of disabledAlgorithmsMap.
+- synchronized (disabledAlgorithmsMap) {
+- if(!disabledAlgorithmsMap.containsKey(propertyName)) {
+- loadDisabledAlgorithmsMap(propertyName);
+- }
++ this(propertyName, new AlgorithmDecomposer());
++ }
+
+- disabledAlgorithms = disabledAlgorithmsMap.get(propertyName);
+- keySizeConstraints = keySizeConstraintsMap.get(propertyName);
+- }
++ public DisabledAlgorithmConstraints(String propertyName,
++ AlgorithmDecomposer decomposer) {
++ super(decomposer);
++ disabledAlgorithms = getAlgorithms(disabledAlgorithmsMap, propertyName);
++ keySizeConstraints = getKeySizeConstraints(disabledAlgorithms,
++ propertyName);
+ }
+
+ @Override
+ final public boolean permits(Set<CryptoPrimitive> primitives,
+ String algorithm, AlgorithmParameters parameters) {
+
+- if (algorithm == null || algorithm.length() == 0) {
+- throw new IllegalArgumentException("No algorithm name specified");
+- }
+-
+ if (primitives == null || primitives.isEmpty()) {
+ throw new IllegalArgumentException(
+ "No cryptographic primitive specified");
+ }
+
+- Set<String> elements = null;
+- for (String disabled : disabledAlgorithms) {
+- if (disabled == null || disabled.isEmpty()) {
+- continue;
+- }
+-
+- // check the full name
+- if (disabled.equalsIgnoreCase(algorithm)) {
+- return false;
+- }
+-
+- // decompose the algorithm into sub-elements
+- if (elements == null) {
+- elements = decomposes(algorithm);
+- }
+-
+- // check the items of the algorithm
+- for (String element : elements) {
+- if (disabled.equalsIgnoreCase(element)) {
+- return false;
+- }
+- }
+- }
+-
+- return true;
++ return checkAlgorithm(disabledAlgorithms, algorithm, decomposer);
+ }
+
+ @Override
+@@ -142,98 +107,6 @@
+ return checkConstraints(primitives, algorithm, key, parameters);
+ }
+
+- /**
+- * Decompose the standard algorithm name into sub-elements.
+- * <p>
+- * For example, we need to decompose "SHA1WithRSA" into "SHA1" and "RSA"
+- * so that we can check the "SHA1" and "RSA" algorithm constraints
+- * separately.
+- * <p>
+- * Please override the method if need to support more name pattern.
+- */
+- protected Set<String> decomposes(String algorithm) {
+- if (algorithm == null || algorithm.length() == 0) {
+- return new HashSet<String>();
+- }
+-
+- // algorithm/mode/padding
+- Pattern transPattern = Pattern.compile("/");
+- String[] transTockens = transPattern.split(algorithm);
+-
+- Set<String> elements = new HashSet<String>();
+- for (String transTocken : transTockens) {
+- if (transTocken == null || transTocken.length() == 0) {
+- continue;
+- }
+-
+- // PBEWith<digest>And<encryption>
+- // PBEWith<prf>And<encryption>
+- // OAEPWith<digest>And<mgf>Padding
+- // <digest>with<encryption>
+- // <digest>with<encryption>and<mgf>
+- Pattern pattern =
+- Pattern.compile("with|and", Pattern.CASE_INSENSITIVE);
+- String[] tokens = pattern.split(transTocken);
+-
+- for (String token : tokens) {
+- if (token == null || token.length() == 0) {
+- continue;
+- }
+-
+- elements.add(token);
+- }
+- }
+-
+- // In Java standard algorithm name specification, for different
+- // purpose, the SHA-1 and SHA-2 algorithm names are different. For
+- // example, for MessageDigest, the standard name is "SHA-256", while
+- // for Signature, the digest algorithm component is "SHA256" for
+- // signature algorithm "SHA256withRSA". So we need to check both
+- // "SHA-256" and "SHA256" to make the right constraint checking.
+-
+- // handle special name: SHA-1 and SHA1
+- if (elements.contains("SHA1") && !elements.contains("SHA-1")) {
+- elements.add("SHA-1");
+- }
+- if (elements.contains("SHA-1") && !elements.contains("SHA1")) {
+- elements.add("SHA1");
+- }
+-
+- // handle special name: SHA-224 and SHA224
+- if (elements.contains("SHA224") && !elements.contains("SHA-224")) {
+- elements.add("SHA-224");
+- }
+- if (elements.contains("SHA-224") && !elements.contains("SHA224")) {
+- elements.add("SHA224");
+- }
+-
+- // handle special name: SHA-256 and SHA256
+- if (elements.contains("SHA256") && !elements.contains("SHA-256")) {
+- elements.add("SHA-256");
+- }
+- if (elements.contains("SHA-256") && !elements.contains("SHA256")) {
+- elements.add("SHA256");
+- }
+-
+- // handle special name: SHA-384 and SHA384
+- if (elements.contains("SHA384") && !elements.contains("SHA-384")) {
+- elements.add("SHA-384");
+- }
+- if (elements.contains("SHA-384") && !elements.contains("SHA384")) {
+- elements.add("SHA384");
+- }
+-
+- // handle special name: SHA-512 and SHA512
+- if (elements.contains("SHA512") && !elements.contains("SHA-512")) {
+- elements.add("SHA-512");
+- }
+- if (elements.contains("SHA-512") && !elements.contains("SHA512")) {
+- elements.add("SHA512");
+- }
+-
+- return elements;
+- }
+-
+ // Check algorithm constraints
+ private boolean checkConstraints(Set<CryptoPrimitive> primitives,
+ String algorithm, Key key, AlgorithmParameters parameters) {
+@@ -263,43 +136,18 @@
+ return true;
+ }
+
+- // Get disabled algorithm constraints from the specified security property.
+- private static void loadDisabledAlgorithmsMap(
+- final String propertyName) {
+-
+- String property = AccessController.doPrivileged(
+- new PrivilegedAction<String>() {
+- public String run() {
+- return Security.getProperty(propertyName);
+- }
+- });
+-
+- String[] algorithmsInProperty = null;
+-
+- if (property != null && !property.isEmpty()) {
+-
+- // remove double quote marks from beginning/end of the property
+- if (property.charAt(0) == '"' &&
+- property.charAt(property.length() - 1) == '"') {
+- property = property.substring(1, property.length() - 1);
++ private static KeySizeConstraints getKeySizeConstraints(
++ String[] disabledAlgorithms, String propertyName) {
++ synchronized (keySizeConstraintsMap) {
++ if(!keySizeConstraintsMap.containsKey(propertyName)) {
++ // map the key constraints
++ KeySizeConstraints keySizeConstraints =
++ new KeySizeConstraints(disabledAlgorithms);
++ keySizeConstraintsMap.put(propertyName, keySizeConstraints);
+ }
+
+- algorithmsInProperty = property.split(",");
+- for (int i = 0; i < algorithmsInProperty.length; i++) {
+- algorithmsInProperty[i] = algorithmsInProperty[i].trim();
+- }
++ return keySizeConstraintsMap.get(propertyName);
+ }
+-
+- // map the disabled algorithms
+- if (algorithmsInProperty == null) {
+- algorithmsInProperty = new String[0];
+- }
+- disabledAlgorithmsMap.put(propertyName, algorithmsInProperty);
+-
+- // map the key constraints
+- KeySizeConstraints keySizeConstraints =
+- new KeySizeConstraints(algorithmsInProperty);
+- keySizeConstraintsMap.put(propertyName, keySizeConstraints);
+ }
+
+ /**
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ ./jdk/src/share/classes/sun/security/util/LegacyAlgorithmConstraints.java Sat Sep 05 06:34:07 2015 -0700
+@@ -0,0 +1,73 @@
++/*
++ * Copyright (c) 2015, 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. Oracle designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Oracle in the LICENSE file that accompanied this code.
++ *
++ * 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.
++ */
++
++package sun.security.util;
++
++import java.security.AlgorithmParameters;
++import java.security.CryptoPrimitive;
++import java.security.Key;
++import java.util.HashMap;
++import java.util.Map;
++import java.util.Set;
++import static sun.security.util.AbstractAlgorithmConstraints.getAlgorithms;
++
++/**
++ * Algorithm constraints for legacy algorithms.
++ */
++public class LegacyAlgorithmConstraints extends AbstractAlgorithmConstraints {
++
++ // the known security property, jdk.tls.legacyAlgorithms
++ public final static String PROPERTY_TLS_LEGACY_ALGS =
++ "jdk.tls.legacyAlgorithms";
++
++ private final static Map<String, String[]> legacyAlgorithmsMap =
++ new HashMap<>();
++
++ private final String[] legacyAlgorithms;
++
++ public LegacyAlgorithmConstraints(String propertyName,
++ AlgorithmDecomposer decomposer) {
++ super(decomposer);
++ legacyAlgorithms = getAlgorithms(legacyAlgorithmsMap, propertyName);
++ }
++
++ @Override
++ final public boolean permits(Set<CryptoPrimitive> primitives,
++ String algorithm, AlgorithmParameters parameters) {
++ return checkAlgorithm(legacyAlgorithms, algorithm, decomposer);
++ }
++
++ @Override
++ final public boolean permits(Set<CryptoPrimitive> primitives, Key key) {
++ return true;
++ }
++
++ @Override
++ final public boolean permits(Set<CryptoPrimitive> primitives,
++ String algorithm, Key key, AlgorithmParameters parameters) {
++ return checkAlgorithm(legacyAlgorithms, algorithm, decomposer);
++ }
++
++}
+--- ./jdk/src/share/classes/sun/security/validator/SimpleValidator.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/security/validator/SimpleValidator.java Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2002, 2015, 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
+@@ -141,8 +141,18 @@
+ // create distrusted certificates checker
+ UntrustedChecker untrustedChecker = new UntrustedChecker();
+
++ // check if anchor is untrusted
++ X509Certificate anchorCert = chain[chain.length - 1];
++ try {
++ untrustedChecker.check(anchorCert);
++ } catch (CertPathValidatorException cpve) {
++ throw new ValidatorException(
++ "Untrusted certificate: "+ anchorCert.getSubjectX500Principal(),
++ ValidatorException.T_UNTRUSTED_CERT, anchorCert, cpve);
++ }
++
+ // create default algorithm constraints checker
+- TrustAnchor anchor = new TrustAnchor(chain[chain.length - 1], null);
++ TrustAnchor anchor = new TrustAnchor(anchorCert, null);
+ AlgorithmChecker defaultAlgChecker = new AlgorithmChecker(anchor);
+
+ // create application level algorithm constraints checker
+--- ./jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider Sat Sep 05 06:34:07 2015 -0700
@@ -31,4 +31,5 @@
#[windows]sun.tools.attach.WindowsAttachProvider
#[linux]sun.tools.attach.LinuxAttachProvider
#[macosx]sun.tools.attach.BsdAttachProvider
+#[bsd]sun.tools.attach.BsdAttachProvider
#[aix]sun.tools.attach.AixAttachProvider
+--- ./jdk/src/share/lib/security/java.security-aix Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/lib/security/java.security-aix Sat Sep 05 06:34:07 2015 -0700
+@@ -509,4 +509,61 @@
+ #
+ # Example:
+ # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
+-jdk.tls.disabledAlgorithms=SSLv3, RC4
++jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768
++
++# Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
++# processing in JSSE implementation.
++#
++# In some environments, a certain algorithm may be undesirable but it
++# cannot be disabled because of its use in legacy applications. Legacy
++# algorithms may still be supported, but applications should not use them
++# as the security strength of legacy algorithms are usually not strong enough
++# in practice.
++#
++# During SSL/TLS security parameters negotiation, legacy algorithms will
++# not be negotiated unless there are no other candidates.
++#
++# The syntax of the disabled algorithm string is described as this Java
++# BNF-style:
++# LegacyAlgorithms:
++# " LegacyAlgorithm { , LegacyAlgorithm } "
++#
++# LegacyAlgorithm:
++# AlgorithmName (standard JSSE algorithm name)
++#
++# See the specification of security property "jdk.certpath.disabledAlgorithms"
++# for the syntax and description of the "AlgorithmName" notation.
++#
++# Per SSL/TLS specifications, cipher suites have the form:
++# SSL_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++# or
++# TLS_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++#
++# For example, the cipher suite TLS_RSA_WITH_AES_128_CBC_SHA uses RSA as the
++# key exchange algorithm, AES_128_CBC (128 bits AES cipher algorithm in CBC
++# mode) as the cipher (encryption) algorithm, and SHA-1 as the message digest
++# algorithm for HMAC.
++#
++# The LegacyAlgorithm can be one of the following standard algorithm names:
++# 1. JSSE cipher suite name, e.g., TLS_RSA_WITH_AES_128_CBC_SHA
++# 2. JSSE key exchange algorithm name, e.g., RSA
++# 3. JSSE cipher (encryption) algorithm name, e.g., AES_128_CBC
++# 4. JSSE message digest algorithm name, e.g., SHA
++#
++# See SSL/TLS specifications and "Java Cryptography Architecture Standard
++# Algorithm Name Documentation" for information about the algorithm names.
++#
++# Note: This property is currently used by Oracle's JSSE implementation.
++# It is not guaranteed to be examined and used by other implementations.
++# There is no guarantee the property will continue to exist or be of the
++# same syntax in future releases.
++#
++# Example:
++# jdk.tls.legacyAlgorithms=DH_anon, DES_CBC, SSL_RSA_WITH_RC4_128_MD5
++#
++jdk.tls.legacyAlgorithms= \
++ K_NULL, C_NULL, M_NULL, \
++ DHE_DSS_EXPORT, DHE_RSA_EXPORT, DH_anon_EXPORT, DH_DSS_EXPORT, \
++ DH_RSA_EXPORT, RSA_EXPORT, \
++ DH_anon, ECDH_anon, \
++ RC4_128, RC4_40, DES_CBC, DES40_CBC
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ ./jdk/src/share/lib/security/java.security-bsd Sat Jul 18 13:32:37 2015 -0700
++++ ./jdk/src/share/lib/security/java.security-bsd Sat Sep 05 06:34:07 2015 -0700
@@ -0,0 +1,498 @@
+#
+# This is the "master security properties file".
@@ -10035,8 +13242,268 @@
+#
+# Example:
+# jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048
---- ./jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/lib/security/java.security-linux Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/lib/security/java.security-linux Sat Sep 05 06:34:07 2015 -0700
+@@ -509,4 +509,61 @@
+ #
+ # Example:
+ # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
+-jdk.tls.disabledAlgorithms=SSLv3, RC4
++jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768
++
++# Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
++# processing in JSSE implementation.
++#
++# In some environments, a certain algorithm may be undesirable but it
++# cannot be disabled because of its use in legacy applications. Legacy
++# algorithms may still be supported, but applications should not use them
++# as the security strength of legacy algorithms are usually not strong enough
++# in practice.
++#
++# During SSL/TLS security parameters negotiation, legacy algorithms will
++# not be negotiated unless there are no other candidates.
++#
++# The syntax of the disabled algorithm string is described as this Java
++# BNF-style:
++# LegacyAlgorithms:
++# " LegacyAlgorithm { , LegacyAlgorithm } "
++#
++# LegacyAlgorithm:
++# AlgorithmName (standard JSSE algorithm name)
++#
++# See the specification of security property "jdk.certpath.disabledAlgorithms"
++# for the syntax and description of the "AlgorithmName" notation.
++#
++# Per SSL/TLS specifications, cipher suites have the form:
++# SSL_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++# or
++# TLS_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++#
++# For example, the cipher suite TLS_RSA_WITH_AES_128_CBC_SHA uses RSA as the
++# key exchange algorithm, AES_128_CBC (128 bits AES cipher algorithm in CBC
++# mode) as the cipher (encryption) algorithm, and SHA-1 as the message digest
++# algorithm for HMAC.
++#
++# The LegacyAlgorithm can be one of the following standard algorithm names:
++# 1. JSSE cipher suite name, e.g., TLS_RSA_WITH_AES_128_CBC_SHA
++# 2. JSSE key exchange algorithm name, e.g., RSA
++# 3. JSSE cipher (encryption) algorithm name, e.g., AES_128_CBC
++# 4. JSSE message digest algorithm name, e.g., SHA
++#
++# See SSL/TLS specifications and "Java Cryptography Architecture Standard
++# Algorithm Name Documentation" for information about the algorithm names.
++#
++# Note: This property is currently used by Oracle's JSSE implementation.
++# It is not guaranteed to be examined and used by other implementations.
++# There is no guarantee the property will continue to exist or be of the
++# same syntax in future releases.
++#
++# Example:
++# jdk.tls.legacyAlgorithms=DH_anon, DES_CBC, SSL_RSA_WITH_RC4_128_MD5
++#
++jdk.tls.legacyAlgorithms= \
++ K_NULL, C_NULL, M_NULL, \
++ DHE_DSS_EXPORT, DHE_RSA_EXPORT, DH_anon_EXPORT, DH_DSS_EXPORT, \
++ DH_RSA_EXPORT, RSA_EXPORT, \
++ DH_anon, ECDH_anon, \
++ RC4_128, RC4_40, DES_CBC, DES40_CBC
+--- ./jdk/src/share/lib/security/java.security-macosx Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/lib/security/java.security-macosx Sat Sep 05 06:34:07 2015 -0700
+@@ -512,4 +512,61 @@
+ #
+ # Example:
+ # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
+-jdk.tls.disabledAlgorithms=SSLv3, RC4
++jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768
++
++# Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
++# processing in JSSE implementation.
++#
++# In some environments, a certain algorithm may be undesirable but it
++# cannot be disabled because of its use in legacy applications. Legacy
++# algorithms may still be supported, but applications should not use them
++# as the security strength of legacy algorithms are usually not strong enough
++# in practice.
++#
++# During SSL/TLS security parameters negotiation, legacy algorithms will
++# not be negotiated unless there are no other candidates.
++#
++# The syntax of the disabled algorithm string is described as this Java
++# BNF-style:
++# LegacyAlgorithms:
++# " LegacyAlgorithm { , LegacyAlgorithm } "
++#
++# LegacyAlgorithm:
++# AlgorithmName (standard JSSE algorithm name)
++#
++# See the specification of security property "jdk.certpath.disabledAlgorithms"
++# for the syntax and description of the "AlgorithmName" notation.
++#
++# Per SSL/TLS specifications, cipher suites have the form:
++# SSL_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++# or
++# TLS_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++#
++# For example, the cipher suite TLS_RSA_WITH_AES_128_CBC_SHA uses RSA as the
++# key exchange algorithm, AES_128_CBC (128 bits AES cipher algorithm in CBC
++# mode) as the cipher (encryption) algorithm, and SHA-1 as the message digest
++# algorithm for HMAC.
++#
++# The LegacyAlgorithm can be one of the following standard algorithm names:
++# 1. JSSE cipher suite name, e.g., TLS_RSA_WITH_AES_128_CBC_SHA
++# 2. JSSE key exchange algorithm name, e.g., RSA
++# 3. JSSE cipher (encryption) algorithm name, e.g., AES_128_CBC
++# 4. JSSE message digest algorithm name, e.g., SHA
++#
++# See SSL/TLS specifications and "Java Cryptography Architecture Standard
++# Algorithm Name Documentation" for information about the algorithm names.
++#
++# Note: This property is currently used by Oracle's JSSE implementation.
++# It is not guaranteed to be examined and used by other implementations.
++# There is no guarantee the property will continue to exist or be of the
++# same syntax in future releases.
++#
++# Example:
++# jdk.tls.legacyAlgorithms=DH_anon, DES_CBC, SSL_RSA_WITH_RC4_128_MD5
++#
++jdk.tls.legacyAlgorithms= \
++ K_NULL, C_NULL, M_NULL, \
++ DHE_DSS_EXPORT, DHE_RSA_EXPORT, DH_anon_EXPORT, DH_DSS_EXPORT, \
++ DH_RSA_EXPORT, RSA_EXPORT, \
++ DH_anon, ECDH_anon, \
++ RC4_128, RC4_40, DES_CBC, DES40_CBC
+--- ./jdk/src/share/lib/security/java.security-solaris Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/lib/security/java.security-solaris Sat Sep 05 06:34:07 2015 -0700
+@@ -511,4 +511,61 @@
+ #
+ # Example:
+ # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
+-jdk.tls.disabledAlgorithms=SSLv3, RC4
++jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768
++
++# Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
++# processing in JSSE implementation.
++#
++# In some environments, a certain algorithm may be undesirable but it
++# cannot be disabled because of its use in legacy applications. Legacy
++# algorithms may still be supported, but applications should not use them
++# as the security strength of legacy algorithms are usually not strong enough
++# in practice.
++#
++# During SSL/TLS security parameters negotiation, legacy algorithms will
++# not be negotiated unless there are no other candidates.
++#
++# The syntax of the disabled algorithm string is described as this Java
++# BNF-style:
++# LegacyAlgorithms:
++# " LegacyAlgorithm { , LegacyAlgorithm } "
++#
++# LegacyAlgorithm:
++# AlgorithmName (standard JSSE algorithm name)
++#
++# See the specification of security property "jdk.certpath.disabledAlgorithms"
++# for the syntax and description of the "AlgorithmName" notation.
++#
++# Per SSL/TLS specifications, cipher suites have the form:
++# SSL_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++# or
++# TLS_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++#
++# For example, the cipher suite TLS_RSA_WITH_AES_128_CBC_SHA uses RSA as the
++# key exchange algorithm, AES_128_CBC (128 bits AES cipher algorithm in CBC
++# mode) as the cipher (encryption) algorithm, and SHA-1 as the message digest
++# algorithm for HMAC.
++#
++# The LegacyAlgorithm can be one of the following standard algorithm names:
++# 1. JSSE cipher suite name, e.g., TLS_RSA_WITH_AES_128_CBC_SHA
++# 2. JSSE key exchange algorithm name, e.g., RSA
++# 3. JSSE cipher (encryption) algorithm name, e.g., AES_128_CBC
++# 4. JSSE message digest algorithm name, e.g., SHA
++#
++# See SSL/TLS specifications and "Java Cryptography Architecture Standard
++# Algorithm Name Documentation" for information about the algorithm names.
++#
++# Note: This property is currently used by Oracle's JSSE implementation.
++# It is not guaranteed to be examined and used by other implementations.
++# There is no guarantee the property will continue to exist or be of the
++# same syntax in future releases.
++#
++# Example:
++# jdk.tls.legacyAlgorithms=DH_anon, DES_CBC, SSL_RSA_WITH_RC4_128_MD5
++#
++jdk.tls.legacyAlgorithms= \
++ K_NULL, C_NULL, M_NULL, \
++ DHE_DSS_EXPORT, DHE_RSA_EXPORT, DH_anon_EXPORT, DH_DSS_EXPORT, \
++ DH_RSA_EXPORT, RSA_EXPORT, \
++ DH_anon, ECDH_anon, \
++ RC4_128, RC4_40, DES_CBC, DES40_CBC
+--- ./jdk/src/share/lib/security/java.security-windows Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/lib/security/java.security-windows Sat Sep 05 06:34:07 2015 -0700
+@@ -512,4 +512,61 @@
+ #
+ # Example:
+ # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
+-jdk.tls.disabledAlgorithms=SSLv3, RC4
++jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768
++
++# Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
++# processing in JSSE implementation.
++#
++# In some environments, a certain algorithm may be undesirable but it
++# cannot be disabled because of its use in legacy applications. Legacy
++# algorithms may still be supported, but applications should not use them
++# as the security strength of legacy algorithms are usually not strong enough
++# in practice.
++#
++# During SSL/TLS security parameters negotiation, legacy algorithms will
++# not be negotiated unless there are no other candidates.
++#
++# The syntax of the disabled algorithm string is described as this Java
++# BNF-style:
++# LegacyAlgorithms:
++# " LegacyAlgorithm { , LegacyAlgorithm } "
++#
++# LegacyAlgorithm:
++# AlgorithmName (standard JSSE algorithm name)
++#
++# See the specification of security property "jdk.certpath.disabledAlgorithms"
++# for the syntax and description of the "AlgorithmName" notation.
++#
++# Per SSL/TLS specifications, cipher suites have the form:
++# SSL_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++# or
++# TLS_KeyExchangeAlg_WITH_CipherAlg_MacAlg
++#
++# For example, the cipher suite TLS_RSA_WITH_AES_128_CBC_SHA uses RSA as the
++# key exchange algorithm, AES_128_CBC (128 bits AES cipher algorithm in CBC
++# mode) as the cipher (encryption) algorithm, and SHA-1 as the message digest
++# algorithm for HMAC.
++#
++# The LegacyAlgorithm can be one of the following standard algorithm names:
++# 1. JSSE cipher suite name, e.g., TLS_RSA_WITH_AES_128_CBC_SHA
++# 2. JSSE key exchange algorithm name, e.g., RSA
++# 3. JSSE cipher (encryption) algorithm name, e.g., AES_128_CBC
++# 4. JSSE message digest algorithm name, e.g., SHA
++#
++# See SSL/TLS specifications and "Java Cryptography Architecture Standard
++# Algorithm Name Documentation" for information about the algorithm names.
++#
++# Note: This property is currently used by Oracle's JSSE implementation.
++# It is not guaranteed to be examined and used by other implementations.
++# There is no guarantee the property will continue to exist or be of the
++# same syntax in future releases.
++#
++# Example:
++# jdk.tls.legacyAlgorithms=DH_anon, DES_CBC, SSL_RSA_WITH_RC4_128_MD5
++#
++jdk.tls.legacyAlgorithms= \
++ K_NULL, C_NULL, M_NULL, \
++ DHE_DSS_EXPORT, DHE_RSA_EXPORT, DH_anon_EXPORT, DH_DSS_EXPORT, \
++ DH_RSA_EXPORT, RSA_EXPORT, \
++ DH_anon, ECDH_anon, \
++ RC4_128, RC4_40, DES_CBC, DES40_CBC
+--- ./jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp Sat Sep 05 06:34:07 2015 -0700
@@ -62,7 +62,7 @@
#endif // End of ZLIB
@@ -10046,8 +13513,8 @@
#define SWAP_BYTES(a) \
((((a) << 8) & 0xff00) | 0x00ff) & (((a) >> 8) | 0xff00)
#else
---- ./jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c Sat Sep 05 06:34:07 2015 -0700
@@ -121,7 +121,7 @@
}
@@ -10075,8 +13542,8 @@
#define MAP_NATIVE2LE16(a) (a)
#define MAP_NATIVE2BE16(a) MAP_SWAP16_impl(a)
#define MAP_NATIVE2LE32(a) (a)
---- ./jdk/src/share/native/com/sun/media/sound/Utilities.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/com/sun/media/sound/Utilities.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/com/sun/media/sound/Utilities.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/com/sun/media/sound/Utilities.c Sat Sep 05 06:34:07 2015 -0700
@@ -28,7 +28,7 @@
@@ -10086,8 +13553,8 @@
return 0;
#else
return 1;
---- ./jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h Sat Sep 05 06:34:07 2015 -0700
@@ -40,7 +40,7 @@
#endif
#endif
@@ -10097,8 +13564,8 @@
#define __HI(x) *(1+(int*)&x)
#define __LO(x) *(int*)&x
#define __HIp(x) *(1+(int*)x)
---- ./jdk/src/share/native/sun/awt/image/awt_parseImage.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/image/awt_parseImage.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/image/awt_parseImage.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/image/awt_parseImage.c Sat Sep 05 06:34:07 2015 -0700
@@ -624,7 +624,7 @@
switch(type) {
case java_awt_image_BufferedImage_TYPE_INT_ARGB:
@@ -10126,8 +13593,8 @@
colorOrder[0] = 2;
colorOrder[1] = 1;
colorOrder[2] = 0;
---- ./jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c Sat Sep 05 06:34:07 2015 -0700
@@ -1176,7 +1176,7 @@
#define NLUT 8
@@ -10137,8 +13604,8 @@
#define INDEXES { 3, 2, 1, 0, 7, 6, 5, 4 }
#else
#define INDEXES { 0, 1, 2, 3, 4, 5, 6, 7 }
---- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c Sat Sep 05 06:34:07 2015 -0700
@@ -86,7 +86,7 @@
#endif /* MLIB_USE_FTOI_CLAMPING */
@@ -10178,8 +13645,8 @@
#endif /* _NO_LONGLONG */
---- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c Sat Sep 05 06:34:07 2015 -0700
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10219,8 +13686,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c Sat Sep 05 06:34:07 2015 -0700
@@ -94,7 +94,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10260,8 +13727,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c Sat Sep 05 06:34:07 2015 -0700
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10301,8 +13768,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c Sat Sep 05 06:34:07 2015 -0700
@@ -95,7 +95,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10342,8 +13809,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c Sat Sep 05 06:34:07 2015 -0700
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10383,8 +13850,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c Sat Sep 05 06:34:07 2015 -0700
@@ -94,7 +94,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -10424,8 +13891,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c Sat Sep 05 06:34:07 2015 -0700
@@ -95,7 +95,7 @@
dst = dp[0];
if (ld_offset + size < 32) {
@@ -10645,8 +14112,8 @@
}
#else /* _LONGLONG */
---- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c Sat Sep 05 06:34:07 2015 -0700
@@ -168,7 +168,7 @@
}
@@ -10927,8 +14394,8 @@
dp[12] = t0;
dp[13] = t1;
dp[14] = t2;
---- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c Sat Sep 05 06:34:07 2015 -0700
@@ -88,7 +88,7 @@
} d64_2_f32;
@@ -11080,8 +14547,8 @@
((mlib_u32*)lh)[0] = l; ((mlib_u32*)lh)[1] = l;
((mlib_u32*)lh)[2] = l; ((mlib_u32*)lh)[3] = h;
---- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c Sat Sep 05 06:34:07 2015 -0700
@@ -30,7 +30,7 @@
typedef union {
mlib_d64 db;
@@ -11091,8 +14558,8 @@
mlib_s32 int1, int0;
#else
mlib_s32 int0, int1;
---- ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c Sat Sep 05 06:34:07 2015 -0700
@@ -275,11 +275,11 @@
for (i = 0; j <= (b_size - 4); j += 4, i++) {
src0 = src1;
@@ -11191,8 +14658,8 @@
s0 = s1;
dp += SIZE;
sp += SIZE;
---- ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c Sat Sep 05 06:34:07 2015 -0700
@@ -120,7 +120,7 @@
} \
}
@@ -12425,8 +15892,8 @@
dp[12] = t0;
dp[13] = t1;
dp[14] = t2;
---- ./jdk/src/share/native/sun/awt/medialib/mlib_image.h Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_image.h Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_image.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_image.h Sat Sep 05 06:34:07 2015 -0700
@@ -27,9 +27,6 @@
#ifndef MLIB_IMAGE_H
#define MLIB_IMAGE_H
@@ -12437,8 +15904,8 @@
#include <mlib_types.h>
#include <mlib_status.h>
#include <mlib_sys.h>
---- ./jdk/src/share/native/sun/awt/medialib/mlib_sys.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/medialib/mlib_sys.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/awt/medialib/mlib_sys.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/awt/medialib/mlib_sys.c Sat Sep 05 06:34:07 2015 -0700
@@ -29,7 +29,7 @@
#ifdef MACOSX
#include <unistd.h>
@@ -12458,34 +15925,228 @@
#else
return (void *) memalign(8, size);
#endif /* _MSC_VER */
---- ./jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c Sat Jul 18 13:32:37 2015 -0700
-@@ -310,7 +310,11 @@
- free(pBitmapBits);
- free(pOldBitmapBits);
-
-+#if (GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && (GIFLIB_MINOR >= 1))
-+ DGifCloseFile(gif, NULL);
-+#else
- DGifCloseFile(gif);
-+#endif
+--- ./jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -53,6 +53,7 @@
+ Offset alternateSetTableOffset = SWAPW(alternateSetTableOffsetArray[coverageIndex]);
+ const LEReferenceTo<AlternateSetTable> alternateSetTable(base, success,
+ (const AlternateSetTable *) ((char *) this + alternateSetTableOffset));
++ if (!LE_SUCCESS(success)) return 0;
+ TTGlyphID alternate = SWAPW(alternateSetTable->alternateArray[0]);
+
+ if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate), success)) {
+--- ./jdk/src/share/native/sun/font/layout/AnchorTables.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/AnchorTables.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -44,21 +44,27 @@
+ case 1:
+ {
+ LEReferenceTo<Format1AnchorTable> f1(base, success);
+- f1->getAnchor(f1, fontInstance, anchor, success);
++ if (LE_SUCCESS(success)) {
++ f1->getAnchor(f1, fontInstance, anchor, success);
++ }
+ break;
+ }
- return 1;
- }
-@@ -318,7 +322,11 @@
- int
- SplashDecodeGifStream(Splash * splash, SplashStream * stream)
+ case 2:
+ {
+ LEReferenceTo<Format2AnchorTable> f2(base, success);
+- f2->getAnchor(f2, glyphID, fontInstance, anchor, success);
++ if (LE_SUCCESS(success)) {
++ f2->getAnchor(f2, glyphID, fontInstance, anchor, success);
++ }
+ break;
+ }
+
+ case 3:
+ {
+ LEReferenceTo<Format3AnchorTable> f3(base, success);
+- f3->getAnchor(f3, fontInstance, anchor, success);
++ if (LE_SUCCESS(success)) {
++ f3->getAnchor(f3, fontInstance, anchor, success);
++ }
+ break;
+ }
+
+@@ -66,7 +72,9 @@
+ {
+ // unknown format: just use x, y coordinate, like format 1...
+ LEReferenceTo<Format1AnchorTable> f1(base, success);
+- f1->getAnchor(f1, fontInstance, anchor, success);
++ if (LE_SUCCESS(success)) {
++ f1->getAnchor(f1, fontInstance, anchor, success);
++ }
+ break;
+ }
+ }
+@@ -112,16 +120,18 @@
+
+ if (dtxOffset != 0) {
+ LEReferenceTo<DeviceTable> dt(base, success, dtxOffset);
+- le_int16 adjx = dt->getAdjustment(dt, (le_int16) fontInstance->getXPixelsPerEm(), success);
+-
+- pixels.fX += adjx;
++ if (LE_SUCCESS(success)) {
++ le_int16 adjx = dt->getAdjustment(dt, (le_int16) fontInstance->getXPixelsPerEm(), success);
++ pixels.fX += adjx;
++ }
+ }
+
+ if (dtyOffset != 0) {
+ LEReferenceTo<DeviceTable> dt(base, success, dtyOffset);
+- le_int16 adjy = dt->getAdjustment(dt, (le_int16) fontInstance->getYPixelsPerEm(), success);
+-
+- pixels.fY += adjy;
++ if (LE_SUCCESS(success)) {
++ le_int16 adjy = dt->getAdjustment(dt, (le_int16) fontInstance->getYPixelsPerEm(), success);
++ pixels.fY += adjy;
++ }
+ }
+
+ fontInstance->pixelsToUnits(pixels, anchor);
+--- ./jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -107,6 +107,10 @@
+
+ le_int16 markIndex = SWAPW(entry->markedInsertionListIndex);
+ if (markIndex > 0) {
++ if (markGlyph < 0 || markGlyph >= glyphStorage.getGlyphCount()) {
++ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
++ return 0;
++ }
+ le_int16 count = (flags & cgiMarkedInsertCountMask) >> 5;
+ le_bool isKashidaLike = (flags & cgiMarkedIsKashidaLike);
+ le_bool isBefore = (flags & cgiMarkInsertBefore);
+@@ -115,6 +119,10 @@
+
+ le_int16 currIndex = SWAPW(entry->currentInsertionListIndex);
+ if (currIndex > 0) {
++ if (currGlyph < 0 || currGlyph >= glyphStorage.getGlyphCount()) {
++ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
++ return 0;
++ }
+ le_int16 count = flags & cgiCurrentInsertCountMask;
+ le_bool isKashidaLike = (flags & cgiCurrentIsKashidaLike);
+ le_bool isBefore = (flags & cgiCurrentInsertBefore);
+--- ./jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -76,6 +76,10 @@
+ WordOffset currOffset = SWAPW(entry->currOffset);
+
+ if (markOffset != 0 && LE_SUCCESS(success)) {
++ if (markGlyph < 0 || markGlyph >= glyphStorage.getGlyphCount()) {
++ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
++ return 0;
++ }
+ LEGlyphID mGlyph = glyphStorage[markGlyph];
+ TTGlyphID newGlyph = SWAPW(int16Table.getObject(markOffset + LE_GET_GLYPH(mGlyph), success)); // whew.
+
+@@ -83,6 +87,10 @@
+ }
+
+ if (currOffset != 0) {
++ if (currGlyph < 0 || currGlyph >= glyphStorage.getGlyphCount()) {
++ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
++ return 0;
++ }
+ LEGlyphID thisGlyph = glyphStorage[currGlyph];
+ TTGlyphID newGlyph = SWAPW(int16Table.getObject(currOffset + LE_GET_GLYPH(thisGlyph), success)); // whew.
+
+--- ./jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -70,17 +70,25 @@
+ if(LE_FAILURE(success)) return 0;
+ le_uint16 newState = SWAPW(entry->newStateIndex);
+ le_uint16 flags = SWAPW(entry->flags);
+- le_int16 markIndex = SWAPW(entry->markIndex);
+- le_int16 currIndex = SWAPW(entry->currIndex);
++ le_uint16 markIndex = SWAPW(entry->markIndex);
++ le_uint16 currIndex = SWAPW(entry->currIndex);
+
+- if (markIndex != -1) {
++ if (markIndex != 0x0FFFF) {
++ if (markGlyph < 0 || markGlyph >= glyphStorage.getGlyphCount()) {
++ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
++ return 0;
++ }
+ le_uint32 offset = SWAPL(perGlyphTable(markIndex, success));
+ LEGlyphID mGlyph = glyphStorage[markGlyph];
+ TTGlyphID newGlyph = lookup(offset, mGlyph, success);
+ glyphStorage[markGlyph] = LE_SET_GLYPH(mGlyph, newGlyph);
+ }
+
+- if (currIndex != -1) {
++ if (currIndex != 0x0FFFF) {
++ if (currGlyph < 0 || currGlyph >= glyphStorage.getGlyphCount()) {
++ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
++ return 0;
++ }
+ le_uint32 offset = SWAPL(perGlyphTable(currIndex, success));
+ LEGlyphID thisGlyph = glyphStorage[currGlyph];
+ TTGlyphID newGlyph = lookup(offset, thisGlyph, success);
+--- ./jdk/src/share/native/sun/font/layout/Features.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/Features.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -41,7 +41,7 @@
+ LEReferenceTo<FeatureTable> FeatureListTable::getFeatureTable(const LETableReference &base, le_uint16 featureIndex, LETag *featureTag, LEErrorCode &success) const
{
-+#if GIFLIB_MAJOR >= 5
-+ GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc, NULL);
-+#else
- GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc);
-+#endif
+ LEReferenceToArrayOf<FeatureRecord>
+- featureRecordArrayRef(base, success, featureRecordArray, featureIndex);
++ featureRecordArrayRef(base, success, featureRecordArray, featureIndex+1);
- if (!gif)
- return 0;
---- ./jdk/src/share/native/sun/font/layout/LEStandalone.h Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/font/layout/LEStandalone.h Sat Jul 18 13:32:37 2015 -0700
+ if (featureIndex >= SWAPW(featureCount) || LE_FAILURE(success)) {
+ return LEReferenceTo<FeatureTable>();
+--- ./jdk/src/share/native/sun/font/layout/GXLayoutEngine.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/GXLayoutEngine.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -73,7 +73,7 @@
+
+ fMorphTable->process(fMorphTable, glyphStorage, success);
+
+- return count;
++ return glyphStorage.getGlyphCount();
+ }
+
+ // apply positional tables
+--- ./jdk/src/share/native/sun/font/layout/GXLayoutEngine2.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/GXLayoutEngine2.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -69,7 +69,7 @@
+ }
+
+ fMorphTable->process(fMorphTable, glyphStorage, fTypoFlags, success);
+- return count;
++ return glyphStorage.getGlyphCount();
+ }
+
+ // apply positional tables
+--- ./jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -70,6 +70,11 @@
+ ByteOffset newState = SWAPW(entry->newStateOffset);
+ IndicRearrangementFlags flags = (IndicRearrangementFlags) SWAPW(entry->flags);
+
++ if (currGlyph < 0 || currGlyph >= glyphStorage.getGlyphCount()) {
++ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
++ return 0;
++ }
++
+ if (flags & irfMarkFirst) {
+ firstGlyph = currGlyph;
+ }
+--- ./jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -68,6 +68,11 @@
+ le_uint16 newState = SWAPW(entry->newStateIndex); // index to the new state
+ IndicRearrangementFlags flags = (IndicRearrangementFlags) SWAPW(entry->flags);
+
++ if (currGlyph < 0 || currGlyph >= glyphStorage.getGlyphCount()) {
++ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
++ return 0;
++ }
++
+ if (flags & irfMarkFirst) {
+ firstGlyph = currGlyph;
+ }
+--- ./jdk/src/share/native/sun/font/layout/LEStandalone.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/LEStandalone.h Sat Sep 05 06:34:07 2015 -0700
@@ -136,7 +136,7 @@
#define U_CAPI extern "C"
@@ -12495,8 +16156,310 @@
#define U_IS_BIG_ENDIAN 0
#endif
#endif
---- ./jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/font/layout/LETableReference.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/LETableReference.h Sat Sep 05 06:34:07 2015 -0700
+@@ -188,7 +188,7 @@
+
+ void addOffset(size_t offset, LEErrorCode &success) {
+ if(hasBounds()) {
+- if(offset > fLength) {
++ if(offset >= fLength) {
+ LE_DEBUG_TR("addOffset off end");
+ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+ return;
+@@ -203,7 +203,7 @@
+ if(atPtr==NULL) return 0;
+ if(LE_FAILURE(success)) return LE_UINTPTR_MAX;
+ if((atPtr < fStart) ||
+- (hasBounds() && (atPtr > fStart+fLength))) {
++ (hasBounds() && (atPtr >= fStart+fLength))) {
+ LE_DEBUG_TR3("ptrToOffset args out of range: %p", atPtr, 0);
+ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+ return LE_UINTPTR_MAX;
+@@ -240,6 +240,18 @@
+ }
+
+ /**
++ * Throw an error if size*count overflows
++ */
++ size_t verifyLength(size_t offset, size_t size, le_uint32 count, LEErrorCode &success) {
++ if(count!=0 && size>LE_UINT32_MAX/count) {
++ LE_DEBUG_TR3("verifyLength failed size=%u, count=%u", size, count);
++ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
++ return 0;
++ }
++ return verifyLength(offset, size*count, success);
++ }
++
++ /**
+ * Change parent link to another
+ */
+ LETableReference &reparent(const LETableReference &base) {
+@@ -424,7 +436,7 @@
+ if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length
+ fCount = getLength()/LETableVarSizer<T>::getSize(); // fit to max size
+ }
+- LETableReference::verifyLength(0, LETableVarSizer<T>::getSize()*fCount, success);
++ LETableReference::verifyLength(0, LETableVarSizer<T>::getSize(), fCount, success);
+ }
+ if(LE_FAILURE(success)) {
+ fCount=0;
+@@ -439,7 +451,7 @@
+ if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length
+ fCount = getLength()/LETableVarSizer<T>::getSize(); // fit to max size
+ }
+- LETableReference::verifyLength(0, LETableVarSizer<T>::getSize()*fCount, success);
++ LETableReference::verifyLength(0, LETableVarSizer<T>::getSize(), fCount, success);
+ }
+ if(LE_FAILURE(success)) clear();
+ }
+@@ -450,7 +462,7 @@
+ if(fCount == LE_UNBOUNDED_ARRAY) { // not a known length
+ fCount = getLength()/LETableVarSizer<T>::getSize(); // fit to max size
+ }
+- LETableReference::verifyLength(0, LETableVarSizer<T>::getSize()*fCount, success);
++ LETableReference::verifyLength(0, LETableVarSizer<T>::getSize(), fCount, success);
+ }
+ if(LE_FAILURE(success)) clear();
+ }
+--- ./jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -73,7 +73,7 @@
+ const LigatureSubstitutionStateEntry *entry = entryTable.getAlias(index, success);
+
+ ByteOffset newState = SWAPW(entry->newStateOffset);
+- le_int16 flags = SWAPW(entry->flags);
++ le_uint16 flags = SWAPW(entry->flags);
+
+ if (flags & lsfSetComponent) {
+ if (++m >= nComponents) {
+@@ -92,15 +92,18 @@
+ if (actionOffset != 0) {
+ LEReferenceTo<LigatureActionEntry> ap(stHeader, success, actionOffset);
+ LigatureActionEntry action;
+- le_int32 offset, i = 0;
++ le_int32 offset, i = 0, j = 0;
+ le_int32 stack[nComponents];
+ le_int16 mm = -1;
+
+ do {
+ le_uint32 componentGlyph = componentStack[m--];
+
++ if (j++ > 0) {
++ ap.addObject(success);
++ }
++
+ action = SWAPL(*ap.getAlias());
+- ap.addObject(success); // ap++
+
+ if (m < 0) {
+ m = nComponents - 1;
+--- ./jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -98,7 +98,7 @@
+ ap.addObject(ligActionIndex, success);
+ LEReferenceToArrayOf<TTGlyphID> ligatureTable(stHeader, success, ligatureOffset, LE_UNBOUNDED_ARRAY);
+ LigatureActionEntry action;
+- le_int32 offset, i = 0;
++ le_int32 offset, i = 0, j = 0;
+ le_int32 stack[nComponents];
+ le_int16 mm = -1;
+
+@@ -111,6 +111,10 @@
+ do {
+ le_uint32 componentGlyph = componentStack[m--]; // pop off
+
++ if (j++ > 0) {
++ ap.addObject(success);
++ }
++
+ action = SWAPL(*ap.getAlias());
+
+ if (m < 0) {
+@@ -144,7 +148,6 @@
+ LE_DEBUG_BAD_FONT("m<0")
+ }
+ #endif
+- ap.addObject(success);
+ } while (LE_SUCCESS(success) && !(action & lafLast) && (m>=0) ); // stop if last bit is set, or if run out of items
+
+ while (mm >= 0) {
+--- ./jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -97,13 +97,9 @@
+
+ if( LE_FAILURE(success) ) { return 0; }
+ Offset anchorTableOffset = SWAPW(baseRecord->baseAnchorTableOffsetArray[markClass]);
+- if (anchorTableOffset <= 0) {
+- // this means the table is mal-formed...
+- glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition());
+- return 0;
+- }
++ LEReferenceTo<AnchorTable> anchorTable(baseArray, success, anchorTableOffset);
++ if( LE_FAILURE(success) ) { return 0; }
+
+- LEReferenceTo<AnchorTable> anchorTable(baseArray, success, anchorTableOffset);
+ LEPoint baseAnchor, markAdvance, pixels;
+
+
+--- ./jdk/src/share/native/sun/font/layout/MorphTables.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/MorphTables.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -52,8 +52,15 @@
+ le_uint32 chain;
+
+ for (chain = 0; LE_SUCCESS(success) && (chain < chainCount); chain += 1) {
++ if (chain > 0) {
++ le_uint32 chainLength = SWAPL(chainHeader->chainLength);
++ if (chainLength & 0x03) { // incorrect alignment for 32 bit tables
++ success = LE_MEMORY_ALLOCATION_ERROR; // as good a choice as any
++ return;
++ }
++ chainHeader.addOffset(chainLength, success);
++ }
+ FeatureFlags defaultFlags = SWAPL(chainHeader->defaultFlags);
+- le_uint32 chainLength = SWAPL(chainHeader->chainLength);
+ le_int16 nFeatureEntries = SWAPW(chainHeader->nFeatureEntries);
+ le_int16 nSubtables = SWAPW(chainHeader->nSubtables);
+ LEReferenceTo<MorphSubtableHeader> subtableHeader =
+@@ -61,7 +68,14 @@
+ le_int16 subtable;
+
+ for (subtable = 0; LE_SUCCESS(success) && (subtable < nSubtables); subtable += 1) {
+- le_int16 length = SWAPW(subtableHeader->length);
++ if (subtable > 0) {
++ le_int16 length = SWAPW(subtableHeader->length);
++ if (length & 0x03) { // incorrect alignment for 32 bit tables
++ success = LE_MEMORY_ALLOCATION_ERROR; // as good a choice as any
++ return;
++ }
++ subtableHeader.addOffset(length, success);
++ }
+ SubtableCoverage coverage = SWAPW(subtableHeader->coverage);
+ FeatureFlags subtableFeatures = SWAPL(subtableHeader->subtableFeatures);
+
+@@ -69,10 +83,7 @@
+ if ((coverage & scfVertical) == 0 && (subtableFeatures & defaultFlags) != 0 && LE_SUCCESS(success)) {
+ subtableHeader->process(subtableHeader, glyphStorage, success);
+ }
+-
+- subtableHeader.addOffset(length, success);
+ }
+- chainHeader.addOffset(chainLength, success);
+ }
+ }
+
+--- ./jdk/src/share/native/sun/font/layout/MorphTables2.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/MorphTables2.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -59,6 +59,10 @@
+ for (chain = 0; LE_SUCCESS(success) && (chain < chainCount); chain++) {
+ if (chain>0) {
+ le_uint32 chainLength = SWAPL(chainHeader->chainLength);
++ if (chainLength & 0x03) { // incorrect alignment for 32 bit tables
++ success = LE_MEMORY_ALLOCATION_ERROR; // as good a choice as any
++ return;
++ }
+ chainHeader.addOffset(chainLength, success); // Don't increment the first time
+ }
+ FeatureFlags flag = SWAPL(chainHeader->defaultFlags);
+@@ -188,6 +192,10 @@
+ for (subtable = 0; LE_SUCCESS(success) && subtable < nSubtables; subtable++) {
+ if(subtable>0) {
+ le_uint32 length = SWAPL(subtableHeader->length);
++ if (length & 0x03) { // incorrect alignment for 32 bit tables
++ success = LE_MEMORY_ALLOCATION_ERROR; // as good a choice as any
++ return;
++ }
+ subtableHeader.addOffset(length, success); // Don't addOffset for the last entry.
+ }
+ le_uint32 coverage = SWAPL(subtableHeader->coverage);
+--- ./jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -179,12 +179,13 @@
+ LEReferenceTo<PairValueRecord> record(records);
+
+ for(le_int32 r = 0; r < recordCount; r += 1) {
++ if (r > 0) {
++ record.addOffset(recordSize, success);
++ }
+ if(LE_FAILURE(success)) return LEReferenceTo<PairValueRecord>();
+ if (SWAPW(record->secondGlyph) == glyphID) {
+ return record;
+ }
+-
+- record.addOffset(recordSize, success);
+ }
+ #else
+ #error dead code - not updated.
+--- ./jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -94,7 +94,9 @@
+ return 0;
+ }
+
+- if (coverageIndex >= 0) {
++ LEReferenceToArrayOf<TTGlyphID> substituteArrayRef(base, success, substituteArray, SWAPW(glyphCount));
++
++ if (coverageIndex >= 0 && LE_SUCCESS(success) && coverageIndex < substituteArrayRef.getCount()) {
+ TTGlyphID substitute = SWAPW(substituteArray[coverageIndex]);
+
+ if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute), success)) {
+--- ./jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -85,6 +85,7 @@
+ if (currGlyph == glyphCount) {
+ // XXX: How do we handle EOT vs. EOL?
+ classCode = classCodeEOT;
++ break;
+ } else {
+ TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(glyphStorage[currGlyph]);
+
+--- ./jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp Sat Sep 05 06:34:07 2015 -0700
+@@ -103,6 +103,7 @@
+ if (currGlyph == glyphCount || currGlyph == -1) {
+ // XXX: How do we handle EOT vs. EOL?
+ classCode = classCodeEOT;
++ break;
+ } else {
+ LEGlyphID gid = glyphStorage[currGlyph];
+ TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid);
+@@ -134,6 +135,7 @@
+ if (currGlyph == glyphCount || currGlyph == -1) {
+ // XXX: How do we handle EOT vs. EOL?
+ classCode = classCodeEOT;
++ break;
+ } else {
+ LEGlyphID gid = glyphStorage[currGlyph];
+ TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid);
+@@ -171,6 +173,7 @@
+ if (currGlyph == glyphCount || currGlyph == -1) {
+ // XXX: How do we handle EOT vs. EOL?
+ classCode = classCodeEOT;
++ break;
+ } else if(currGlyph > glyphCount) {
+ // note if > glyphCount, we've run off the end (bad font)
+ currGlyph = glyphCount;
+@@ -211,6 +214,7 @@
+ if (currGlyph == glyphCount || currGlyph == -1) {
+ // XXX: How do we handle EOT vs. EOL?
+ classCode = classCodeEOT;
++ break;
+ } else {
+ TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(glyphStorage[currGlyph]);
+ if (glyphCode == 0xFFFF) {
+--- ./jdk/src/share/native/sun/font/layout/StateTables.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/font/layout/StateTables.h Sat Sep 05 06:34:07 2015 -0700
+@@ -126,7 +126,7 @@
+ struct StateEntry
+ {
+ ByteOffset newStateOffset;
+- le_int16 flags;
++ le_uint16 flags;
+ };
+
+ typedef le_uint16 EntryTableIndex2;
+--- ./jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c Sat Sep 05 06:34:07 2015 -0700
@@ -182,7 +182,7 @@
return 0L;
}
@@ -12506,8 +16469,8 @@
/* Reversing data packed into int for LE archs */
if (isInIntPacked) {
inFormatter ^= DOSWAP_SH(1);
---- ./jdk/src/share/native/sun/management/DiagnosticCommandImpl.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/share/native/sun/management/DiagnosticCommandImpl.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/management/DiagnosticCommandImpl.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/management/DiagnosticCommandImpl.c Sat Sep 05 06:34:07 2015 -0700
@@ -27,6 +27,7 @@
#include <jni.h>
#include "management.h"
@@ -12516,8 +16479,100 @@
JNIEXPORT void JNICALL Java_sun_management_DiagnosticCommandImpl_setNotificationEnabled
(JNIEnv *env, jobject dummy, jboolean enabled) {
---- ./jdk/src/solaris/back/util_md.h Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/back/util_md.h Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/share/native/sun/security/ec/impl/ec.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/security/ec/impl/ec.c Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * This library is free software; you can redistribute it and/or
+@@ -34,6 +34,7 @@
+ * Dr Vipul Gupta <vipul.gupta@sun.com> and
+ * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
+ *
++ * Last Modified Date from the Original Code: April 2015
+ *********************************************************************** */
+
+ #include "mplogic.h"
+@@ -585,6 +586,10 @@
+ return SECFailure;
+ }
+
++ if (EC_ValidatePublicKey(ecParams, publicValue, kmflag) != SECSuccess) {
++ return SECFailure;
++ }
++
+ memset(derivedSecret, 0, sizeof *derivedSecret);
+ len = (ecParams->fieldID.size + 7) >> 3;
+ pointQ.len = 2*len + 1;
+--- ./jdk/src/share/native/sun/security/ec/impl/ecc_impl.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/security/ec/impl/ecc_impl.h Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * This library is free software; you can redistribute it and/or
+@@ -34,6 +34,7 @@
+ * Dr Vipul Gupta <vipul.gupta@sun.com> and
+ * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
+ *
++ * Last Modified Date from the Original Code: November 2013
+ *********************************************************************** */
+
+ #ifndef _ECC_IMPL_H
+--- ./jdk/src/share/native/sun/security/ec/impl/ecdecode.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/security/ec/impl/ecdecode.c Sat Sep 05 06:34:07 2015 -0700
+@@ -34,6 +34,7 @@
+ * Dr Vipul Gupta <vipul.gupta@sun.com> and
+ * Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
+ *
++ * Last Modified Date from the Original Code: March 2012
+ *********************************************************************** */
+
+ #include <sys/types.h>
+--- ./jdk/src/share/native/sun/security/ec/impl/mpi.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/security/ec/impl/mpi.c Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * This library is free software; you can redistribute it and/or
+@@ -34,6 +34,7 @@
+ * Netscape Communications Corporation
+ * Douglas Stebila <douglas@stebila.ca> of Sun Laboratories.
+ *
++ * Last Modified Date from the Original Code: June 2014
+ *********************************************************************** */
+
+ /* Arbitrary precision integer arithmetic library */
+--- ./jdk/src/share/native/sun/security/ec/impl/oid.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/security/ec/impl/oid.c Sat Sep 05 06:34:07 2015 -0700
+@@ -33,6 +33,7 @@
+ * Contributor(s):
+ * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
+ *
++ * Last Modified Date from the Original Code: March 2012
+ *********************************************************************** */
+
+ #include <sys/types.h>
+--- ./jdk/src/share/native/sun/security/ec/impl/secitem.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/share/native/sun/security/ec/impl/secitem.c Sat Sep 05 06:34:07 2015 -0700
+@@ -32,6 +32,7 @@
+ *
+ * Contributor(s):
+ *
++ * Last Modified Date from the Original Code: March 2012
+ *********************************************************************** */
+
+ /*
+--- ./jdk/src/solaris/back/util_md.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/back/util_md.h Sat Sep 05 06:34:07 2015 -0700
@@ -51,7 +51,7 @@
/* On little endian machines, convert java big endian numbers. */
@@ -12527,8 +16582,8 @@
#define HOST_TO_JAVA_CHAR(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff)))
#define HOST_TO_JAVA_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff)))
---- ./jdk/src/solaris/bin/ergo_i586.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/bin/ergo_i586.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/bin/ergo_i586.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/bin/ergo_i586.c Sat Sep 05 06:34:07 2015 -0700
@@ -106,7 +106,7 @@
#endif /* __solaris__ */
@@ -12547,8 +16602,15 @@
/*
* Routines shared by solaris-i586 and linux-i586.
---- ./jdk/src/solaris/bin/java_md_solinux.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/bin/java_md_solinux.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/bin/java_md_solinux.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/bin/java_md_solinux.c Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1998, 2015, 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
@@ -35,6 +35,9 @@
#include <sys/stat.h>
#include <unistd.h>
@@ -12592,7 +16654,49 @@
/*
* Prevent recursions. Since LD_LIBRARY_PATH is the one which will be set by
-@@ -929,8 +938,9 @@
+@@ -613,13 +622,14 @@
+ /* runpath contains current effective LD_LIBRARY_PATH setting */
+
+ jvmpath = JLI_StringDup(jvmpath);
+- new_runpath = JLI_MemAlloc(((runpath != NULL) ? JLI_StrLen(runpath) : 0) +
++ size_t new_runpath_size = ((runpath != NULL) ? JLI_StrLen(runpath) : 0) +
+ 2 * JLI_StrLen(jrepath) + 2 * JLI_StrLen(arch) +
+ #ifdef AIX
+ /* On AIX we additionally need 'jli' in the path because ld doesn't support $ORIGIN. */
+ JLI_StrLen(jrepath) + JLI_StrLen(arch) + JLI_StrLen("/lib//jli:") +
+ #endif
+- JLI_StrLen(jvmpath) + 52);
++ JLI_StrLen(jvmpath) + 52;
++ new_runpath = JLI_MemAlloc(new_runpath_size);
+ newpath = new_runpath + JLI_StrLen(LD_LIBRARY_PATH "=");
+
+
+@@ -679,6 +689,11 @@
+ * loop of execv() because we test for the prefix, above.
+ */
+ if (runpath != 0) {
++ /* ensure storage for runpath + colon + NULL */
++ if ((JLI_StrLen(runpath) + 1 + 1) > new_runpath_size) {
++ JLI_ReportErrorMessageSys(JRE_ERROR11);
++ exit(1);
++ }
+ JLI_StrCat(new_runpath, ":");
+ JLI_StrCat(new_runpath, runpath);
+ }
+@@ -811,7 +826,11 @@
+ JLI_TraceLauncher("JRE path is %s\n", path);
+ return JNI_TRUE;
+ }
+-
++ /* ensure storage for path + /jre + NULL */
++ if ((JLI_StrLen(path) + 4 + 1) > pathsize) {
++ JLI_TraceLauncher("Insufficient space to store JRE path\n");
++ return JNI_FALSE;
++ }
+ /* Does the app ship a private JRE in <apphome>/jre directory? */
+ JLI_Snprintf(libjava, sizeof(libjava), "%s/jre/lib/%s/" JAVA_DLL, path, arch);
+ if (access(libjava, F_OK) == 0) {
+@@ -919,8 +938,9 @@
* onwards the filename returned in DL_info structure from dladdr is
* an absolute pathname so technically realpath isn't required.
* On Linux we read the executable name from /proc/self/exe.
@@ -12604,7 +16708,7 @@
*/
const char*
SetExecname(char **argv)
-@@ -967,7 +977,17 @@
+@@ -957,7 +977,17 @@
exec_path = JLI_StringDup(buf);
}
}
@@ -12623,7 +16727,7 @@
{
/* Not implemented */
}
-@@ -1073,13 +1093,13 @@
+@@ -1063,13 +1093,13 @@
#define MAX_PID_STR_SZ 20
void SetJavaLauncherPlatformProps() {
@@ -12640,8 +16744,8 @@
}
int
---- ./jdk/src/solaris/bin/java_md_solinux.h Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/bin/java_md_solinux.h Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/bin/java_md_solinux.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/bin/java_md_solinux.h Sat Sep 05 06:34:07 2015 -0700
@@ -26,17 +26,26 @@
#ifndef JAVA_MD_SOLINUX_H
#define JAVA_MD_SOLINUX_H
@@ -12682,8 +16786,8 @@
#else /* !__solaris__, i.e. Linux, AIX,.. */
static const char *system_dir = "/usr/java";
static const char *user_dir = "/java";
---- ./jdk/src/solaris/classes/java/lang/UNIXProcess.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/classes/java/lang/UNIXProcess.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/classes/java/lang/UNIXProcess.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/classes/java/lang/UNIXProcess.java Sat Sep 05 06:34:07 2015 -0700
@@ -82,6 +82,8 @@
LINUX(LaunchMechanism.VFORK, LaunchMechanism.FORK),
@@ -12723,7 +16827,7 @@
case BSD:
stdin = (fds[0] == -1) ?
ProcessBuilder.NullOutputStream.INSTANCE :
-@@ -428,6 +433,7 @@
+@@ -431,6 +436,7 @@
private void destroy(boolean force) {
switch (platform) {
case LINUX:
@@ -12731,8 +16835,8 @@
case BSD:
case AIX:
// There is a risk that pid will be recycled, causing us to
---- ./jdk/src/solaris/classes/sun/awt/X11FontManager.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/classes/sun/awt/X11FontManager.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/classes/sun/awt/X11FontManager.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/classes/sun/awt/X11FontManager.java Sat Sep 05 06:34:07 2015 -0700
@@ -236,7 +236,7 @@
if (fontID != null) {
fileName = (String)fontNameMap.get(fontID);
@@ -12760,8 +16864,8 @@
(!mFontConfig.foundOsSpecificFile() ||
!mFontConfig.fontFilesArePresent()) ||
(FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
---- ./jdk/src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/classes/sun/awt/fontconfigs/bsd.fontconfig.properties Sat Sep 05 06:34:07 2015 -0700
@@ -26,134 +26,134 @@
# Version
@@ -13024,8 +17128,8 @@
+filename.NanumGothic_Bold=/usr/local/lib/X11/fonts/nanum-ttf/NanumGothicBold.ttf
+filename.NanumMyeongjo=/usr/local/lib/X11/fonts/nanum-ttf/NanumMyeongjo.ttf
+filename.NanumMyeongjo_Bold=/usr/local/lib/X11/fonts/nanum-ttf/NanumMyeongjoBold.ttf
---- ./jdk/src/solaris/classes/sun/net/PortConfig.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/classes/sun/net/PortConfig.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/classes/sun/net/PortConfig.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/classes/sun/net/PortConfig.java Sat Sep 05 06:34:07 2015 -0700
@@ -52,7 +52,7 @@
} else if (os.startsWith("SunOS")) {
defaultLower = 32768;
@@ -13035,8 +17139,8 @@
defaultLower = 49152;
defaultUpper = 65535;
} else if (os.startsWith("AIX")) {
---- ./jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/classes/sun/nio/ch/DefaultAsynchronousChannelProvider.java Sat Sep 05 06:34:07 2015 -0700
@@ -66,7 +66,7 @@
return createProvider("sun.nio.ch.SolarisAsynchronousChannelProvider");
if (osname.equals("Linux"))
@@ -13046,8 +17150,8 @@
return createProvider("sun.nio.ch.BsdAsynchronousChannelProvider");
if (osname.equals("AIX"))
return createProvider("sun.nio.ch.AixAsynchronousChannelProvider");
---- ./jdk/src/solaris/classes/sun/nio/fs/BsdFileSystemProvider.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/classes/sun/nio/fs/BsdFileSystemProvider.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/classes/sun/nio/fs/BsdFileSystemProvider.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/classes/sun/nio/fs/BsdFileSystemProvider.java Sat Sep 05 06:34:07 2015 -0700
@@ -25,10 +25,14 @@
package sun.nio.fs;
@@ -13081,8 +17185,8 @@
+ new MagicFileTypeDetector());
+ }
}
---- ./jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java Sat Sep 05 06:34:07 2015 -0700
@@ -61,6 +61,8 @@
return createProvider("sun.nio.fs.SolarisFileSystemProvider");
if (osname.equals("Linux"))
@@ -13092,8 +17196,8 @@
if (osname.contains("OS X"))
return createProvider("sun.nio.fs.MacOSXFileSystemProvider");
if (osname.equals("AIX"))
---- ./jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java Sat Sep 05 06:34:07 2015 -0700
@@ -161,6 +161,7 @@
static boolean isBSD() {
@@ -13117,8 +17221,8 @@
"/usr/sbin/lpc status all | grep -E '^[ 0-9a-zA-Z_-]*@' | awk -F'@' '{print $1}' | sort"
};
---- ./jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java Sat Sep 05 06:34:07 2015 -0700
@@ -273,7 +273,7 @@
try {
b = s.getBytes("UTF-8");
@@ -13128,8 +17232,8 @@
}
BsdVirtualMachine.write(fd, b, 0, b.length);
}
---- ./jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_PCM.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_PCM.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_PCM.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_PCM.c Sat Sep 05 06:34:07 2015 -0700
@@ -140,7 +140,7 @@
(float) ((int) sr->samp_rates[s]),
DAUDIO_PCM, /* encoding - let's only do PCM */
@@ -13139,8 +17243,8 @@
FALSE /* little endian */
#else
(bits[b] > 8)?TRUE:FALSE /* big endian */
---- ./jdk/src/solaris/native/common/jni_util_md.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/common/jni_util_md.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/common/jni_util_md.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/common/jni_util_md.c Sat Sep 05 06:34:07 2015 -0700
@@ -28,6 +28,7 @@
#include "jni.h"
#include "jni_util.h"
@@ -13149,8 +17253,8 @@
jstring nativeNewStringPlatform(JNIEnv *env, const char *str) {
return NULL;
---- ./jdk/src/solaris/native/java/lang/java_props_md.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/java/lang/java_props_md.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/java/lang/java_props_md.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/java/lang/java_props_md.c Sat Sep 05 06:34:07 2015 -0700
@@ -151,7 +151,7 @@
lc = setlocale(cat, NULL);
#endif
@@ -13185,8 +17289,8 @@
/* user properties */
{
---- ./jdk/src/solaris/native/java/net/Inet4AddressImpl.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/java/net/Inet4AddressImpl.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/java/net/Inet4AddressImpl.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/java/net/Inet4AddressImpl.c Sat Sep 05 06:34:07 2015 -0700
@@ -36,20 +36,13 @@
#include <stdlib.h>
#include <ctype.h>
@@ -13209,276 +17313,7 @@
static jclass ni_iacls;
static jclass ni_ia4cls;
-@@ -74,268 +67,6 @@
- return JNI_TRUE;
- }
-
--
--#if defined(_ALLBSD_SOURCE) && !defined(HAS_GLIBC_GETHOSTBY_R)
--extern jobjectArray lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6);
--
--/* Use getaddrinfo(3), which is thread safe */
--/************************************************************************
-- * Inet4AddressImpl
-- */
--
--/*
-- * Class: java_net_Inet4AddressImpl
-- * Method: getLocalHostName
-- * Signature: ()Ljava/lang/String;
-- */
--JNIEXPORT jstring JNICALL
--Java_java_net_Inet4AddressImpl_getLocalHostName(JNIEnv *env, jobject this) {
-- char hostname[NI_MAXHOST+1];
--
-- hostname[0] = '\0';
-- if (JVM_GetHostName(hostname, NI_MAXHOST)) {
-- /* Something went wrong, maybe networking is not setup? */
-- strcpy(hostname, "localhost");
-- } else {
-- struct addrinfo hints, *res;
-- int error;
--
-- memset(&hints, 0, sizeof(hints));
-- hints.ai_flags = AI_CANONNAME;
-- hints.ai_family = AF_UNSPEC;
--
-- error = getaddrinfo(hostname, NULL, &hints, &res);
--
-- if (error == 0) {
-- /* host is known to name service */
-- error = getnameinfo(res->ai_addr,
-- res->ai_addrlen,
-- hostname,
-- NI_MAXHOST,
-- NULL,
-- 0,
-- NI_NAMEREQD);
--
-- /* if getnameinfo fails hostname is still the value
-- from gethostname */
--
-- freeaddrinfo(res);
-- }
-- }
-- return (*env)->NewStringUTF(env, hostname);
--}
--
--/*
-- * Find an internet address for a given hostname. Note that this
-- * code only works for addresses of type INET. The translation
-- * of %d.%d.%d.%d to an address (int) occurs in java now, so the
-- * String "host" shouldn't *ever* be a %d.%d.%d.%d string
-- *
-- * Class: java_net_Inet4AddressImpl
-- * Method: lookupAllHostAddr
-- * Signature: (Ljava/lang/String;)[[B
-- */
--
--JNIEXPORT jobjectArray JNICALL
--Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this,
-- jstring host) {
-- const char *hostname;
-- jobject name;
-- jobjectArray ret = 0;
-- int retLen = 0;
--
-- int error=0;
-- struct addrinfo hints, *res, *resNew = NULL;
--
-- if (!initializeInetClasses(env))
-- return NULL;
--
-- if (IS_NULL(host)) {
-- JNU_ThrowNullPointerException(env, "host is null");
-- return 0;
-- }
-- hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE);
-- CHECK_NULL_RETURN(hostname, NULL);
--
-- memset(&hints, 0, sizeof(hints));
-- hints.ai_flags = AI_CANONNAME;
-- hints.ai_family = AF_INET;
--
-- /*
-- * Workaround for Solaris bug 4160367 - if a hostname contains a
-- * white space then 0.0.0.0 is returned
-- */
-- if (isspace((unsigned char)hostname[0])) {
-- JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException",
-- (char *)hostname);
-- JNU_ReleaseStringPlatformChars(env, host, hostname);
-- return NULL;
-- }
--
--#ifdef MACOSX
-- /* If we're looking up the local machine, bypass DNS lookups and get
-- * address from getifaddrs.
-- */
-- ret = lookupIfLocalhost(env, hostname, JNI_FALSE);
-- if (ret != NULL || (*env)->ExceptionCheck(env)) {
-- JNU_ReleaseStringPlatformChars(env, host, hostname);
-- return ret;
-- }
--#endif
--
-- error = getaddrinfo(hostname, NULL, &hints, &res);
--
-- if (error) {
-- /* report error */
-- ThrowUnknownHostExceptionWithGaiError(env, hostname, error);
-- JNU_ReleaseStringPlatformChars(env, host, hostname);
-- return NULL;
-- } else {
-- int i = 0;
-- struct addrinfo *itr, *last = NULL, *iterator = res;
-- while (iterator != NULL) {
-- int skip = 0;
-- itr = resNew;
--
-- while (itr != NULL) {
-- struct sockaddr_in *addr1, *addr2;
--
-- addr1 = (struct sockaddr_in *)iterator->ai_addr;
-- addr2 = (struct sockaddr_in *)itr->ai_addr;
-- if (addr1->sin_addr.s_addr ==
-- addr2->sin_addr.s_addr) {
-- skip = 1;
-- break;
-- }
--
-- itr = itr->ai_next;
-- }
--
-- if (!skip) {
-- struct addrinfo *next
-- = (struct addrinfo*) malloc(sizeof(struct addrinfo));
-- if (!next) {
-- JNU_ThrowOutOfMemoryError(env, "Native heap allocation failed");
-- ret = NULL;
-- goto cleanupAndReturn;
-- }
-- memcpy(next, iterator, sizeof(struct addrinfo));
-- next->ai_next = NULL;
-- if (resNew == NULL) {
-- resNew = next;
-- } else {
-- last->ai_next = next;
-- }
-- last = next;
-- i++;
-- }
-- iterator = iterator->ai_next;
-- }
--
-- retLen = i;
-- iterator = resNew;
-- i = 0;
--
-- name = (*env)->NewStringUTF(env, hostname);
-- if (IS_NULL(name)) {
-- goto cleanupAndReturn;
-- }
--
-- ret = (*env)->NewObjectArray(env, retLen, ni_iacls, NULL);
-- if (IS_NULL(ret)) {
-- /* we may have memory to free at the end of this */
-- goto cleanupAndReturn;
-- }
--
-- while (iterator != NULL) {
-- /* We need 4 bytes to store ipv4 address; */
-- int len = 4;
--
-- jobject iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID);
-- if (IS_NULL(iaObj)) {
-- /* we may have memory to free at the end of this */
-- ret = NULL;
-- goto cleanupAndReturn;
-- }
-- setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)(iterator->ai_addr))->sin_addr.s_addr));
-- setInetAddress_hostName(env, iaObj, name);
-- (*env)->SetObjectArrayElement(env, ret, retLen - i -1, iaObj);
-- i++;
-- iterator = iterator->ai_next;
-- }
-- }
--
--cleanupAndReturn:
-- {
-- struct addrinfo *iterator, *tmp;
-- iterator = resNew;
-- while (iterator != NULL) {
-- tmp = iterator;
-- iterator = iterator->ai_next;
-- free(tmp);
-- }
-- JNU_ReleaseStringPlatformChars(env, host, hostname);
-- }
--
-- freeaddrinfo(res);
--
-- return ret;
--
--}
--
--/*
-- * Class: java_net_Inet4AddressImpl
-- * Method: getHostByAddr
-- * Signature: (I)Ljava/lang/String;
-- */
--JNIEXPORT jstring JNICALL
--Java_java_net_Inet4AddressImpl_getHostByAddr(JNIEnv *env, jobject this,
-- jbyteArray addrArray) {
-- jstring ret = NULL;
--
-- char host[NI_MAXHOST+1];
-- jfieldID fid;
-- int error = 0;
-- jint family;
-- struct sockaddr *him ;
-- int len = 0;
-- jbyte caddr[4];
-- jint addr;
--
-- struct sockaddr_in him4;
-- struct sockaddr *sa;
--
-- /*
-- * For IPv4 addresses construct a sockaddr_in structure.
-- */
-- (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr);
-- addr = ((caddr[0]<<24) & 0xff000000);
-- addr |= ((caddr[1] <<16) & 0xff0000);
-- addr |= ((caddr[2] <<8) & 0xff00);
-- addr |= (caddr[3] & 0xff);
-- memset((char *) &him4, 0, sizeof(him4));
-- him4.sin_addr.s_addr = (uint32_t) htonl(addr);
-- him4.sin_family = AF_INET;
-- sa = (struct sockaddr *) &him4;
-- len = sizeof(him4);
--
-- error = getnameinfo(sa, len, host, NI_MAXHOST, NULL, 0,
-- NI_NAMEREQD);
--
-- if (!error) {
-- ret = (*env)->NewStringUTF(env, host);
-- }
--
-- if (ret == NULL) {
-- JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", NULL);
-- }
--
-- return ret;
--
--}
--
--#else /* defined(_ALLBSD_SOURCE) && !defined(HAS_GLIBC_GETHOSTBY_R) */
--
- /* the initial size of our hostent buffers */
- #ifndef NI_MAXHOST
- #define NI_MAXHOST 1025
-@@ -435,6 +166,17 @@
+@@ -436,6 +429,17 @@
}
#endif
@@ -13496,17 +17331,8 @@
error = getaddrinfo(hostname, NULL, &hints, &res);
if (error) {
-@@ -568,8 +310,6 @@
- return ret;
- }
-
--#endif /* _ALLBSD_SOURCE */
--
- #define SET_NONBLOCKING(fd) { \
- int flags = fcntl(fd, F_GETFL); \
- flags |= O_NONBLOCK; \
---- ./jdk/src/solaris/native/java/net/Inet6AddressImpl.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/java/net/Inet6AddressImpl.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/java/net/Inet6AddressImpl.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/java/net/Inet6AddressImpl.c Sat Sep 05 06:34:07 2015 -0700
@@ -33,7 +33,7 @@
#include <strings.h>
#include <stdlib.h>
@@ -13528,17 +17354,28 @@
lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6)
{
jobjectArray result = NULL;
-@@ -307,7 +307,7 @@
+@@ -311,6 +311,19 @@
hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE);
CHECK_NULL_RETURN(hostname, NULL);
--#ifdef MACOSX
+#ifdef _ALLBSD_SOURCE
- /*
- * If we're looking up the local machine, attempt to get the address
- * from getifaddrs. This ensures we get an IPv6 address for the local
---- ./jdk/src/solaris/native/java/net/NetworkInterface.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/java/net/NetworkInterface.c Sat Jul 18 13:32:37 2015 -0700
++ /*
++ * If we're looking up the local machine, attempt to get the address
++ * from getifaddrs. This ensures we get an IPv6 address for the local
++ * machine.
++ */
++ ret = lookupIfLocalhost(env, hostname, JNI_TRUE);
++ if (ret != NULL || (*env)->ExceptionCheck(env)) {
++ JNU_ReleaseStringPlatformChars(env, host, hostname);
++ return ret;
++ }
++#endif
++
+ #ifdef AF_INET6
+ /* Try once, with our static buffer. */
+ memset(&hints, 0, sizeof(hints));
+--- ./jdk/src/solaris/native/java/net/NetworkInterface.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/java/net/NetworkInterface.c Sat Sep 05 06:34:07 2015 -0700
@@ -67,14 +67,19 @@
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -13561,8 +17398,8 @@
#include "jvm.h"
#include "jni_util.h"
---- ./jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Sat Sep 05 06:34:07 2015 -0700
@@ -2200,7 +2200,7 @@
}
}
@@ -13572,8 +17409,8 @@
if (family == AF_INET6 && index == 0) {
index = getDefaultScopeID(env);
}
---- ./jdk/src/solaris/native/java/net/bsd_close.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/java/net/bsd_close.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/java/net/bsd_close.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/java/net/bsd_close.c Sat Sep 05 06:34:07 2015 -0700
@@ -316,11 +316,8 @@
}
@@ -13588,8 +17425,8 @@
}
int NET_Connect(int s, struct sockaddr *addr, int addrlen) {
---- ./jdk/src/solaris/native/java/net/net_util_md.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/java/net/net_util_md.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/java/net/net_util_md.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/java/net/net_util_md.c Sat Sep 05 06:34:07 2015 -0700
@@ -45,6 +45,10 @@
#endif
#endif
@@ -13610,8 +17447,84 @@
static jclass ni_class = NULL;
static jfieldID ni_defaultIndexID;
if (ni_class == NULL) {
---- ./jdk/src/solaris/native/java/net/net_util_md.h Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/java/net/net_util_md.h Sat Jul 18 13:32:37 2015 -0700
+@@ -1518,6 +1522,7 @@
+ int exclbind = -1;
+ #endif
+ int rv;
++ int arg, alen;
+
+ #ifdef __linux__
+ /*
+@@ -1534,7 +1539,7 @@
+ }
+ #endif
+
+-#if defined(__solaris__) && defined(AF_INET6)
++#if defined(__solaris__)
+ /*
+ * Solaris has separate IPv4 and IPv6 port spaces so we
+ * use an exclusive bind when SO_REUSEADDR is not used to
+@@ -1544,35 +1549,31 @@
+ * results in a late bind that fails because the
+ * corresponding IPv4 port is in use.
+ */
+- if (ipv6_available()) {
+- int arg, len;
++ alen = sizeof(arg);
++ if (useExclBind || getsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
++ (char *)&arg, &alen) == 0) {
++ if (useExclBind || arg == 0) {
++ /*
++ * SO_REUSEADDR is disabled or sun.net.useExclusiveBind
++ * property is true so enable TCP_EXCLBIND or
++ * UDP_EXCLBIND
++ */
++ alen = sizeof(arg);
++ if (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&arg,
++ &alen) == 0) {
++ if (arg == SOCK_STREAM) {
++ level = IPPROTO_TCP;
++ exclbind = TCP_EXCLBIND;
++ } else {
++ level = IPPROTO_UDP;
++ exclbind = UDP_EXCLBIND;
++ }
++ }
+
+- len = sizeof(arg);
+- if (useExclBind || getsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
+- (char *)&arg, &len) == 0) {
+- if (useExclBind || arg == 0) {
+- /*
+- * SO_REUSEADDR is disabled or sun.net.useExclusiveBind
+- * property is true so enable TCP_EXCLBIND or
+- * UDP_EXCLBIND
+- */
+- len = sizeof(arg);
+- if (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&arg,
+- &len) == 0) {
+- if (arg == SOCK_STREAM) {
+- level = IPPROTO_TCP;
+- exclbind = TCP_EXCLBIND;
+- } else {
+- level = IPPROTO_UDP;
+- exclbind = UDP_EXCLBIND;
+- }
+- }
+-
+- arg = 1;
+- setsockopt(fd, level, exclbind, (char *)&arg,
+- sizeof(arg));
++ arg = 1;
++ setsockopt(fd, level, exclbind, (char *)&arg,
++ sizeof(arg));
+ }
+- }
+ }
+
+ #endif
+--- ./jdk/src/solaris/native/java/net/net_util_md.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/java/net/net_util_md.h Sat Sep 05 06:34:07 2015 -0700
@@ -47,7 +47,7 @@
close subroutine does not return until the select call returns.
...
@@ -13621,8 +17534,8 @@
extern int NET_Timeout(int s, long timeout);
extern int NET_Read(int s, void* buf, size_t len);
extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
---- ./jdk/src/solaris/native/java/util/TimeZone_md.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/java/util/TimeZone_md.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/java/util/TimeZone_md.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/java/util/TimeZone_md.c Sat Sep 05 06:34:07 2015 -0700
@@ -52,7 +52,11 @@
#if defined(__linux__) || defined(_ALLBSD_SOURCE)
@@ -13707,8 +17620,8 @@
}
#endif
-
---- ./jdk/src/solaris/native/sun/awt/awt_Font.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/awt/awt_Font.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/awt/awt_Font.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/awt/awt_Font.c Sat Sep 05 06:34:07 2015 -0700
@@ -255,7 +255,7 @@
if (strcmp(style, "regular") == 0) {
altstyle = "roman";
@@ -13718,9 +17631,9 @@
if (!strcmp(family, "lucidasans")) {
family = "lucida";
}
---- ./jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Sat Jul 18 13:32:37 2015 -0700
-@@ -120,7 +120,7 @@
+--- ./jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Sat Sep 05 06:34:07 2015 -0700
+@@ -121,7 +121,7 @@
*/
#define MAXFRAMEBUFFERS 16
@@ -13729,7 +17642,7 @@
typedef struct {
int screen_number;
short x_org;
-@@ -426,20 +426,15 @@
+@@ -427,20 +427,15 @@
if (XQueryExtension(awt_display, "RENDER",
&major_opcode, &first_event, &first_error))
{
@@ -13754,7 +17667,7 @@
if (xrenderLibHandle == NULL) {
xrenderLibHandle = dlopen("/usr/sfw/lib/libXrender.so.1",
RTLD_LAZY | RTLD_GLOBAL);
-@@ -583,7 +578,7 @@
+@@ -584,7 +579,7 @@
}
#ifndef HEADLESS
@@ -13763,7 +17676,7 @@
static void xinerama_init_linux()
{
void* libHandle = NULL;
-@@ -634,7 +629,7 @@
+@@ -635,7 +630,7 @@
}
}
#endif
@@ -13772,7 +17685,7 @@
static void xinerama_init_solaris()
{
void* libHandle = NULL;
-@@ -694,11 +689,11 @@
+@@ -695,11 +690,11 @@
}
DTRACE_PRINTLN("Xinerama extension is available");
@@ -13786,7 +17699,7 @@
}
#endif /* HEADLESS */
-@@ -1594,7 +1589,7 @@
+@@ -1597,7 +1592,7 @@
{
jobject point = NULL;
#ifndef HEADLESS /* return NULL in HEADLESS, Linux */
@@ -13795,7 +17708,7 @@
int x,y;
AWT_LOCK();
-@@ -1607,7 +1602,7 @@
+@@ -1610,7 +1605,7 @@
DTRACE_PRINTLN("unable to call XineramaSolarisCenterFunc: symbol is null");
}
AWT_FLUSH_UNLOCK();
@@ -13804,8 +17717,8 @@
#endif /* HEADLESS */
return point;
}
---- ./jdk/src/solaris/native/sun/awt/awt_InputMethod.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/awt/awt_InputMethod.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/awt/awt_InputMethod.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/awt/awt_InputMethod.c Sat Sep 05 06:34:07 2015 -0700
@@ -52,7 +52,7 @@
XIMPreeditDrawCallbackStruct *);
static void PreeditCaretCallback(XIC, XPointer,
@@ -13895,7 +17808,7 @@
/*
* Creates two XICs, one for active clients and the other for passive
* clients. All information on those XICs are stored in the
-@@ -930,7 +930,7 @@
+@@ -929,7 +929,7 @@
return FALSE ;
}
@@ -13904,7 +17817,7 @@
on_the_spot_styles |= XIMStatusNothing;
/*kinput does not support XIMPreeditCallbacks and XIMStatusArea
-@@ -943,9 +943,9 @@
+@@ -942,9 +942,9 @@
break;
}
}
@@ -13916,7 +17829,7 @@
for (i = 0; i < im_styles->count_styles; i++) {
active_styles |= im_styles->supported_styles[i] & on_the_spot_styles;
-@@ -993,7 +993,7 @@
+@@ -998,7 +998,7 @@
NULL);
if (preedit == (XVaNestedList)NULL)
goto err;
@@ -13925,7 +17838,7 @@
/*always try XIMStatusCallbacks for active client...*/
{
status = (XVaNestedList)XVaCreateNestedList(0,
-@@ -1015,7 +1015,7 @@
+@@ -1020,7 +1020,7 @@
XFree((void *)status);
XFree((void *)preedit);
}
@@ -13934,16 +17847,16 @@
pX11IMData->ic_active = XCreateIC(X11im,
XNClientWindow, w,
XNFocusWindow, w,
-@@ -1023,7 +1023,7 @@
+@@ -1028,7 +1028,7 @@
XNPreeditAttributes, preedit,
NULL);
XFree((void *)preedit);
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
- pX11IMData->ic_passive = XCreateIC(X11im,
- XNClientWindow, w,
- XNFocusWindow, w,
-@@ -1189,7 +1189,7 @@
+ } else {
+ pX11IMData->ic_active = XCreateIC(X11im,
+ XNClientWindow, w,
+@@ -1188,7 +1188,7 @@
}
@@ -13952,7 +17865,7 @@
static void
StatusStartCallback(XIC ic, XPointer client_data, XPointer call_data)
{
-@@ -1257,7 +1257,7 @@
+@@ -1256,7 +1256,7 @@
finally:
AWT_UNLOCK();
}
@@ -13961,7 +17874,7 @@
static void CommitStringCallback(XIC ic, XPointer client_data, XPointer call_data) {
JNIEnv *env = GetJNIEnv();
-@@ -1354,14 +1354,14 @@
+@@ -1353,14 +1353,14 @@
/* Use IMInstantiate call back only on Linux, as there is a bug in Solaris
(4768335)
*/
@@ -13978,7 +17891,7 @@
}
#endif
-@@ -1396,9 +1396,9 @@
+@@ -1395,9 +1395,9 @@
globalRef = (*env)->NewGlobalRef(env, this);
pX11IMData->x11inputmethod = globalRef;
@@ -13990,7 +17903,7 @@
pX11IMData->lookup_buf = 0;
pX11IMData->lookup_buf_len = 0;
-@@ -1448,14 +1448,14 @@
+@@ -1447,14 +1447,14 @@
setXICFocus(pX11IMData->current_ic, req);
currentX11InputMethodInstance = pX11IMData->x11inputmethod;
currentFocusWindow = w;
@@ -14007,7 +17920,7 @@
onoffStatusWindow(pX11IMData, 0, False);
if (pX11IMData->current_ic != NULL)
#endif
-@@ -1472,7 +1472,7 @@
+@@ -1471,7 +1471,7 @@
Java_sun_awt_X11InputMethod_turnoffStatusWindow(JNIEnv *env,
jobject this)
{
@@ -14016,7 +17929,7 @@
X11InputMethodData *pX11IMData;
StatusWindow *statusWindow;
-@@ -1640,7 +1640,7 @@
+@@ -1639,7 +1639,7 @@
JNIEXPORT void JNICALL Java_sun_awt_X11_XInputMethod_adjustStatusWindow
(JNIEnv *env, jobject this, jlong window)
{
@@ -14025,8 +17938,8 @@
AWT_LOCK();
adjustStatusWindow(window);
AWT_UNLOCK();
---- ./jdk/src/solaris/native/sun/awt/awt_Robot.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/awt/awt_Robot.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/awt/awt_Robot.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/awt/awt_Robot.c Sat Sep 05 06:34:07 2015 -0700
@@ -45,7 +45,7 @@
#include "wsutils.h"
#include "list.h"
@@ -14036,8 +17949,8 @@
#include <sys/socket.h>
#endif
---- ./jdk/src/solaris/native/sun/awt/extutil.h Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/awt/extutil.h Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/awt/extutil.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/awt/extutil.h Sat Sep 05 06:34:07 2015 -0700
@@ -58,7 +58,7 @@
*/
/* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */
@@ -14053,8 +17966,8 @@
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
---- ./jdk/src/solaris/native/sun/awt/fontpath.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/awt/fontpath.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/awt/fontpath.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/awt/fontpath.c Sat Sep 05 06:34:07 2015 -0700
@@ -23,9 +23,9 @@
* questions.
*/
@@ -14143,8 +18056,8 @@
&& (strcmp((char*)fontformat, "Type 1") != 0)
#endif
) {
---- ./jdk/src/solaris/native/sun/java2d/j2d_md.h Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/java2d/j2d_md.h Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/java2d/j2d_md.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/java2d/j2d_md.h Sat Sep 05 06:34:07 2015 -0700
@@ -28,11 +28,11 @@
#include <sys/types.h>
@@ -14160,8 +18073,8 @@
typedef unsigned char jubyte;
typedef unsigned short jushort;
---- ./jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c Sat Sep 05 06:34:07 2015 -0700
@@ -63,9 +63,6 @@
* MLIB_EDGE_SRC_PADDED
*/
@@ -14266,8 +18179,8 @@
LOGIC(da[0], dtmp, dtmp1, |);
}
else { /* aligned */
---- ./jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c Sat Sep 05 06:34:07 2015 -0700
@@ -804,7 +804,7 @@
static int initialized;
static int usevis = JNI_TRUE;
@@ -14277,8 +18190,8 @@
# define ULTRA_CHIP "sparc64"
#else
# define ULTRA_CHIP "sun4u"
---- ./jdk/src/solaris/native/sun/management/OperatingSystemImpl.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/management/OperatingSystemImpl.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/management/OperatingSystemImpl.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/management/OperatingSystemImpl.c Sat Sep 05 06:34:07 2015 -0700
@@ -56,6 +56,9 @@
#include <limits.h>
#include <stdlib.h>
@@ -14433,8 +18346,8 @@
return -1;
}
---- ./jdk/src/solaris/native/sun/net/portconfig.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/net/portconfig.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/net/portconfig.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/net/portconfig.c Sat Sep 05 06:34:07 2015 -0700
@@ -67,6 +67,24 @@
range->lower = net_getParam("/dev/tcp", "tcp_smallest_anon_port");
return 0;
@@ -14460,8 +18373,8 @@
#elif defined(_ALLBSD_SOURCE)
{
int ret;
---- ./jdk/src/solaris/native/sun/nio/ch/sctp/Sctp.h Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/nio/ch/sctp/Sctp.h Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/nio/ch/sctp/Sctp.h Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/nio/ch/sctp/Sctp.h Sat Sep 05 06:34:07 2015 -0700
@@ -67,7 +67,7 @@
@@ -14510,8 +18423,8 @@
jboolean loadSocketExtensionFuncs(JNIEnv* env);
#endif /* !SUN_NIO_CH_SCTP_H */
---- ./jdk/src/solaris/native/sun/nio/ch/sctp/SctpNet.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/nio/ch/sctp/SctpNet.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/nio/ch/sctp/SctpNet.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/nio/ch/sctp/SctpNet.c Sat Sep 05 06:34:07 2015 -0700
@@ -58,6 +58,7 @@
*/
jboolean loadSocketExtensionFuncs
@@ -14528,8 +18441,8 @@
funcsLoaded = JNI_TRUE;
return JNI_TRUE;
---- ./jdk/src/solaris/native/sun/nio/fs/MagicFileTypeDetector.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/nio/fs/MagicFileTypeDetector.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/nio/fs/MagicFileTypeDetector.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/nio/fs/MagicFileTypeDetector.c Sat Sep 05 06:34:07 2015 -0700
@@ -31,6 +31,12 @@
#include <dlfcn.h>
#include <string.h>
@@ -14552,8 +18465,8 @@
if (magic_handle == NULL) {
return JNI_FALSE;
}
---- ./jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c Sat Sep 05 06:34:07 2015 -0700
@@ -54,7 +54,7 @@
}
@@ -14563,8 +18476,8 @@
void *hModule = dlopen(libName, RTLD_LAZY);
#else
void *hModule = dlopen(libName, RTLD_NOLOAD);
---- ./jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c Sat Sep 05 06:34:07 2015 -0700
@@ -37,7 +37,9 @@
#include <sys/types.h>
#include <sys/socket.h>
@@ -14575,8 +18488,8 @@
#include <sys/un.h>
#include <fcntl.h>
---- ./jdk/src/solaris/native/sun/xawt/XWindow.c Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/solaris/native/sun/xawt/XWindow.c Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/solaris/native/sun/xawt/XWindow.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/solaris/native/sun/xawt/XWindow.c Sat Sep 05 06:34:07 2015 -0700
@@ -886,7 +886,7 @@
{
KeySym originalKeysym = *keysym;
@@ -14586,8 +18499,30 @@
/* The following code on Linux will cause the keypad keys
* not to echo on JTextField when the NumLock is on. The
* keysyms will be 0, because the last parameter 2 is not defined.
---- ./jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_DirectSound.cpp Tue May 26 13:28:17 2015 -0700
-+++ ./jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_DirectSound.cpp Sat Jul 18 13:32:37 2015 -0700
+--- ./jdk/src/windows/bin/java_md.c Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/windows/bin/java_md.c Sat Sep 05 06:34:07 2015 -0700
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1997, 2015, 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
+@@ -318,7 +318,11 @@
+ JLI_TraceLauncher("JRE path is %s\n", path);
+ return JNI_TRUE;
+ }
+-
++ /* ensure storage for path + \jre + NULL */
++ if ((JLI_StrLen(path) + 4 + 1) > pathsize) {
++ JLI_TraceLauncher("Insufficient space to store JRE path\n");
++ return JNI_FALSE;
++ }
+ /* Does this app ship a private JRE in <apphome>\jre directory? */
+ JLI_Snprintf(javadll, sizeof (javadll), "%s\\jre\\bin\\" JAVA_DLL, path);
+ if (stat(javadll, &s) == 0) {
+--- ./jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_DirectSound.cpp Wed Jul 01 21:53:30 2015 -0700
++++ ./jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_DirectSound.cpp Sat Sep 05 06:34:07 2015 -0700
@@ -308,7 +308,7 @@
DAUDIO_PCM,
(bitsArray[bitIndex]==8)?FALSE:TRUE, /* signed */