Mercurial > hg > release > icedtea6-1.13
changeset 3149:a80478e9e6ee
S7027300, RH1098399: Unsynchronized HashMap access causes endless loop
2014-05-22 Andrew John Hughes <gnu.andrew@redhat.com>
* Makefile.am:
(ICEDTEA_PATCHES): Add new patch.
* NEWS: Updated.
* patches/openjdk/7027300-unsync_hashmap_causes_endless_loop.patch:
Backport fix to replace HashMap usage with ConcurrentHashMap,
avoiding deadlock.
author | Andrew John Hughes <gnu.andrew@redhat.com> |
---|---|
date | Wed, 28 May 2014 12:25:46 +0100 |
parents | c48649311b8f |
children | 3d9c006eaf4f |
files | ChangeLog Makefile.am NEWS patches/openjdk/7027300-unsync_hashmap_causes_endless_loop.patch |
diffstat | 4 files changed, 47 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri May 09 13:19:29 2014 +0200 +++ b/ChangeLog Wed May 28 12:25:46 2014 +0100 @@ -1,3 +1,12 @@ +2014-05-22 Andrew John Hughes <gnu.andrew@redhat.com> + + * Makefile.am: + (ICEDTEA_PATCHES): Add new patch. + * NEWS: Updated. + * patches/openjdk/7027300-unsync_hashmap_causes_endless_loop.patch: + Backport fix to replace HashMap usage with ConcurrentHashMap, + avoiding deadlock. + 2014-05-09 Jiri Vanek <jvanek@redhat.com> * Makefile.am: (add-nss-debug.stamp): fixed ECJ_BUILD_OUTPUT_DIR
--- a/Makefile.am Fri May 09 13:19:29 2014 +0200 +++ b/Makefile.am Wed May 28 12:25:46 2014 +0100 @@ -611,7 +611,8 @@ patches/windows-jdk-sizecalc.patch \ patches/shark_fixes_from_8003868.patch \ patches/8003992_support_6.patch \ - patches/shark-drop_compile_method_arg_following_7083786.patch + patches/shark-drop_compile_method_arg_following_7083786.patch \ + patches/openjdk/7027300-unsync_hashmap_causes_endless_loop.patch if WITH_RHINO ICEDTEA_PATCHES += \
--- a/NEWS Fri May 09 13:19:29 2014 +0200 +++ b/NEWS Wed May 28 12:25:46 2014 +0100 @@ -14,6 +14,9 @@ New in release 1.13.4 (2014-07-XX): +* Backports + - S7027300, RH1098399: Unsynchronized HashMap access causes endless loop + New in release 1.13.3 (2014-04-15): * Security fixes
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/7027300-unsync_hashmap_causes_endless_loop.patch Wed May 28 12:25:46 2014 +0100 @@ -0,0 +1,33 @@ +# HG changeset patch +# User vkarnauk +# Date 1340286118 -14400 +# Thu Jun 21 17:41:58 2012 +0400 +# Node ID f71b6117fd7bbb13ed4c1f68ace873695edd49cb +# Parent 762ae4a20c8b115e5cb486c5204d8bdee747ee59 +7027300: Unsynchronized HashMap access causes endless loop +Reviewed-by: bae, prr + +diff -r 762ae4a20c8b -r f71b6117fd7b src/share/classes/sun/font/SunLayoutEngine.java +--- openjdk/jdk/src/share/classes/sun/font/SunLayoutEngine.java Thu Jun 21 14:19:12 2012 +0400 ++++ openjdk/jdk/src/share/classes/sun/font/SunLayoutEngine.java Thu Jun 21 17:41:58 2012 +0400 +@@ -33,7 +33,7 @@ + import sun.font.GlyphLayout.*; + import java.awt.geom.Point2D; + import java.lang.ref.SoftReference; +-import java.util.HashMap; ++import java.util.concurrent.ConcurrentHashMap; + import java.util.Locale; + + /* +@@ -129,9 +129,9 @@ + + // !!! don't need this unless we have more than one sun layout engine... + public LayoutEngine getEngine(LayoutEngineKey key) { +- HashMap cache = (HashMap)cacheref.get(); ++ ConcurrentHashMap cache = (ConcurrentHashMap)cacheref.get(); + if (cache == null) { +- cache = new HashMap(); ++ cache = new ConcurrentHashMap(); + cacheref = new SoftReference(cache); + } +