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

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Sun Nov 12 23:22:02 UTC 2017


changeset c32f7ecac9ad in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=c32f7ecac9ad
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 34de8dabb31b in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=34de8dabb31b
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 44e58259e68b in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=44e58259e68b
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 <mbalao at redhat.com>


changeset 686a9079ddba in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=686a9079ddba
author: andrew
date: Wed Nov 08 05:48:32 2017 +0000

	Bump to icedtea-2.7.0pre15


changeset f30401e74e3f in /hg/icedtea7-forest/jdk
details: http://icedtea.classpath.org/hg/icedtea7-forest/jdk?cmd=changeset;node=f30401e74e3f
author: andrew
date: Sun Nov 12 23:18:48 2017 +0000

	Added tag icedtea-2.7.0pre15 for changeset 686a9079ddba


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 c1e07b9c7968 -r f30401e74e3f .hgtags
--- a/.hgtags	Mon Sep 11 19:03:26 2017 +0100
+++ b/.hgtags	Sun Nov 12 23:18:48 2017 +0000
@@ -657,3 +657,4 @@
 871e3350966f67b95768a94c1854f1515cfa56ca jdk7u151-b00
 da1c09ab9b742fa77c0e667c2218b8d626432656 jdk7u151-b01
 c2314c8d2b47be555e2e304cf38c44fd73e4cdd1 icedtea-2.7.0pre14
+686a9079ddba06563843ce9eafbcf71bde9e385c icedtea-2.7.0pre15
diff -r c1e07b9c7968 -r f30401e74e3f make/jdk_generic_profile.sh
--- a/make/jdk_generic_profile.sh	Mon Sep 11 19:03:26 2017 +0100
+++ b/make/jdk_generic_profile.sh	Sun Nov 12 23:18:48 2017 +0000
@@ -672,7 +672,7 @@
 
 # IcedTea versioning
 export ICEDTEA_NAME="IcedTea"
-export PACKAGE_VERSION="2.7.0pre14"
+export PACKAGE_VERSION="2.7.0pre15"
 export DERIVATIVE_ID="${ICEDTEA_NAME} ${PACKAGE_VERSION}"
 echo "Building ${DERIVATIVE_ID}"
 
diff -r c1e07b9c7968 -r f30401e74e3f make/sun/security/ec/mapfile-vers
--- a/make/sun/security/ec/mapfile-vers	Mon Sep 11 19:03:26 2017 +0100
+++ b/make/sun/security/ec/mapfile-vers	Sun Nov 12 23:18:48 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 c1e07b9c7968 -r f30401e74e3f src/share/classes/sun/security/ec/SunEC.java
--- a/src/share/classes/sun/security/ec/SunEC.java	Mon Sep 11 19:03:26 2017 +0100
+++ b/src/share/classes/sun/security/ec/SunEC.java	Sun Nov 12 23:18:48 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 c1e07b9c7968 -r f30401e74e3f src/share/native/sun/security/ec/ECC_JNI.cpp
--- a/src/share/native/sun/security/ec/ECC_JNI.cpp	Mon Sep 11 19:03:26 2017 +0100
+++ b/src/share/native/sun/security/ec/ECC_JNI.cpp	Sun Nov 12 23:18:48 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 c1e07b9c7968 -r f30401e74e3f src/solaris/native/java/net/SocketInputStream.c
--- a/src/solaris/native/java/net/SocketInputStream.c	Mon Sep 11 19:03:26 2017 +0100
+++ b/src/solaris/native/java/net/SocketInputStream.c	Sun Nov 12 23:18:48 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 c1e07b9c7968 -r f30401e74e3f src/solaris/native/java/net/bsd_close.c
--- a/src/solaris/native/java/net/bsd_close.c	Mon Sep 11 19:03:26 2017 +0100
+++ b/src/solaris/native/java/net/bsd_close.c	Sun Nov 12 23:18:48 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 c1e07b9c7968 -r f30401e74e3f src/solaris/native/java/net/linux_close.c
--- a/src/solaris/native/java/net/linux_close.c	Mon Sep 11 19:03:26 2017 +0100
+++ b/src/solaris/native/java/net/linux_close.c	Sun Nov 12 23:18:48 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 c1e07b9c7968 -r f30401e74e3f src/solaris/native/java/net/net_util_md.c
--- a/src/solaris/native/java/net/net_util_md.c	Mon Sep 11 19:03:26 2017 +0100
+++ b/src/solaris/native/java/net/net_util_md.c	Sun Nov 12 23:18:48 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 c1e07b9c7968 -r f30401e74e3f src/solaris/native/java/net/net_util_md.h
--- a/src/solaris/native/java/net/net_util_md.h	Mon Sep 11 19:03:26 2017 +0100
+++ b/src/solaris/native/java/net/net_util_md.h	Sun Nov 12 23:18:48 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 c1e07b9c7968 -r f30401e74e3f src/solaris/native/sun/awt/fontpath.c
--- a/src/solaris/native/sun/awt/fontpath.c	Mon Sep 11 19:03:26 2017 +0100
+++ b/src/solaris/native/sun/awt/fontpath.c	Sun Nov 12 23:18:48 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;


More information about the distro-pkg-dev mailing list