changeset 3189:28527c40ebd1

Merge
author Andrew John Hughes <gnu.andrew@redhat.com>
date Thu, 09 Apr 2015 01:09:00 +0100
parents 8aa8364515bf (current diff) 8abbd8ec5d4c (diff)
children b7887ba0b847
files ChangeLog Makefile.am
diffstat 11 files changed, 476 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Mar 31 18:45:41 2015 +0100
+++ b/ChangeLog	Thu Apr 09 01:09:00 2015 +0100
@@ -1,3 +1,29 @@
+2015-04-03  Andrew John Hughes  <gnu.andrew@redhat.com>
+
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add new patches.
+	* NEWS: Updated.
+	* patches/openjdk/6584008-pr2195-jvmtistringprimitivecallback_null_string.patch,
+	* patches/openjdk/7199862-pr2198-ensure_cache_connection_still_alive.patch,
+	* patches/openjdk/8074312-pr2255-support_linux_4.patch,
+	* patches/pr2197-jhat_man_page_url.patch,
+	* patches/pr2201-support_giflib_5.1.patch,
+	* patches/pr2211-check_dgifclosefile_return.patch,
+	* patches/pr2226-support_future_giflib_6_and_up.patch:
+	Add new backports and bug fixes.
+
+2015-01-07  Andrew John Hughes  <gnu.andrew@member.fsf.org>
+
+	PR2190: JamVM lacks JVM_FindClassFromCaller introduced
+	by security patch in 1.13.5
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add new patch when building
+	JamVM.
+	(EXTRA_DIST): Include patches from JamVM directory.
+	* NEWS: Updated.
+	* patches/jamvm/pr2190-find_class_from_caller.patch:
+	Backport JamVM patch to implement FindClassFromCaller.
+
 2015-03-31  Andrew John Hughes  <gnu.andrew@redhat.com>
 
 	* patches/openjdk/6730740-pr2186-64-bit_breakage_in_6729881.patch,
--- a/Makefile.am	Tue Mar 31 18:45:41 2015 +0100
+++ b/Makefile.am	Thu Apr 09 01:09:00 2015 +0100
@@ -609,7 +609,14 @@
 	patches/pr2070-type_punning_warnings.patch \
 	patches/pr2082-s390_type_fixes.patch \
 	patches/pr2096-4096-bit_dh.patch \
-	patches/pr2179-avoid_x86_workaround_on_zero.patch
+	patches/pr2179-avoid_x86_workaround_on_zero.patch \
+	patches/openjdk/6584008-pr2195-jvmtistringprimitivecallback_null_string.patch \
+	patches/openjdk/7199862-pr2198-ensure_cache_connection_still_alive.patch \
+	patches/openjdk/8074312-pr2255-support_linux_4.patch \
+	patches/pr2197-jhat_man_page_url.patch \
+	patches/pr2201-support_giflib_5.1.patch \
+	patches/pr2211-check_dgifclosefile_return.patch \
+	patches/pr2226-support_future_giflib_6_and_up.patch
 
 if WITH_RHINO
 ICEDTEA_PATCHES += \
@@ -648,6 +655,11 @@
 	patches/hotspot/hs23/systemtap-alloc-size-workaround.patch
 endif
 
+if BUILD_JAMVM
+ICEDTEA_PATCHES += \
+	patches/jamvm/pr2190-find_class_from_caller.patch
+endif
+
 if ENABLE_NSS
 ICEDTEA_PATCHES += patches/rh1022017.patch
 NSS_PATCHES = patches/nss-config.patch
--- a/NEWS	Tue Mar 31 18:45:41 2015 +0100
+++ b/NEWS	Thu Apr 09 01:09:00 2015 +0100
@@ -15,16 +15,23 @@
 New in release 1.14.0 (201X-XX-XX):
 
 * Backports
+  - S6584008, PR2195, RH1173326: jvmtiStringPrimitiveCallback should not be invoked when string value is null
   - S6611637: NullPointerException in sun.font.GlyphLayout$EngineRecord.init
   - S6727719: Performance of TextLayout.getBounds()
   - S6745225: Memory leak while drawing Attributed String
   - S6904962: GlyphVector.getVisualBounds should not be affected by leading or trailing white space.
   - S7151089: PS NUMA: NUMA allocator should not attempt to free pages when using SHM large pages
+  - S7199862, PR2198: Make sure that a connection is still alive when retrieved from KeepAliveCache in certain cases
   - S8013057: Detect mmap() commit failures in Linux and Solaris os::commit_memory() impls and call vm_exit_out_of_memory()
   - S8026887: Make issues due to failed large pages allocations easier to debug
+  - S8074312, PR2255: Enable hotspot builds on Linux 4.x
 * Bug fixes
   - PR1886: IcedTea does not checksum supplied tarballs
   - PR2083: Add support for building Zero on AArch64
+  - PR2197: jhat man page has broken URL
+  - PR2201: Support giflib 5.1.0
+  - PR2211: DGifCloseFile call should check the return value, not the error code, for failure
+  - PR2226: giflib 5.1 conditional excludes 6.0, 7.0, etc.
 
 New in release 1.13.6 (2015-01-23):
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/jamvm/pr2190-find_class_from_caller.patch	Thu Apr 09 01:09:00 2015 +0100
@@ -0,0 +1,93 @@
+diff -Nru jamvm.old/src/classlib/openjdk/class.c jamvm/src/classlib/openjdk/class.c
+--- jamvm/jamvm.old/src/classlib/openjdk/class.c	2013-11-18 03:45:44.000000000 +0000
++++ jamvm/jamvm/src/classlib/openjdk/class.c	2015-01-07 16:14:57.599311159 +0000
+@@ -23,6 +23,7 @@
+ #include "jam.h"
+ #include "hash.h"
+ #include "class.h"
++#include "excep.h"
+ #include "symbol.h"
+ 
+ /* Cached offset of classes field in java.lang.ClassLoader objects */
+@@ -161,3 +162,24 @@
+ 
+     return strcat(strcpy(endorsed_dirs, java_home), "/lib/endorsed");
+ }
++
++Class *findClassFromLoader(char *name, int init, Object *loader,
++                           int throw_error) {
++
++    Class *class = findClassFromClassLoader(name, loader);
++
++    if(class == NULL) {
++        if(!throw_error) {
++            Object *excep = exceptionOccurred();
++            char *dot_name = slash2DotsDup(name);
++
++            clearException();
++            signalChainedException(java_lang_ClassNotFoundException,
++                                   dot_name, excep);
++            sysFree(dot_name);
++        }
++    } else if(init)
++        initClass(class);
++
++    return class;
++}
+diff -Nru jamvm.old/src/classlib/openjdk/jvm.c jamvm/src/classlib/openjdk/jvm.c
+--- jamvm/jamvm.old/src/classlib/openjdk/jvm.c	2013-11-18 03:45:44.000000000 +0000
++++ jamvm/jamvm/src/classlib/openjdk/jvm.c	2015-01-07 16:16:43.560605105 +0000
+@@ -520,26 +520,22 @@
+ jclass JVM_FindClassFromClassLoader(JNIEnv *env, const char *name,
+                                     jboolean init, jobject loader,
+                                     jboolean throw_error) {
+-    Class *class;
+ 
+     TRACE("JVM_FindClassFromClassLoader(env=%p, name=%s, init=%d, loader=%p,"
+           " throwError=%d)", env, name, init, loader, throwError);
+ 
+-    class = findClassFromClassLoader((char *)name, loader);
++    return findClassFromLoader((char *)name, init, loader, throw_error);
++}
++
++/* JVM_FindClassFromCaller */
++
++jclass JVM_FindClassFromCaller(JNIEnv *env, const char *name, jboolean init,
++                               jobject loader, jclass caller) {
+ 
+-    if(class == NULL && !throw_error) {
+-        Object *excep = exceptionOccurred();
+-        char *dot_name = slash2DotsDup((char*)name);
+-
+-        clearException();
+-        signalChainedException(java_lang_ClassNotFoundException,
+-                               dot_name, excep);
+-        sysFree(dot_name);
+-    } else
+-        if(init)
+-            initClass(class);
++    TRACE("JVM_FindClassFromCaller(env=%p, name=%s, init=%d, loader=%p,"
++          " caller=%p)", env, name, init, loader, caller);
+ 
+-    return class;
++    return findClassFromLoader((char *)name, init, loader, FALSE);
+ }
+ 
+ 
+diff -Nru jamvm.old/src/classlib/openjdk/openjdk.h jamvm/src/classlib/openjdk/openjdk.h
+--- jamvm/jamvm.old/src/classlib/openjdk/openjdk.h	2013-11-18 03:45:44.000000000 +0000
++++ jamvm/jamvm/src/classlib/openjdk/openjdk.h	2015-01-07 16:14:57.599311159 +0000
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (C) 2010, 2011, 2013 Robert Lougher <rob@jamvm.org.uk>.
++ * Copyright (C) 2010, 2011, 2013, 2014 Robert Lougher <rob@jamvm.org.uk>.
+  *
+  * This file is part of JamVM.
+  *
+@@ -53,3 +53,6 @@
+ extern Object *resolveMemberName(Class *mh_class, Object *mname);
+ 
+ extern Object *getMethodParameters(Object *method);
++
++extern Class *findClassFromLoader(char *name, int init, Object *loader,
++                                  int throw_error);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/6584008-pr2195-jvmtistringprimitivecallback_null_string.patch	Thu Apr 09 01:09:00 2015 +0100
@@ -0,0 +1,30 @@
+# HG changeset patch
+# User aph
+# Date 1421396122 -3600
+#      Fri Jan 16 09:15:22 2015 +0100
+# Node ID 9686a796c829bf0d5a4303947474a97e0fd5826c
+# Parent  1830156c6b7ee6ccc6ee21113fb537df507d2974
+6584008: jvmtiStringPrimitiveCallback should not be invoked when string value is null
+Reviewed-by: sla, sspitsyn
+
+diff -r 1830156c6b7e -r 9686a796c829 src/share/vm/prims/jvmtiTagMap.cpp
+--- openjdk/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Wed Feb 04 04:31:38 2015 -0500
++++ openjdk/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Fri Jan 16 09:15:22 2015 +0100
+@@ -1045,10 +1045,16 @@
+ {
+   assert(str->klass() == SystemDictionary::String_klass(), "not a string");
+ 
++  typeArrayOop s_value = java_lang_String::value(str);
++
++  // JDK-6584008: the value field may be null if a String instance is
++  // partially constructed.
++  if (s_value == NULL) {
++    return 0;
++  }
+   // get the string value and length
+   // (string value may be offset from the base)
+   int s_len = java_lang_String::length(str);
+-  typeArrayOop s_value = java_lang_String::value(str);
+   int s_offset = java_lang_String::offset(str);
+   jchar* value;
+   if (s_len > 0) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/7199862-pr2198-ensure_cache_connection_still_alive.patch	Thu Apr 09 01:09:00 2015 +0100
@@ -0,0 +1,165 @@
+diff -r c4ed64237075 src/share/classes/sun/net/www/http/HttpClient.java
+--- openjdk/jdk/src/share/classes/sun/net/www/http/HttpClient.java	Wed Apr 01 00:13:50 2015 +0100
++++ openjdk/jdk/src/share/classes/sun/net/www/http/HttpClient.java	Thu Apr 02 18:21:08 2015 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1994, 2007, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1994, 2012, 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
+@@ -251,16 +251,17 @@
+      */
+     public static HttpClient New(URL url)
+     throws IOException {
+-        return HttpClient.New(url, Proxy.NO_PROXY, -1, true);
++        return HttpClient.New(url, Proxy.NO_PROXY, -1, true, null);
+     }
+ 
+     public static HttpClient New(URL url, boolean useCache)
+         throws IOException {
+-        return HttpClient.New(url, Proxy.NO_PROXY, -1, useCache);
++        return HttpClient.New(url, Proxy.NO_PROXY, -1, useCache, null);
+     }
+ 
+-    public static HttpClient New(URL url, Proxy p, int to, boolean useCache)
+-        throws IOException {
++    public static HttpClient New(URL url, Proxy p, int to, boolean useCache,
++        HttpURLConnection httpuc) throws IOException
++    {
+         if (p == null) {
+             p = Proxy.NO_PROXY;
+         }
+@@ -268,6 +269,12 @@
+         /* see if one's already around */
+         if (useCache) {
+             ret = (HttpClient) kac.get(url, null);
++            if (ret != null && httpuc != null &&
++                httpuc.streaming() &&
++                httpuc.getRequestMethod() == "POST") {
++                if (!ret.available())
++                    ret = null;
++            }
+             if (ret != null) {
+                 if ((ret.proxy != null && ret.proxy.equals(p)) ||
+                     (ret.proxy == null && p == null)) {
+@@ -306,20 +313,25 @@
+         return ret;
+     }
+ 
+-    public static HttpClient New(URL url, Proxy p, int to) throws IOException {
+-        return New(url, p, to, true);
++    public static HttpClient New(URL url, Proxy p, int to,
++        HttpURLConnection httpuc) throws IOException
++    {
++        return New(url, p, to, true, httpuc);
+     }
+ 
+     public static HttpClient New(URL url, String proxyHost, int proxyPort,
+                                  boolean useCache)
+         throws IOException {
+-        return New(url, newHttpProxy(proxyHost, proxyPort, "http"), -1, useCache);
++        return New(url, newHttpProxy(proxyHost, proxyPort, "http"),
++            -1, useCache, null);
+     }
+ 
+     public static HttpClient New(URL url, String proxyHost, int proxyPort,
+-                                 boolean useCache, int to)
++                                 boolean useCache, int to,
++                                 HttpURLConnection httpuc)
+         throws IOException {
+-        return New(url, newHttpProxy(proxyHost, proxyPort, "http"), to, useCache);
++        return New(url, newHttpProxy(proxyHost, proxyPort, "http"),
++            to, useCache, httpuc);
+     }
+ 
+     /* return it to the cache as still usable, if:
+@@ -348,6 +360,33 @@
+         }
+     }
+ 
++    protected synchronized boolean available() throws IOException {
++        boolean available = true;
++        int old = serverSocket.getSoTimeout();
++        serverSocket.setSoTimeout(1);
++        BufferedInputStream tmpbuf =
++            new BufferedInputStream(serverSocket.getInputStream());
++
++        try {
++            int r = tmpbuf.read();
++            if (r == -1) {
++                if (HttpCapture.isLoggable("FINEST")) {
++                    HttpCapture.finest("HttpClient.available(): " +
++                        "read returned -1: not available");
++                }
++                available = false;
++            }
++        } catch (SocketTimeoutException e) {
++            if (HttpCapture.isLoggable("FINEST")) {
++                HttpCapture.finest("HttpClient.available(): " +
++                    "SocketTimeout: its available");
++            }
++        } finally {
++            serverSocket.setSoTimeout(old);
++        }
++        return available;
++    }
++
+     protected synchronized void putInKeepAliveCache() {
+         if (inCache) {
+             assert false : "Duplicate put to keep alive cache";
+diff -r c4ed64237075 src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
+--- openjdk/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Wed Apr 01 00:13:50 2015 +0100
++++ openjdk/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Thu Apr 02 18:21:08 2015 +0100
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 1995, 2012, 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
+@@ -619,7 +619,7 @@
+      */
+     protected void setNewClient (URL url, boolean useCache)
+         throws IOException {
+-        http = HttpClient.New(url, null, -1, useCache, connectTimeout);
++        http = HttpClient.New(url, null, -1, useCache, connectTimeout, this);
+         http.setReadTimeout(readTimeout);
+     }
+ 
+@@ -660,7 +660,8 @@
+                                            String proxyHost, int proxyPort,
+                                            boolean useCache)
+         throws IOException {
+-        http = HttpClient.New (url, proxyHost, proxyPort, useCache, connectTimeout);
++        http = HttpClient.New (url, proxyHost, proxyPort, useCache,
++            connectTimeout, this);
+         http.setReadTimeout(readTimeout);
+     }
+ 
+@@ -951,14 +952,14 @@
+     // subclass HttpsClient will overwrite & return an instance of HttpsClient
+     protected HttpClient getNewHttpClient(URL url, Proxy p, int connectTimeout)
+         throws IOException {
+-        return HttpClient.New(url, p, connectTimeout);
++        return HttpClient.New(url, p, connectTimeout, this);
+     }
+ 
+     // subclass HttpsClient will overwrite & return an instance of HttpsClient
+     protected HttpClient getNewHttpClient(URL url, Proxy p,
+                                           int connectTimeout, boolean useCache)
+         throws IOException {
+-        return HttpClient.New(url, p, connectTimeout, useCache);
++        return HttpClient.New(url, p, connectTimeout, useCache, this);
+     }
+ 
+     private void expect100Continue() throws IOException {
+@@ -1095,7 +1096,7 @@
+         }
+     }
+ 
+-    private boolean streaming () {
++    public boolean streaming () {
+         return (fixedContentLength != -1) || (chunkLength != -1);
+     }
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/8074312-pr2255-support_linux_4.patch	Thu Apr 09 01:09:00 2015 +0100
@@ -0,0 +1,19 @@
+diff -Nru openjdk.orig/hotspot/make/linux/Makefile openjdk/hotspot/make/linux/Makefile
+--- openjdk.orig/hotspot/make/linux/Makefile	2015-01-20 02:17:59.000000000 +0000
++++ openjdk/hotspot/make/linux/Makefile	2015-04-01 15:56:23.145797203 +0100
+@@ -1,5 +1,5 @@
+ #
+-# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
++# Copyright (c) 1999, 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
+@@ -231,7 +231,7 @@
+ # Solaris 2.5.1, 2.6).
+ # Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.
+ 
+-SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3%
++SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3% 4%
+ OS_VERSION := $(shell uname -r)
+ EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/pr2197-jhat_man_page_url.patch	Thu Apr 09 01:09:00 2015 +0100
@@ -0,0 +1,52 @@
+# HG changeset patch
+# User andrew
+# Date 1423073807 0
+#      Wed Feb 04 18:16:47 2015 +0000
+# Node ID a7b145722afff8d0677f991b43b35d1e6ec9d23a
+# Parent  6e761a451703610814e2099ba709dc22725e10d0
+PR2196, RH1164762: jhat man page has broken URL
+Summary: Fix link to HPROF web page to point to version for Oracle JDK 7
+Contributed-by: jvanek@redhat.com
+
+diff -r 6e761a451703 -r a7b145722aff src/linux/doc/man/jhat.1
+--- openjdk/jdk/src/linux/doc/man/jhat.1	Wed Feb 04 16:52:13 2015 +0000
++++ openjdk/jdk/src/linux/doc/man/jhat.1	Wed Feb 04 18:16:47 2015 +0000
+@@ -77,7 +77,7 @@
+ .na
+ \f2hprof\fP @
+ .fi
+-http://java.sun.com/developer/technicalArticles/Programming/HPROF.html. 
++https://docs.oracle.com/javase/7/docs/technotes/samples/hprof.html.
+ .RE
+ 
+ .LP
+@@ -134,7 +134,7 @@
+ .na
+ \f2hprof \- Heap and CPU profiling tool\fP @
+ .fi
+-http://java.sun.com/developer/technicalArticles/Programming/HPROF.html 
++https://docs.oracle.com/javase/7/docs/technotes/samples/hprof.html.
+ .RE
+ 
+ .LP
+diff -r 6e761a451703 -r a7b145722aff src/solaris/doc/sun/man/man1/jhat.1
+--- openjdk/jdk/src/solaris/doc/sun/man/man1/jhat.1	Wed Feb 04 16:52:13 2015 +0000
++++ openjdk/jdk/src/solaris/doc/sun/man/man1/jhat.1	Wed Feb 04 18:16:47 2015 +0000
+@@ -77,7 +77,7 @@
+ .na
+ \f2hprof\fP @
+ .fi
+-http://java.sun.com/developer/technicalArticles/Programming/HPROF.html. 
++https://docs.oracle.com/javase/7/docs/technotes/samples/hprof.html.
+ .RE
+ 
+ .LP
+@@ -134,7 +134,7 @@
+ .na
+ \f2hprof \- Heap and CPU profiling tool\fP @
+ .fi
+-http://java.sun.com/developer/technicalArticles/Programming/HPROF.html 
++https://docs.oracle.com/javase/7/docs/technotes/samples/hprof.html.
+ .RE
+ 
+ .LP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/pr2201-support_giflib_5.1.patch	Thu Apr 09 01:09:00 2015 +0100
@@ -0,0 +1,27 @@
+# HG changeset patch
+# User andrew
+# Date 1423074043 0
+#      Wed Feb 04 18:20:43 2015 +0000
+# Node ID 1d647255f65b9561d9821b30b2eb6fd18fad6bad
+# Parent  a7b145722afff8d0677f991b43b35d1e6ec9d23a
+PR2200: Support giflib 5.1.0
+Contributed-by: fridrich.strba@suse.com
+
+diff -r a7b145722aff -r 1d647255f65b src/share/native/sun/awt/splashscreen/splashscreen_gif.c
+--- openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c	Wed Feb 04 18:16:47 2015 +0000
++++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c	Wed Feb 04 18:20:43 2015 +0000
+@@ -310,7 +310,14 @@
+     free(pBitmapBits);
+     free(pOldBitmapBits);
+ 
++#if GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
++    int error = 0;
++    DGifCloseFile(gif, &error);
++    if (error)
++        return 0;
++#else
+     DGifCloseFile(gif);
++#endif
+ 
+     return 1;
+ }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/pr2211-check_dgifclosefile_return.patch	Thu Apr 09 01:09:00 2015 +0100
@@ -0,0 +1,23 @@
+# HG changeset patch
+# User andrew
+# Date 1423101914 0
+#      Thu Feb 05 02:05:14 2015 +0000
+# Node ID 3b9f3d7c767ec8d2e8d65c7b819aa135cf9af21e
+# Parent  1d647255f65b9561d9821b30b2eb6fd18fad6bad
+PR2210: DGifCloseFile call should check the return value, not the error code, for failure
+Summary: Avoid passing in an integer reference at all and just use the return value.
+
+diff -r 1d647255f65b -r 3b9f3d7c767e src/share/native/sun/awt/splashscreen/splashscreen_gif.c
+--- openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c	Wed Feb 04 18:20:43 2015 +0000
++++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c	Thu Feb 05 02:05:14 2015 +0000
+@@ -311,9 +311,7 @@
+     free(pOldBitmapBits);
+ 
+ #if GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+-    int error = 0;
+-    DGifCloseFile(gif, &error);
+-    if (error)
++    if (DGifCloseFile(gif, NULL) == GIF_ERROR)
+         return 0;
+ #else
+     DGifCloseFile(gif);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/pr2226-support_future_giflib_6_and_up.patch	Thu Apr 09 01:09:00 2015 +0100
@@ -0,0 +1,21 @@
+# HG changeset patch
+# User andrew
+# Date 1423585468 0
+#      Tue Feb 10 16:24:28 2015 +0000
+# Node ID 8e740701950bbfd435a8bbe1a39694bf8096d96e
+# Parent  f8795ed79ba60e5ae655b74ebc27228597419b71
+PR2225: giflib 5.1 conditional excludes 6.0, 7.0, etc.
+Summary: Future-proof the giflib 5.1 support
+
+diff -r f8795ed79ba6 -r 8e740701950b src/share/native/sun/awt/splashscreen/splashscreen_gif.c
+--- openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c	Thu Feb 05 16:11:10 2015 +0000
++++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c	Tue Feb 10 16:24:28 2015 +0000
+@@ -310,7 +310,7 @@
+     free(pBitmapBits);
+     free(pOldBitmapBits);
+ 
+-#if GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
++#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
+     if (DGifCloseFile(gif, NULL) == GIF_ERROR)
+         return 0;
+ #else