Mercurial > hg > release > icedtea6-1.11
changeset 2619:562d984677e8
Backport of 6918065 fix.
author | ptisnovs |
---|---|
date | Mon, 27 Jun 2011 17:46:58 +0200 |
parents | 6c45515ce78a |
children | ec4f9f18e7b6 |
files | ChangeLog Makefile.am NEWS patches/openjdk/6918065-Crash_in_Java2D_blit_loop.patch |
diffstat | 4 files changed, 68 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jun 27 16:21:50 2011 +0200 +++ b/ChangeLog Mon Jun 27 17:46:58 2011 +0200 @@ -1,3 +1,10 @@ +2011-06-27 Pavel Tisnovsky <ptisnovs@redhat.com> + + * Makefile.am: added new patch + * NEWS: updated with backport + * patches/openjdk/6918065-Crash_in_Java2D_blit_loop.patch: + Backport of 6918065 fix. + 2011-06-27 Xerxes RĂ„nby <xerxes@zafena.se> JamVM
--- a/Makefile.am Mon Jun 27 16:21:50 2011 +0200 +++ b/Makefile.am Mon Jun 27 17:46:58 2011 +0200 @@ -365,7 +365,8 @@ patches/jtreg-MappedByteBuffer-Basic.patch \ patches/openjdk/7008106-WindowOpacity.patch \ patches/openjdk/6956668-misbehavior_of_XOR_operator_with_int.patch \ - patches/openjdk/6699843-IllegalArgumentException_drawString.patch + patches/openjdk/6699843-IllegalArgumentException_drawString.patch \ + patches/openjdk/6918065-Crash_in_Java2D_blit_loop.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \
--- a/NEWS Mon Jun 27 16:21:50 2011 +0200 +++ b/NEWS Mon Jun 27 17:46:58 2011 +0200 @@ -37,6 +37,7 @@ - S7008106: com/sun/awt/Translucency/WindowOpacity.java test fails. - S6956668: misbehavior of XOR operator (^) with int - S6699843: IllegalArgumentException when using Graphics.drawString( "", 0, 0 ) + - S6918065: Crash in Java2D blit loop (IntArgbToIntArgbPreSrcOverMaskBlit) in 64bit mode * Bug fixes - PR637: make check should exit with an error code if any regression test failed. - G356743: Support libpng 1.5.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6918065-Crash_in_Java2D_blit_loop.patch Mon Jun 27 17:46:58 2011 +0200 @@ -0,0 +1,58 @@ +# HG changeset patch +# User minqi +# Date 1268076930 28800 +# Node ID 1d7db2d5c4c5eeea61b23a6f6ca4d304dec8df10 +# Parent 840601ac5ab7cf49421e9de10c9c36c8f958d9cf +6918065: Crash in Java2D blit loop (IntArgbToIntArgbPreSrcOverMaskBlit) in 64bit mode +Reviewed-by: igor, bae + +diff -r 840601ac5ab7 -r 1d7db2d5c4c5 src/share/classes/java/awt/AlphaComposite.java +--- openjdk.orig/jdk/src/share/classes/java/awt/AlphaComposite.java Wed Mar 03 15:50:33 2010 +0100 ++++ openjdk/jdk/src/share/classes/java/awt/AlphaComposite.java Mon Mar 08 11:35:30 2010 -0800 +@@ -614,14 +614,15 @@ + } + + private AlphaComposite(int rule, float alpha) { +- if (alpha < 0.0f || alpha > 1.0f) { +- throw new IllegalArgumentException("alpha value out of range"); +- } + if (rule < MIN_RULE || rule > MAX_RULE) { + throw new IllegalArgumentException("unknown composite rule"); + } +- this.rule = rule; +- this.extraAlpha = alpha; ++ if (alpha >= 0.0f && alpha <= 1.0f) { ++ this.rule = rule; ++ this.extraAlpha = alpha; ++ } else { ++ throw new IllegalArgumentException("alpha value out of range"); ++ } + } + + /** +diff -r 840601ac5ab7 -r 1d7db2d5c4c5 test/java/awt/AlphaComposite/TestAlphaCompositeForNaN.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/java/awt/AlphaComposite/TestAlphaCompositeForNaN.java Mon Mar 08 11:35:30 2010 -0800 +@@ -0,0 +1,22 @@ ++/* ++ * @test ++ * @bug 6918065 ++ * @summary Test for passing NaN as alpha ++ * should throw IllegalArgumentException ++ */ ++ ++import java.awt.*; ++ ++public class TestAlphaCompositeForNaN { ++ public static void main(String[] args) { ++ try { ++ AlphaComposite a = AlphaComposite.getInstance(AlphaComposite.DST, Float.NaN); ++ System.out.println("Failed"); ++ throw new RuntimeException(a + " failed to throw IllegalArgumentException for alpha = " + Float.NaN); ++ } ++ catch (IllegalArgumentException ie) { ++ System.out.println("Passed"); ++ System.out.println("Caught " + ie); ++ } ++ } ++}