/hg/release/icedtea7-forest-2.6/jdk: 5 new changesets

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

/hg/release/icedtea7-forest-2.6/jdk: 5 new changesets

andrew-127
changeset af426d923cc5 in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=af426d923cc5
author: neugens
date: Wed Oct 11 16:25:08 2017 +0100

        8188030, PR3460, RH1484079: AWT java apps fail to start when some minimal fonts are present
        Summary: Handle CFF fonts
        Reviewed-by: andrew, prr


changeset 739089615755 in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=739089615755
author: vtewari
date: Wed Oct 25 18:02:19 2017 +0100

        8075484, PR3474, RH1490713: SocketInputStream.socketRead0 can hang even with soTimeout set
        Reviewed-by: chegar, dsamersoff, msheppar, clanger


changeset 60caad28e292 in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=60caad28e292
author: andrew
date: Wed Oct 25 18:08:25 2017 +0100

        PR3480, RH1486025: ECC and NSS JVM crash
        Summary: SunEC provider can have multiple instances, leading to premature NSS shutdown
        Contributed-by: Martin Balao <[hidden email]>


changeset 8563ea7f9be7 in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=8563ea7f9be7
author: andrew
date: Thu Oct 26 22:04:35 2017 +0100

        Bump to icedtea-2.6.12pre01


changeset 17bd439e2df7 in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=17bd439e2df7
author: andrew
date: Mon Nov 20 15:20:08 2017 +0000

        Added tag icedtea-2.6.12pre01 for changeset 8563ea7f9be7


diffstat:

 .hgtags                                         |   1 +
 make/jdk_generic_profile.sh                     |   2 +-
 make/sun/security/ec/mapfile-vers               |   1 -
 src/share/classes/sun/security/ec/SunEC.java    |  13 ------
 src/share/native/sun/security/ec/ECC_JNI.cpp    |   8 +--
 src/solaris/native/java/net/SocketInputStream.c |  53 ++++++++++++++++++++++++-
 src/solaris/native/java/net/bsd_close.c         |  13 +++--
 src/solaris/native/java/net/linux_close.c       |  18 +++-----
 src/solaris/native/java/net/net_util_md.c       |  18 ++++++++
 src/solaris/native/java/net/net_util_md.h       |   6 ++-
 src/solaris/native/sun/awt/fontpath.c           |   1 +
 11 files changed, 94 insertions(+), 40 deletions(-)

diffs (309 lines):

diff -r e84636d7183c -r 17bd439e2df7 .hgtags
--- a/.hgtags Thu Aug 10 06:31:29 2017 +0100
+++ b/.hgtags Mon Nov 20 15:20:08 2017 +0000
@@ -662,3 +662,4 @@
 871e3350966f67b95768a94c1854f1515cfa56ca jdk7u151-b00
 da1c09ab9b742fa77c0e667c2218b8d626432656 jdk7u151-b01
 082c6e8b8812ad9c8bc175b2bcb65a3c470f36cd icedtea-2.6.11
+8563ea7f9be76f69ec9e8de1ca131d4aae114480 icedtea-2.6.12pre01
diff -r e84636d7183c -r 17bd439e2df7 make/jdk_generic_profile.sh
--- a/make/jdk_generic_profile.sh Thu Aug 10 06:31:29 2017 +0100
+++ b/make/jdk_generic_profile.sh Mon Nov 20 15:20:08 2017 +0000
@@ -672,7 +672,7 @@
 
 # IcedTea versioning
 export ICEDTEA_NAME="IcedTea"
-export PACKAGE_VERSION="2.6.11"
+export PACKAGE_VERSION="2.6.12pre01"
 export DERIVATIVE_ID="${ICEDTEA_NAME} ${PACKAGE_VERSION}"
 echo "Building ${DERIVATIVE_ID}"
 
diff -r e84636d7183c -r 17bd439e2df7 make/sun/security/ec/mapfile-vers
--- a/make/sun/security/ec/mapfile-vers Thu Aug 10 06:31:29 2017 +0100
+++ b/make/sun/security/ec/mapfile-vers Mon Nov 20 15:20:08 2017 +0000
@@ -32,7 +32,6 @@
  Java_sun_security_ec_ECDSASignature_verifySignedDigest;
  Java_sun_security_ec_ECDHKeyAgreement_deriveKey;
  Java_sun_security_ec_SunEC_initialize;
- Java_sun_security_ec_SunEC_cleanup;
         local:
                 *;
 };
diff -r e84636d7183c -r 17bd439e2df7 src/share/classes/sun/security/ec/SunEC.java
--- a/src/share/classes/sun/security/ec/SunEC.java Thu Aug 10 06:31:29 2017 +0100
+++ b/src/share/classes/sun/security/ec/SunEC.java Mon Nov 20 15:20:08 2017 +0000
@@ -83,21 +83,8 @@
     }
 
     /**
-     * Cleanup native resources during finalisation.
-     */
-    @Override
-    protected void finalize() {
-        cleanup();
-    }
-
-    /**
      * Initialize the native code.
      */
     private static native void initialize();
 
-    /**
-     * Cleanup in the native layer.
-     */
-    private static native void cleanup();
-
 }
diff -r e84636d7183c -r 17bd439e2df7 src/share/native/sun/security/ec/ECC_JNI.cpp
--- a/src/share/native/sun/security/ec/ECC_JNI.cpp Thu Aug 10 06:31:29 2017 +0100
+++ b/src/share/native/sun/security/ec/ECC_JNI.cpp Mon Nov 20 15:20:08 2017 +0000
@@ -532,14 +532,12 @@
 }
 
 JNIEXPORT void
-JNICALL Java_sun_security_ec_SunEC_cleanup
-  (JNIEnv *env, jclass UNUSED(clazz))
+JNICALL JNI_OnUnload
+  (JavaVM *vm, void *reserved)
 {
 #ifdef SYSTEM_NSS
     RNG_RNGShutdown();
-    if (SECOID_Shutdown() != SECSuccess) {
- ThrowException(env, INTERNAL_ERROR);
-    }
+    SECOID_Shutdown();
 #endif
 }
 
diff -r e84636d7183c -r 17bd439e2df7 src/solaris/native/java/net/SocketInputStream.c
--- a/src/solaris/native/java/net/SocketInputStream.c Thu Aug 10 06:31:29 2017 +0100
+++ b/src/solaris/native/java/net/SocketInputStream.c Mon Nov 20 15:20:08 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, 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
@@ -52,6 +52,42 @@
     IO_fd_fdID = NET_GetFileDescriptorID(env);
 }
 
+#if !defined(__solaris__)
+static int NET_ReadWithTimeout(JNIEnv *env, int fd, char *bufP, int len, long timeout) {
+    int result = 0;
+    long prevtime = NET_GetCurrentTime(), newtime;
+    while (timeout > 0) {
+        result = NET_TimeoutWithCurrentTime(fd, timeout, prevtime);
+        if (result <= 0) {
+            if (result == 0) {
+                JNU_ThrowByName(env, "java/net/SocketTimeoutException", "Read timed out");
+            } else if (result == -1) {
+                if (errno == EBADF) {
+                    JNU_ThrowByName(env, "java/net/SocketException", "Socket closed");
+                } else if (errno == ENOMEM) {
+                    JNU_ThrowOutOfMemoryError(env, "NET_Timeout native heap allocation failed");
+                } else {
+                    JNU_ThrowByNameWithMessageAndLastError
+                            (env, "java/net/SocketException", "select/poll failed");
+                }
+            }
+            return -1;
+        }
+        result = NET_NonBlockingRead(fd, bufP, len);
+        if (result == -1 && ((errno == EAGAIN) || (errno == EWOULDBLOCK))) {
+            newtime = NET_GetCurrentTime();
+            timeout -= newtime - prevtime;
+            if (timeout > 0) {
+                prevtime = newtime;
+            }
+        } else {
+            break;
+        }
+    }
+    return result;
+}
+#endif
+
 /*
  * Class:     java_net_SocketInputStream
  * Method:    socketRead0
@@ -99,6 +135,7 @@
         bufP = BUF;
     }
 
+#if defined(__solaris__)
     if (timeout) {
         nread = NET_Timeout(fd, timeout);
         if (nread <= 0) {
@@ -126,7 +163,19 @@
     }
 
     nread = NET_Read(fd, bufP, len);
-
+#else
+    if (timeout) {
+        nread = NET_ReadWithTimeout(env, fd, bufP, len, timeout);
+        if ((*env)->ExceptionCheck(env)) {
+            if (bufP != BUF) {
+                free(bufP);
+            }
+            return nread;
+        }
+    } else {
+        nread = NET_Read(fd, bufP, len);
+    }
+#endif
     if (nread <= 0) {
         if (nread < 0) {
 
diff -r e84636d7183c -r 17bd439e2df7 src/solaris/native/java/net/bsd_close.c
--- a/src/solaris/native/java/net/bsd_close.c Thu Aug 10 06:31:29 2017 +0100
+++ b/src/solaris/native/java/net/bsd_close.c Mon Nov 20 15:20:08 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -292,6 +292,10 @@
     BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) );
 }
 
+int NET_NonBlockingRead(int s, void* buf, size_t len) {
+    BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT));
+}
+
 int NET_ReadV(int s, const struct iovec * vector, int count) {
     BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) );
 }
@@ -344,8 +348,8 @@
  * Auto restarts with adjusted timeout if interrupted by
  * signal other than our wakeup signal.
  */
-int NET_Timeout(int s, long timeout) {
-    long prevtime = 0, newtime;
+int NET_Timeout0(int s, long timeout, long currentTime) {
+    long prevtime = currentTime, newtime;
     struct timeval t, *tp = &t;
     fd_set fds;
     fd_set* fdsp = NULL;
@@ -366,9 +370,6 @@
      */
     if (timeout > 0) {
         /* Timed */
-        struct timeval now;
-        gettimeofday(&now, NULL);
-        prevtime = now.tv_sec * 1000  +  now.tv_usec / 1000;
         t.tv_sec = timeout / 1000;
         t.tv_usec = (timeout % 1000) * 1000;
     } else if (timeout < 0) {
diff -r e84636d7183c -r 17bd439e2df7 src/solaris/native/java/net/linux_close.c
--- a/src/solaris/native/java/net/linux_close.c Thu Aug 10 06:31:29 2017 +0100
+++ b/src/solaris/native/java/net/linux_close.c Mon Nov 20 15:20:08 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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
@@ -326,6 +326,10 @@
     BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) );
 }
 
+int NET_NonBlockingRead(int s, void* buf, size_t len) {
+    BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, MSG_DONTWAIT) );
+}
+
 int NET_ReadV(int s, const struct iovec * vector, int count) {
     BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) );
 }
@@ -377,8 +381,8 @@
  * Auto restarts with adjusted timeout if interrupted by
  * signal other than our wakeup signal.
  */
-int NET_Timeout(int s, long timeout) {
-    long prevtime = 0, newtime;
+int NET_Timeout0(int s, long timeout, long currentTime) {
+    long prevtime = currentTime, newtime;
     struct timeval t;
     fdEntry_t *fdEntry = getFdEntry(s);
 
@@ -390,14 +394,6 @@
         return -1;
     }
 
-    /*
-     * Pick up current time as may need to adjust timeout
-     */
-    if (timeout > 0) {
-        gettimeofday(&t, NULL);
-        prevtime = t.tv_sec * 1000  +  t.tv_usec / 1000;
-    }
-
     for(;;) {
         struct pollfd pfd;
         int rv;
diff -r e84636d7183c -r 17bd439e2df7 src/solaris/native/java/net/net_util_md.c
--- a/src/solaris/native/java/net/net_util_md.c Thu Aug 10 06:31:29 2017 +0100
+++ b/src/solaris/native/java/net/net_util_md.c Mon Nov 20 15:20:08 2017 +0000
@@ -33,6 +33,7 @@
 #include <netdb.h>
 #include <stdlib.h>
 #include <dlfcn.h>
+#include <sys/time.h>
 
 #ifndef _ALLBSD_SOURCE
 #include <values.h>
@@ -1723,3 +1724,20 @@
 
     return timeout;
 }
+
+#if !defined(__solaris__)
+long NET_GetCurrentTime() {
+    struct timeval time;
+    gettimeofday(&time, NULL);
+    return (time.tv_sec * 1000 + time.tv_usec / 1000);
+}
+
+int NET_TimeoutWithCurrentTime(int s, long timeout, long currentTime) {
+    return NET_Timeout0(s, timeout, currentTime);
+}
+
+int NET_Timeout(int s, long timeout) {
+    long currentTime = (timeout > 0) ? NET_GetCurrentTime() : 0;
+    return NET_Timeout0(s, timeout, currentTime);
+}
+#endif
diff -r e84636d7183c -r 17bd439e2df7 src/solaris/native/java/net/net_util_md.h
--- a/src/solaris/native/java/net/net_util_md.h Thu Aug 10 06:31:29 2017 +0100
+++ b/src/solaris/native/java/net/net_util_md.h Mon Nov 20 15:20:08 2017 +0000
@@ -46,9 +46,13 @@
    close subroutine does not return until the select call returns.
    ...
 */
-#if defined(__linux__) || defined(MACOSX) || defined (_AIX)
+#if !defined(__solaris__)
 extern int NET_Timeout(int s, long timeout);
+extern int NET_Timeout0(int s, long timeout, long currentTime);
 extern int NET_Read(int s, void* buf, size_t len);
+extern int NET_NonBlockingRead(int s, void* buf, size_t len);
+extern int NET_TimeoutWithCurrentTime(int s, long timeout, long currentTime);
+extern long NET_GetCurrentTime();
 extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
        struct sockaddr *from, int *fromlen);
 extern int NET_ReadV(int s, const struct iovec * vector, int count);
diff -r e84636d7183c -r 17bd439e2df7 src/solaris/native/sun/awt/fontpath.c
--- a/src/solaris/native/sun/awt/fontpath.c Thu Aug 10 06:31:29 2017 +0100
+++ b/src/solaris/native/sun/awt/fontpath.c Mon Nov 20 15:20:08 2017 +0000
@@ -970,6 +970,7 @@
                 && (strcmp((char*)fontformat, "TrueType") != 0)
 #if defined(__linux__) || defined(AIX)
                 && (strcmp((char*)fontformat, "Type 1") != 0)
+                && (strcmp((char*)fontformat, "CFF") != 0)
 #endif
              ) {
                 continue;