From jfabriko at redhat.com Mon Oct 1 00:59:53 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Mon, 01 Oct 2012 09:59:53 +0200 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "get" tests Message-ID: <50694D79.6080908@redhat.com> 2012-10-01 Jana Fabrikova * /tests/reproducers/simple/JSToJGet: adding a new reproducer for the first LiveConnect test (Tests for getting members from Java side.) I would like to ask for review of the attached patch, thank you, Jana -------------- next part -------------- A non-text attachment was scrubbed... Name: adding_JSToJGet_reproducer.patch Type: text/x-patch Size: 26577 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121001/a50c284d/adding_JSToJGet_reproducer.patch From helpcrypto at gmail.com Mon Oct 1 01:01:42 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Mon, 1 Oct 2012 10:01:42 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: References: <20120926154513.GQ23406@redhat.com> Message-ID: so...any idea? Should i file a bug? On Wed, Sep 26, 2012 at 6:02 PM, helpcrypto helpcrypto wrote: >> Hi, >> >> That property looks correct to me. It is odd that it is null. > > Linux pc 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 16:39:45 UTC > 2012 i686 athlon i386 GNU/Linux > > java version "1.7.0_07" > OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-0ubuntu0.12.04.1) > OpenJDK Client VM (build 23.2-b09, mixed mode, sharing) > > ii icedtea-7-jre-jamvm 7u7-2.3.2a-0ubuntu0.12.04.1 > Alternative JVM for OpenJDK, using JamVM > ii openjdk-7-jre 7u7-2.3.2a-0ubuntu0.12.04.1 > OpenJDK Java runtime, using Hotspot JIT > ii openjdk-7-jre-headless 7u7-2.3.2a-0ubuntu0.12.04.1 > OpenJDK Java runtime, using Hotspot JIT (headless) > ii openjdk-7-jre-lib 7u7-2.3.2a-0ubuntu0.12.04.1 > OpenJDK Java runtime (architecture independent libraries) > ii icedtea-7-jre-jamvm 7u7-2.3.2a-0ubuntu0.12.04.1 > Alternative JVM for OpenJDK, using JamVM > ii icedtea-7-plugin 1.2-2ubuntu1.2 > web browser plugin based on OpenJDK and IcedTea to execute > Java applets > ii icedtea-netx 1.2-2ubuntu1.2 > NetX - implementation of the Java Network Launching > Protocol (JNLP) > ii icedtea-netx-common 1.2-2ubuntu1.2 > NetX - implementation of the Java Network Launching > Protocol (JNLP) > > Mozilla Firefox 15.0.1 > /etc/alternatives/mozilla-javaplugin.so -> > /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/IcedTeaPlugin.so > >> java.stderr should have the full trace unless it is being swallowed >> unintentionally somewhere. > > My System.out.println messages are on stdout, while other things are > on stderr (thats quite ok, in fact). > Is there something like a Java Console??? or a way to have them all > merged as a trace? > >> Why do you need to access the trust store via the applet by the way? > > To add a trusted cert to keystore (its working like a configuration applet) > > > Thanks a lot for your help! From ptisnovs at icedtea.classpath.org Mon Oct 1 01:27:18 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 01 Oct 2012 08:27:18 +0000 Subject: /hg/gfx-test: Updated javadoc in Message-ID: changeset 243a51c7b2ad in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=243a51c7b2ad author: Pavel Tisnovsky date: Mon Oct 01 10:29:42 2012 +0200 Updated javadoc in src/org/gfxtest/testsuites/BitBltBasicTests.java. diffstat: ChangeLog | 5 ++ src/org/gfxtest/testsuites/BitBltBasicTests.java | 57 ++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 0 deletions(-) diffs (471 lines): diff -r a2b002fd8cf5 -r 243a51c7b2ad ChangeLog --- a/ChangeLog Wed Sep 26 11:51:29 2012 +0200 +++ b/ChangeLog Mon Oct 01 10:29:42 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-01 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltBasicTests.java: + Updated javadoc. + 2012-09-26 Pavel Tisnovsky * src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java: diff -r a2b002fd8cf5 -r 243a51c7b2ad src/org/gfxtest/testsuites/BitBltBasicTests.java --- a/src/org/gfxtest/testsuites/BitBltBasicTests.java Wed Sep 26 11:51:29 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltBasicTests.java Mon Oct 01 10:29:42 2012 +0200 @@ -88,6 +88,7 @@ */ public TestResult testBitBltEmptyBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR); } @@ -102,6 +103,7 @@ */ public TestResult testBitBltEmptyBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR); } @@ -116,6 +118,7 @@ */ public TestResult testBitBltEmptyBufferedImageType4ByteABGR_Pre(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE); } @@ -130,6 +133,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -144,6 +148,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); } @@ -158,6 +163,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); } @@ -172,6 +178,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE); } @@ -186,6 +193,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_BGR); } @@ -200,6 +208,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB); } @@ -214,6 +223,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB); } @@ -228,6 +238,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY); } @@ -242,6 +253,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY); } @@ -256,6 +268,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -270,6 +283,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); } @@ -284,6 +298,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_BGR); } @@ -298,6 +313,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); } @@ -312,6 +328,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE); } @@ -326,6 +343,7 @@ */ public TestResult testBitBltCheckerBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR); } @@ -340,6 +358,7 @@ */ public TestResult testBitBltCheckerBufferedImageType4ByteABGR_PRE(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE); } @@ -354,6 +373,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY); } @@ -368,6 +388,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY); } @@ -382,6 +403,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB); } @@ -396,6 +418,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB); } @@ -410,6 +433,7 @@ */ public TestResult testBitBltCheckerBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR); } @@ -424,6 +448,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -438,6 +463,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); } @@ -452,6 +478,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_BGR); } @@ -466,6 +493,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); } @@ -480,6 +508,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE); } @@ -494,6 +523,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR); } @@ -508,6 +538,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageType4ByteABGR_PRE(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE); } @@ -522,6 +553,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY); } @@ -536,6 +568,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY); } @@ -550,6 +583,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB); } @@ -564,6 +598,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB); } @@ -578,6 +613,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR); } @@ -592,6 +628,7 @@ */ public TestResult testBitBltGridBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -606,6 +643,7 @@ */ public TestResult testBitBltGridBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); } @@ -620,6 +658,7 @@ */ public TestResult testBitBltGridBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_INT_BGR); } @@ -634,6 +673,7 @@ */ public TestResult testBitBltGridBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); } @@ -648,6 +688,7 @@ */ public TestResult testBitBltGridBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE); } @@ -662,6 +703,7 @@ */ public TestResult testBitBltGridBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR); } @@ -676,6 +718,7 @@ */ public TestResult testBitBltGridBufferedImageType4ByteABGR_PRE(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE); } @@ -690,6 +733,7 @@ */ public TestResult testBitBltGridBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY); } @@ -704,6 +748,7 @@ */ public TestResult testBitBltGridBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY); } @@ -718,6 +763,7 @@ */ public TestResult testBitBltGridBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB); } @@ -732,6 +778,7 @@ */ public TestResult testBitBltGridBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB); } @@ -746,6 +793,7 @@ */ public TestResult testBitBltGridBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR); } @@ -761,6 +809,7 @@ */ public TestResult testBitBltDiagonalGridBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -776,6 +825,7 @@ */ public TestResult testBitBltHorizontalStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -791,6 +841,7 @@ */ public TestResult testBitBltVerticalStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -806,6 +857,7 @@ */ public TestResult testBitBltDiagonalStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -821,6 +873,7 @@ */ public TestResult testBitBltHorizontalColorStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -836,6 +889,7 @@ */ public TestResult testBitBltVerticalColorStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -851,6 +905,7 @@ */ public TestResult testBitBltDiagonalColorStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -866,6 +921,7 @@ */ public TestResult testBitBltBWDotsImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithBWDotsImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -881,6 +937,7 @@ */ public TestResult testBitBltColorDotsImageTypeByteIntARGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithColorDotsImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); } From ptisnovs at icedtea.classpath.org Mon Oct 1 01:40:29 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 01 Oct 2012 08:40:29 +0000 Subject: /hg/rhino-tests: Added five new tests to the test suite src/org/... Message-ID: changeset 581f4fa2e76f in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=581f4fa2e76f author: Pavel Tisnovsky date: Mon Oct 01 10:43:13 2012 +0200 Added five new tests to the test suite src/org/RhinoTests/ScriptExceptionClassTest.java. diffstat: ChangeLog | 5 ++ src/org/RhinoTests/ScriptExceptionClassTest.java | 56 +++++++++++++++++++++++- 2 files changed, 60 insertions(+), 1 deletions(-) diffs (85 lines): diff -r a3b0d341d76b -r 581f4fa2e76f ChangeLog --- a/ChangeLog Wed Sep 26 11:26:17 2012 +0200 +++ b/ChangeLog Mon Oct 01 10:43:13 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-01 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptExceptionClassTest.java: + Added five new tests to this test suite. + 2012-09-26 Pavel Tisnovsky * src/org/RhinoTests/AbstractScriptEngineClassTest.java: diff -r a3b0d341d76b -r 581f4fa2e76f src/org/RhinoTests/ScriptExceptionClassTest.java --- a/src/org/RhinoTests/ScriptExceptionClassTest.java Wed Sep 26 11:26:17 2012 +0200 +++ b/src/org/RhinoTests/ScriptExceptionClassTest.java Mon Oct 01 10:43:13 2012 +0200 @@ -67,7 +67,7 @@ /** * Object that represents the type of ScriptException. */ - Class scriptExceptionClass = null; + Class scriptExceptionClass = null; @Override protected void setUp(String[] args) { @@ -138,6 +138,60 @@ } /** + * Test for method javax.script.ScriptException.getClass().isAnnotation() + */ + protected void testIsAnnotation() { + assertFalse(this.scriptExceptionClass.isAnnotation(), + "Method ScriptException.getClass().isAnnotation() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptException.getClass().isAnnotationPresent() + */ + protected void testIsAnnotationPresent() { + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.annotation.Annotation.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.annotation.Documented.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.annotation.Inherited.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.annotation.Retention.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.annotation.Target.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.Deprecated.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.Override.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value"); + assertFalse(this.scriptExceptionClass.isAnnotationPresent(java.lang.SuppressWarnings.class), + "Method ScriptException.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value"); + } + + /** + * Test for method javax.script.ScriptException.getClass().isAnonymousClass() + */ + protected void testIsAnonymousClass() { + assertFalse(this.scriptExceptionClass.isAnonymousClass(), + "Method ScriptException.getClass().isAnonymousClass() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptException.getClass().isArray() + */ + protected void testIsArray() { + assertFalse(this.scriptExceptionClass.isArray(), + "Method ScriptException.getClass().isArray() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptException.getClass().isEnum() + */ + protected void testIsEnum() { + assertFalse(this.scriptExceptionClass.isEnum(), + "Method ScriptException.getClass().isEnum() returns wrong value"); + } + + /** * Test for method javax.script.ScriptException.getClass().getInterfaces() */ protected void testGetInterfaces() { From ptisnovs at redhat.com Mon Oct 1 05:12:13 2012 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Mon, 1 Oct 2012 08:12:13 -0400 (EDT) Subject: [rfc][icedtea-web] a new reproducer LiveConnect "get" tests In-Reply-To: <50694D79.6080908@redhat.com> Message-ID: <937119746.4428687.1349093533008.JavaMail.root@redhat.com> Hi Jana, this new reproducer seems almost ok. I have just two minor objections: 1) JSToJGetTest.java - (c) year should be 2012 2) JSToJGetTest.java - could you please replace by space(s)? With these changes I'm ok with push to IT-web HEAD. Thank you! Pavel ----- Jana Fabrikova wrote: > 2012-10-01 Jana Fabrikova > > * /tests/reproducers/simple/JSToJGet: > adding a new reproducer for the first LiveConnect > test (Tests for getting members from Java side.) > > > I would like to ask for review of the attached patch, > thank you, > Jana From omajid at redhat.com Mon Oct 1 05:14:49 2012 From: omajid at redhat.com (Omair Majid) Date: Mon, 01 Oct 2012 08:14:49 -0400 Subject: Moving applet from Oracle jre: first tries In-Reply-To: References: <20120926154513.GQ23406@redhat.com> Message-ID: <50698939.8050107@redhat.com> On 10/01/2012 04:01 AM, helpcrypto helpcrypto wrote: > so...any idea? Should i file a bug? Yes, please. I think we don't expose deployment properties as system properties in icedtea-web. We should fix this. Thanks, Omair From bugzilla-daemon at icedtea.classpath.org Mon Oct 1 05:26:02 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 01 Oct 2012 12:26:02 +0000 Subject: [Bug 1186] New: System.getProperty("deployment.user.security.trusted.cacerts") is null Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1186 Priority: P3 Bug ID: 1186 CC: unassigned at icedtea.classpath.org Assignee: dbhole at redhat.com Summary: System.getProperty("deployment.user.security.trusted.c acerts") is null Severity: normal Classification: Unclassified OS: Linux Reporter: helpcrypto at gmail.com Hardware: x86 Status: NEW Version: unspecified Component: Plugin Product: IcedTea-Web System.getProperty("deployment.user.security.trusted.cacerts") is null (and it shouldn't) Linux pc 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 16:39:45 UTC 2012 i686 athlon i386 GNU/Linux java version "1.7.0_07" OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-0ubuntu0.12.04.1) OpenJDK Client VM (build 23.2-b09, mixed mode, sharing) ii icedtea-7-jre-jamvm 7u7-2.3.2a-0ubuntu0.12.04.1 Alternative JVM for OpenJDK, using JamVM ii openjdk-7-jre 7u7-2.3.2a-0ubuntu0.12.04.1 OpenJDK Java runtime, using Hotspot JIT ii openjdk-7-jre-headless 7u7-2.3.2a-0ubuntu0.12.04.1 OpenJDK Java runtime, using Hotspot JIT (headless) ii openjdk-7-jre-lib 7u7-2.3.2a-0ubuntu0.12.04.1 OpenJDK Java runtime (architecture independent libraries) ii icedtea-7-jre-jamvm 7u7-2.3.2a-0ubuntu0.12.04.1 Alternative JVM for OpenJDK, using JamVM ii icedtea-7-plugin 1.2-2ubuntu1.2 web browser plugin based on OpenJDK and IcedTea to execute Java applets ii icedtea-netx 1.2-2ubuntu1.2 NetX - implementation of the Java Network Launching Protocol (JNLP) ii icedtea-netx-common 1.2-2ubuntu1.2 NetX - implementation of the Java Network Launching Protocol (JNLP) Mozilla Firefox 15.0.1 /etc/alternatives/mozilla-javaplugin.so -> /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/IcedTeaPlugin.so -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121001/bb70ff12/attachment.html From adomurad at redhat.com Mon Oct 1 13:41:58 2012 From: adomurad at redhat.com (Adam Domurad) Date: Mon, 01 Oct 2012 16:41:58 -0400 Subject: [RFC][icedtea-web]: Reproducer for DownloadService In-Reply-To: <50609FA3.8040701@redhat.com> References: <50609FA3.8040701@redhat.com> Message-ID: <1349124118.17801.108.camel@adomurad-desktop> On Mon, 2012-09-24 at 14:00 -0400, Saad Mohammad wrote: > Hi, > > The patch attached is the reproducer for DownloadService. The implementation > patch is still under review and can be found at: > > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-September/020330.html > > Thanks. Thanks for the reproducer of the DownloadService API. There's a few general concerns here (Mostly a result of this being hard to test): 1. this generally looks like a unit test - As discussed on IRC, this is probably OK considering that its quite difficult to unit test DownloadService in isolation. 2. checking for 'true' or 'false' is a bit brittle, it'd be better if you could print all the cached resources and having the test check - Also discussed on IRC, this would be difficult to do with the given API for handling cached resources 3. its all one interdependent test, ran as one process. I think a slightly better approach would be to take an argument to DownloadServiceRunner that determines the test run type, and run the minimal commands needed to test that component. For example, loadExternalResource could be tested in isolation from loadPart. Given the difficulties though, this is still a lot better than leaving it untested. Some more comments inline. > diff --git a/tests/reproducers/signed/DownloadService/resources/DownloadService.jnlp b/tests/reproducers/signed/DownloadService/resources/DownloadService.jnlp > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/signed/DownloadService/resources/DownloadService.jnlp > @@ -0,0 +1,64 @@ > + > + > + > + > + DownloadService > + IcedTea > + > + DownloadService > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > diff --git a/tests/reproducers/signed/DownloadService/resources/DownloadServiceExtension.jnlp b/tests/reproducers/signed/DownloadService/resources/DownloadServiceExtension.jnlp > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/signed/DownloadService/resources/DownloadServiceExtension.jnlp > @@ -0,0 +1,58 @@ > + > + > + > + > + DownloadServiceExtension > + IcedTea > + > + DownloadServiceExtension > + > + > + > + > + > + > + > + > + > + > + > diff --git a/tests/reproducers/signed/DownloadService/srcs/DownloadServiceRunner.java b/tests/reproducers/signed/DownloadService/srcs/DownloadServiceRunner.java > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/signed/DownloadService/srcs/DownloadServiceRunner.java > @@ -0,0 +1,297 @@ > +/* DownloadService.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import java.io.IOException; > +import java.net.MalformedURLException; > +import java.net.URL; > + > +import javax.jnlp.DownloadService; > +import javax.jnlp.ServiceManager; > +import javax.jnlp.UnavailableServiceException; > + > +public class DownloadServiceRunner { > + > + URL serverUrl = null; > + URL extensionUrl = null; > + URL NonExistingUrl = null; > + > + URL urlToExternalResource = null; > + > + /** > + * Launching jnlp and extension jnlp PARTS > + */ > + final String launchPartOne = "one"; > + final String launchPartTwo = "two"; > + final String extensionPartOne = "extOne"; > + final String nonExistingPart = "random"; > + > + /** > + * Parts in Array > + */ > + final String[] validLaunchParts = { "one", "two" }; > + final String[] halfValidLaunchParts = { "one", "random" }; > + final String[] validExtensionParts = { "extOne" }; > + final String[] halfValidExtensionParts = { "extOne", "random" }; > + final String[] invalidParts = { "random2", "random" }; Could reuse the constants you defined above for a little bit more clarity, but do as you will. > + > + private static DownloadService downloadService; > + static { > + try { > + downloadService = (DownloadService) ServiceManager.lookup("javax.jnlp.DownloadService"); > + } catch (UnavailableServiceException ex) { > + System.err.println("DownloadService is not available."); > + } > + } > + > + public DownloadServiceRunner(String urlToServer) throws MalformedURLException { > + serverUrl = new URL(urlToServer); > + extensionUrl = new URL(urlToServer + "DownloadServiceExtension.jnlp"); > + NonExistingUrl = new URL(urlToServer + "NONEXISTINGFILE.JNLP"); > + > + urlToExternalResource = new URL(urlToServer + "EmptySignedJar.jar"); > + > + System.out.println(extensionUrl.toString()); > + } > + > + /** > + * Checks the cache status of resources using isPartCached() > + */ > + private void checkCache() throws MalformedURLException { > + System.out.println("CHECKCACHE-isPartCached: LaunchPartOne: " + downloadService.isPartCached(launchPartOne)); > + System.out.println("CHECKCACHE-isPartCached: LaunchPartTwo: " + downloadService.isPartCached(launchPartTwo)); > + System.out.println("CHECKCACHE-isPartCached: NonExistingPart: " + downloadService.isPartCached(nonExistingPart)); > + } > + > + /** > + * Checks the cache status of resources using isPartCached([]) - an array with part names > + */ > + private void checkCacheUsingMultipleParts() throws MalformedURLException { > + System.out.println("CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): ValidLaunchParts: " + downloadService.isPartCached(validLaunchParts)); > + System.out.println("CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): HalfValidLaunchParts: " + downloadService.isPartCached(halfValidLaunchParts)); > + System.out.println("CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): InvalidParts: " + downloadService.isPartCached(invalidParts)); > + } > + > + /** > + * Checks the cache status of extension resources using isExtensionPartCached() > + */ > + private void checkExtensionCache() throws MalformedURLException { > + System.out.println("CHECKEXTENSIONCACHE-isExtensionPartCached: ExtensionPartOne: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + System.out.println("CHECKEXTENSIONCACHE-isExtensionPartCached: NonExistingPart: " > + + downloadService.isExtensionPartCached(extensionUrl, null, nonExistingPart)); > + System.out.println("CHECKEXTENSIONCACHE-isExtensionPartCached: NonExistingUrl: " > + + downloadService.isExtensionPartCached(NonExistingUrl, null, extensionPartOne)); > + } > + > + /** > + * Checks the cache status of extension resources using isExtensionPartCached([]) - an array with part names > + */ > + private void checkExtensionCacheUsingMultipleParts() throws MalformedURLException { > + System.out.println("CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): ValidExtensionParts: " > + + downloadService.isExtensionPartCached(extensionUrl, null, validExtensionParts)); > + System.out.println("CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): HalfValidExtensionParts: " > + + downloadService.isExtensionPartCached(extensionUrl, null, halfValidExtensionParts)); > + System.out.println("CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): InvalidParts: " > + + downloadService.isExtensionPartCached(NonExistingUrl, null, invalidParts)); > + } > + > + /** > + * Checks the cache status of external (not mentioned in jnlps) resources using isResourceCached() > + */ > + private void checkExternalCache() { > + System.out.println("CHECKEXTERNALCACHE-isResourceCached: UrlToExternalResource: " + downloadService.isResourceCached(urlToExternalResource, null)); > + System.out.println("CHECKEXTERNALCACHE-isResourceCached: NonExistingUrl: " + downloadService.isResourceCached(NonExistingUrl, null)); > + } > + > + /** > + * Removes resources from cache using removePart() > + */ > + private void removePart() throws IOException { > + System.out.println("REMOVEPART-removePart: LaunchPartOne-BEFORE: " + downloadService.isPartCached(launchPartOne)); > + downloadService.removePart(launchPartOne); > + System.out.println("REMOVEPART-removePart: LaunchPartOne-AFTER: " + downloadService.isPartCached(launchPartOne)); > + > + System.out.println("REMOVEPART-removePart: LaunchPartTwo-BEFORE: " + downloadService.isPartCached(launchPartTwo)); > + downloadService.removePart(launchPartTwo); > + System.out.println("REMOVEPART-removePart: LaunchPartTwo-AFTER: " + downloadService.isPartCached(launchPartTwo)); > + } > + > + /** > + * Removes extension resources from cache using isExtensionPartCached() > + */ > + private void removeExtensionPart() throws IOException { > + System.out.println("REMOVEEXTENSIONPART-removeExtensionPart: ExtensionPartOne-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + downloadService.removeExtensionPart(extensionUrl, null, extensionPartOne); > + System.out.println("REMOVEEXTENSIONPART-removeExtensionPart: ExtensionPartOne-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + } > + > + /** > + * Removes extension resources using part array (all parts exist) from cache using isExtensionPartCached() > + */ > + private void removeExtensionUsingValidPartInArray() throws IOException { > + System.out.println("REMOVEEXTENSIONUSINGVALIDPARTINARRAY-removeExtensionPart(Array): ValidExtensionParts-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + > + downloadService.removeExtensionPart(extensionUrl, null, validExtensionParts); > + > + System.out.println("REMOVEEXTENSIONUSINGVALIDPARTINARRAY-removeExtensionPart(Array): ValidExtensionParts-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + > + } > + > + /** > + * Removes extension resources using part array (one part exists, the other one does not) from cache using isExtensionPartCached() > + */ > + private void removeExtensionUsingHalfValidPartInArray() throws IOException { > + System.out.println("REMOVEEXTENSIONUSINGHALFVALIDPARTINARRAY-removeExtensionPart(Array): HalfValidExtensionParts-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + > + downloadService.removeExtensionPart(extensionUrl, null, halfValidExtensionParts); > + > + System.out.println("REMOVEEXTENSIONUSINGHALFVALIDPARTINARRAY-removeExtensionPart(Array): HalfValidExtensionParts-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + } > + > + /** > + * Removes external (not mentioned in jnlps) resources from cache using removeResource() > + */ > + private void removeExternalResource() throws IOException { > + System.out.println("REMOVEEXTERNALPART-removeResource: UrlToExternalResource-BEFORE: " + downloadService.isResourceCached(urlToExternalResource, null)); > + downloadService.removeResource(urlToExternalResource, null); > + System.out.println("REMOVEEXTERNALPART-removeResource: UrlToExternalResource-AFTER: " + downloadService.isResourceCached(urlToExternalResource, null)); > + } > + > + /** > + * Loads resources from cache using loadPart() > + */ > + private void loadPart() throws IOException { > + System.out.println("LOADPART-loadPart: LaunchPartOne-BEFORE: " + downloadService.isPartCached(launchPartOne)); > + downloadService.loadPart(launchPartOne, null); > + System.out.println("LOADPART-loadPart: LaunchPartOne-AFTER: " + downloadService.isPartCached(launchPartOne)); > + > + System.out.println("LOADPART-loadPart: LaunchPartTwo-BEFORE: " + downloadService.isPartCached(launchPartTwo)); > + downloadService.loadPart(launchPartTwo, null); > + System.out.println("LOADPART-loadPart: LaunchPartTwo-AFTER: " + downloadService.isPartCached(launchPartTwo)); > + } > + > + /** > + * Load extension resources from cache using loadExtensionPart() > + */ > + private void loadExtensionPart() throws IOException { > + System.out.println("LOADEXTENSIONPART-loadExtensionPart: ExtensionPartOne-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + downloadService.loadExtensionPart(extensionUrl, null, extensionPartOne, null); > + System.out.println("LOADEXTENSIONPART-loadExtensionPart: ExtensionPartOne-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + } > + > + /** > + * Loads extension resources using part array (all parts exist) from cache using isExtensionPartCached() > + */ > + private void loadExtensionUsingValidPartInArray() throws IOException { > + System.out.println("LOADEXTENSIONUSINGVALIDPARTINARRAY-loadExtensionPart(Array): ValidExtensionParts-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + > + downloadService.loadExtensionPart(extensionUrl, null, validExtensionParts, null); > + > + System.out.println("LOADEXTENSIONUSINGVALIDPARTINARRAY-loadExtensionPart(Array): ValidExtensionParts-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + > + } > + > + /** > + * Loads extension resources using part array (one part exists, the other one does not) from cache using isExtensionPartCached() > + */ > + private void loadExtensionUsingHalfValidPartInArray() throws IOException { > + System.out.println("LOADEXTENSIONUSINGHALFVALIDPARTINARRAY-loadExtensionPart(Array): HalfValidExtensionParts-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + > + downloadService.loadExtensionPart(extensionUrl, null, halfValidExtensionParts, null); > + > + System.out.println("LOADEXTENSIONUSINGHALFVALIDPARTINARRAY-loadExtensionPart(Array): HalfValidExtensionParts-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, null, extensionPartOne)); > + } > + > + /** > + * Loads external (not mentioned in jnlps) resources from cache using removeResource() > + */ > + private void loadExternalResource() throws IOException { > + System.out.println("LOADEXTERNALRESOURCE-loadResource: UrlToExternalResource-BEFORE: " + downloadService.isResourceCached(urlToExternalResource, null)); > + downloadService.loadResource(urlToExternalResource, null, null); > + System.out.println("LOADEXTERNALRESOURCE-loadResource: UrlToExternalResource-AFTER: " + downloadService.isResourceCached(urlToExternalResource, null)); > + } > + > + public static void main(String[] args) throws IOException, InterruptedException { > + System.out.println("Running DownloadService.."); > + > + if (args.length < 1) { > + return; > + } > + > + DownloadServiceRunner ds = new DownloadServiceRunner(args[0]); > + > + //Cache Resources > + ds.checkCache(); > + ds.checkCacheUsingMultipleParts(); > + ds.checkExtensionCache(); > + ds.checkExtensionCacheUsingMultipleParts(); > + ds.checkExternalCache(); > + > + //Remove Resources > + ds.removePart(); > + ds.removeExtensionPart(); > + > + //Load Resources > + ds.loadPart(); > + ds.loadExtensionPart(); > + > + //Load external Resource > + ds.removeExternalResource(); > + ds.loadExternalResource(); > + > + //Manage using multiple part arrays > + > + ds.removeExtensionUsingValidPartInArray(); > + ds.loadExtensionUsingValidPartInArray(); > + ds.removeExtensionUsingHalfValidPartInArray(); > + ds.loadExtensionUsingHalfValidPartInArray(); > + > + System.out.println("Exiting DownloadService.."); > + } > +} > diff --git a/tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java b/tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java > @@ -0,0 +1,263 @@ > +/* DownloadServiceTest.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import java.io.File; > +import java.util.ArrayList; > +import java.util.List; > + > +import junit.framework.Assert; > +import net.sourceforge.jnlp.ProcessResult; > +import net.sourceforge.jnlp.ServerAccess; > +import org.junit.BeforeClass; > +import org.junit.Test; > + > +public class DownloadServiceTest { > + > + private static ServerAccess server = new ServerAccess(); > + private static ProcessResult processResult; > + private static String stdout; > + private static String stderr; > + > + private static List commands = new ArrayList(); > + > + static { > + try { > + commands.add(server.getJavawsLocation()); > + commands.add("-arg"); > + commands.add(server.getUrl().toString() + "/"); > + commands.add("-Xtrustall"); > + commands.add(ServerAccess.HEADLES_OPTION); > + commands.add(server.getUrl() + "/DownloadService.jnlp"); > + } catch (Exception e) { > + System.out.println(e.getMessage()); > + } > + } > + > + @BeforeClass > + public static void initializeClass() throws Exception { > + processResult = ServerAccess.executeProcess(commands); > + stdout = processResult.stdout; > + stderr = processResult.stderr; > + } > + > + @Test > + public void checkIfRequiredResourcesExist() { > + //Jnlp files > + Assert.assertTrue("DownloadService.jnlp is a required resource that's missing.", > + new File(server.getDir().getAbsolutePath() + "/DownloadService.jnlp").isFile()); > + Assert.assertTrue("DownloadServiceExtension.jnlp is a required resource that's missing.", new File(server.getDir().getAbsolutePath() > + + "/DownloadServiceExtension.jnlp").isFile()); > + > + //Jar files > + Assert.assertTrue("DownloadService.jar is a required resource that's missing.", > + new File(server.getDir().getAbsolutePath() + "/DownloadService.jar").isFile()); > + Assert.assertTrue("SignedJnlpResource.jar is a required resource that's missing.", new File(server.getDir().getAbsolutePath() > + + "/SignedJnlpResource.jar").isFile()); > + Assert.assertTrue("SignedJarResource.jar is a required resource that's missing.", > + new File(server.getDir().getAbsolutePath() + "/SignedJarResource.jar").isFile()); > + Assert.assertTrue("MultiJar-NoSignedJnlp.jar is a required resource that's missing.", new File(server.getDir().getAbsolutePath() > + + "/MultiJar-NoSignedJnlp.jar").isFile()); > + } > + > + @Test > + public void checkIfMainClassFinishedCorrectly() { > + String s = "Exiting DownloadService.."; > + Assert.assertTrue( > + "DownloadServiceRunner class did not exit as expected. There maybe a problem with DownloadService and other tests may fail. View stdout/stderr logs for more details.", > + stdout.contains(s)); > + } > + > + @Test > + public void testDownloadServiceAvailability() { > + String s = "DownloadService is not available."; > + Assert.assertFalse(stderr.contains(s)); > + } > + > + @Test > + public void testCacheChecks() { > + String s = "CHECKCACHE-isPartCached: LaunchPartOne: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "CHECKCACHE-isPartCached: LaunchPartTwo: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "CHECKCACHE-isPartCached: NonExistingPart: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } I would prefer for these to test separate process runs as much as possible. As recommended above, the DownloadServiceRunner main class should probably take an argument that tells it what kind of test to run. > + > + @Test > + public void testCacheChecksUsingArray() { > + String s = "CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): ValidLaunchParts: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): HalfValidLaunchParts: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): InvalidParts: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } > + > + @Test > + public void testExtensionCacheChecks() { > + String s = "CHECKEXTENSIONCACHE-isExtensionPartCached: ExtensionPartOne: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "CHECKEXTENSIONCACHE-isExtensionPartCached: NonExistingPart: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "CHECKEXTENSIONCACHE-isExtensionPartCached: NonExistingUrl: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } > + > + @Test > + public void testExtensionCacheChecksUsingArray() { > + String s = "CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): ValidExtensionParts: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): HalfValidExtensionParts: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): InvalidParts: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + } > + > + @Test > + public void testExternalResourceChecks() { > + //This is automatically cached from the test engine because the .jar exists > + String s = "CHECKEXTERNALCACHE-isResourceCached: UrlToExternalResource: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "CHECKEXTERNALCACHE-isResourceCached: NonExistingUrl: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } > + > + @Test > + public void testRemovePart() { > + String s = "REMOVEPART-removePart: LaunchPartOne-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + s = "REMOVEPART-removePart: LaunchPartOne-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "REMOVEPART-removePart: LaunchPartTwo-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + s = "REMOVEPART-removePart: LaunchPartTwo-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } > + > + @Test > + public void testRemoveExtensionPart() { > + String s = "REMOVEEXTENSIONPART-removeExtensionPart: ExtensionPartOne-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "REMOVEEXTENSIONPART-removeExtensionPart: ExtensionPartOne-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } > + > + @Test > + public void testRemoveExtensionPartUsingArray() { > + String s = "REMOVEEXTENSIONUSINGVALIDPARTINARRAY-removeExtensionPart(Array): ValidExtensionParts-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "REMOVEEXTENSIONUSINGVALIDPARTINARRAY-removeExtensionPart(Array): ValidExtensionParts-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "REMOVEEXTENSIONUSINGHALFVALIDPARTINARRAY-removeExtensionPart(Array): HalfValidExtensionParts-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "REMOVEEXTENSIONUSINGHALFVALIDPARTINARRAY-removeExtensionPart(Array): HalfValidExtensionParts-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } > + > + @Test > + public void testRemoveExternalResource() > + { > + String s = "REMOVEEXTERNALPART-removeResource: UrlToExternalResource-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "REMOVEEXTERNALPART-removeResource: UrlToExternalResource-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } > + > + @Test > + public void testLoadPart() { > + //Part 'one' > + String s = "LOADPART-loadPart: LaunchPartOne-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + s = "LOADPART-loadPart: LaunchPartOne-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + //Part 'two' > + s = "LOADPART-loadPart: LaunchPartTwo-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + s = "LOADPART-loadPart: LaunchPartTwo-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } > + > + @Test > + public void testLoadExtensionPart() { > + String s = "LOADEXTENSIONPART-loadExtensionPart: ExtensionPartOne-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "LOADEXTENSIONPART-loadExtensionPart: ExtensionPartOne-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } > + > + @Test > + public void testLoadExtensionPartUsingArray() { > + String s = "LOADEXTENSIONUSINGVALIDPARTINARRAY-loadExtensionPart(Array): ValidExtensionParts-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "LOADEXTENSIONUSINGVALIDPARTINARRAY-loadExtensionPart(Array): ValidExtensionParts-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "LOADEXTENSIONUSINGHALFVALIDPARTINARRAY-loadExtensionPart(Array): HalfValidExtensionParts-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "LOADEXTENSIONUSINGHALFVALIDPARTINARRAY-loadExtensionPart(Array): HalfValidExtensionParts-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } > + > + @Test > + public void testLoadExternalResource() { > + String s = "LOADEXTERNALRESOURCE-loadResource: UrlToExternalResource-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + > + s = "LOADEXTERNALRESOURCE-loadResource: UrlToExternalResource-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but did not.", stdout.contains(s)); > + } > +} Thanks for handling this difficult test! - Adam From ptisnovs at icedtea.classpath.org Tue Oct 2 00:26:53 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 02 Oct 2012 07:26:53 +0000 Subject: /hg/gfx-test: Added five new tests and updated javadoc in the test Message-ID: changeset fc16baaaeee4 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=fc16baaaeee4 author: Pavel Tisnovsky date: Tue Oct 02 09:29:36 2012 +0200 Added five new tests and updated javadoc in the test src/org/gfxtest/testsuites/BitBltCropImage.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltCropImage.java | 93 +++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 0 deletions(-) diffs (183 lines): diff -r 243a51c7b2ad -r fc16baaaeee4 ChangeLog --- a/ChangeLog Mon Oct 01 10:29:42 2012 +0200 +++ b/ChangeLog Tue Oct 02 09:29:36 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-02 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltCropImage.java: + Added five new tests, updated javadoc. + 2012-10-01 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltBasicTests.java: diff -r 243a51c7b2ad -r fc16baaaeee4 src/org/gfxtest/testsuites/BitBltCropImage.java --- a/src/org/gfxtest/testsuites/BitBltCropImage.java Mon Oct 01 10:29:42 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltCropImage.java Tue Oct 02 09:29:36 2012 +0200 @@ -94,6 +94,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeByteBinaryNoCrop(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform BitBlt test using crop operation. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -109,6 +110,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropNW(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform BitBlt test using crop operation. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, BitmapCropRegions.CROP_REGION_NW); } @@ -125,6 +127,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropNE(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform BitBlt test using crop operation. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, BitmapCropRegions.CROP_REGION_NE); } @@ -141,6 +144,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropSW(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform BitBlt test using crop operation. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, BitmapCropRegions.CROP_REGION_SW); } @@ -157,6 +161,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropSE(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform BitBlt test using crop operation. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, BitmapCropRegions.CROP_REGION_SE); } @@ -172,6 +177,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeIntRGBNoCrop(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform BitBlt test using crop operation. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); } @@ -187,6 +193,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropNW(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform BitBlt test using crop operation. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, BitmapCropRegions.CROP_REGION_NW); } @@ -203,6 +210,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropNE(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform BitBlt test using crop operation. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, BitmapCropRegions.CROP_REGION_NE); } @@ -219,6 +227,7 @@ */ public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropSW(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform BitBlt test using crop operation. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, BitmapCropRegions.CROP_REGION_SW); } @@ -235,11 +244,95 @@ */ public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropSE(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform BitBlt test using crop operation. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, BitmapCropRegions.CROP_REGION_SE); } /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * No crop is performed to that image. + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRNoCrop(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_3BYTE_BGR. Image is cropped so only north-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRCropNW(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + BitmapCropRegions.CROP_REGION_NW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_3BYTE_BGR. Image is cropped so only north-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRCropNE(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + BitmapCropRegions.CROP_REGION_NE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_3BYTE_BGR. Image is cropped so only south-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRCropSW(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + BitmapCropRegions.CROP_REGION_SW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_3BYTE_BGR. Image is cropped so only south-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRCropSE(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + BitmapCropRegions.CROP_REGION_SE); + } + + /** * Entry point to the test suite. * * @param args From ptisnovs at icedtea.classpath.org Tue Oct 2 01:56:26 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 02 Oct 2012 08:56:26 +0000 Subject: /hg/rhino-tests: Added five new tests to the test suite Message-ID: changeset fc600356b864 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=fc600356b864 author: Pavel Tisnovsky date: Tue Oct 02 10:59:08 2012 +0200 Added five new tests to the test suite src/org/RhinoTests/SimpleScriptContextClassTest.java. diffstat: ChangeLog | 5 + src/org/RhinoTests/SimpleScriptContextClassTest.java | 64 ++++++++++++++++++- 2 files changed, 64 insertions(+), 5 deletions(-) diffs (117 lines): diff -r 581f4fa2e76f -r fc600356b864 ChangeLog --- a/ChangeLog Mon Oct 01 10:43:13 2012 +0200 +++ b/ChangeLog Tue Oct 02 10:59:08 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-02 Pavel Tisnovsky + + * src/org/RhinoTests/SimpleScriptContextClassTest.java: + Added five new tests to this test suite. + 2012-10-01 Pavel Tisnovsky * src/org/RhinoTests/ScriptExceptionClassTest.java: diff -r 581f4fa2e76f -r fc600356b864 src/org/RhinoTests/SimpleScriptContextClassTest.java --- a/src/org/RhinoTests/SimpleScriptContextClassTest.java Mon Oct 01 10:43:13 2012 +0200 +++ b/src/org/RhinoTests/SimpleScriptContextClassTest.java Tue Oct 02 10:59:08 2012 +0200 @@ -70,7 +70,7 @@ /** * Object that represents the type of one SimpleScriptContext instance. */ - Class simpleScriptContextClass = null; + Class simpleScriptContextClass = null; @Override protected void setUp(String[] args) { @@ -142,10 +142,64 @@ } /** + * Test for method javax.script.SimpleScriptContext.getClass().isAnnotation() + */ + protected void testIsAnnotation() { + assertFalse(this.simpleScriptContextClass.isAnnotation(), + "Method SimpleScriptContext.getClass().isAnnotation() returns wrong value"); + } + + /** + * Test for method javax.script.SimpleScriptContext.getClass().isAnnotationPresent() + */ + protected void testIsAnnotationPresent() { + assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.annotation.Annotation.class), + "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value"); + assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.annotation.Documented.class), + "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value"); + assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.annotation.Inherited.class), + "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value"); + assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.annotation.Retention.class), + "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value"); + assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.annotation.Target.class), + "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value"); + assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.Deprecated.class), + "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value"); + assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.Override.class), + "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value"); + assertFalse(this.simpleScriptContextClass.isAnnotationPresent(java.lang.SuppressWarnings.class), + "Method SimpleScriptContext.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value"); + } + + /** + * Test for method javax.script.SimpleScriptContext.getClass().isAnonymousClass() + */ + protected void testIsAnonymousClass() { + assertFalse(this.simpleScriptContextClass.isAnonymousClass(), + "Method SimpleScriptContext.getClass().isAnonymousClass() returns wrong value"); + } + + /** + * Test for method javax.script.SimpleScriptContext.getClass().isArray() + */ + protected void testIsArray() { + assertFalse(this.simpleScriptContextClass.isArray(), + "Method SimpleScriptContext.getClass().isArray() returns wrong value"); + } + + /** + * Test for method javax.script.SimpleScriptContext.getClass().isEnum() + */ + protected void testIsEnum() { + assertFalse(this.simpleScriptContextClass.isEnum(), + "Method SimpleScriptContext.getClass().isEnum() returns wrong value"); + } + + /** * Test for method javax.script.SimpleScriptContext.getClass().getInterfaces() */ protected void testGetInterfaces() { - List interfaces = Arrays.asList(this.simpleScriptContextClass.getInterfaces()); + List> interfaces = Arrays.asList(this.simpleScriptContextClass.getInterfaces()); assertTrue(interfaces.contains(ScriptContext.class), "list of implemented interfaces does not contain ScriptContext"); } @@ -213,7 +267,7 @@ * Test for method javax.script.SimpleScriptContext.getClass().getSuperclass() */ protected void testGetSuperclass() { - Class superClass = this.simpleScriptContextClass.getSuperclass(); + Class superClass = this.simpleScriptContextClass.getSuperclass(); String superClassName = superClass.getName(); assertEquals(superClassName, "java.lang.Object", "Method SimpleScriptContext.getClass().getSuperclass() returns wrong value " + superClassName); @@ -223,7 +277,7 @@ * Test for method javax.script.SimpleScriptContext.getClass().getConstructors() */ protected void testGetConstructors() { - Constructor[] constructors = this.simpleScriptContextClass.getConstructors(); + Constructor[] constructors = this.simpleScriptContextClass.getConstructors(); assertEquals(constructors.length, 1, "only one constructor should be set"); String constructorName; String constructorString; @@ -239,7 +293,7 @@ * Test for method javax.script.SimpleScriptContext.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - Constructor[] constructors = this.simpleScriptContextClass.getDeclaredConstructors(); + Constructor[] constructors = this.simpleScriptContextClass.getDeclaredConstructors(); assertEquals(constructors.length, 1, "only one constructor should be set"); String constructorName; String constructorString; From adomurad at icedtea.classpath.org Tue Oct 2 07:54:37 2012 From: adomurad at icedtea.classpath.org (adomurad at icedtea.classpath.org) Date: Tue, 02 Oct 2012 14:54:37 +0000 Subject: /hg/icedtea-web: Fix two typos. Message-ID: changeset df7db8de4a20 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=df7db8de4a20 author: martin at minimum.se date: Tue Oct 02 10:49:06 2012 -0400 Fix two typos. diffstat: ChangeLog | 5 +++++ plugin/icedteanp/IcedTeaNPPlugin.cc | 2 +- plugin/icedteanp/IcedTeaPluginRequestProcessor.cc | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diffs (36 lines): diff -r cbf8e415c5bf -r df7db8de4a20 ChangeLog --- a/ChangeLog Wed Sep 26 15:15:35 2012 -0400 +++ b/ChangeLog Tue Oct 02 10:49:06 2012 -0400 @@ -1,3 +1,8 @@ +2012-10-02 Martin Olsson + + * plugin/icedteanp/IcedTeaNPPlugin.cc: Typo fix. + * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc: Typo fix. + 2012-09-26 Jana Fabrikova * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java: diff -r cbf8e415c5bf -r df7db8de4a20 plugin/icedteanp/IcedTeaNPPlugin.cc --- a/plugin/icedteanp/IcedTeaNPPlugin.cc Wed Sep 26 15:15:35 2012 -0400 +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Tue Oct 02 10:49:06 2012 -0400 @@ -313,7 +313,7 @@ // Creates a new icedtea np plugin instance. This function creates a // ITNPPluginData* and stores it in instance->pdata. The following -// ITNPPluginData fiels are initialized: instance_id, in_pipe_name, +// ITNPPluginData fields are initialized: instance_id, in_pipe_name, // in_from_appletviewer, in_watch_source, out_pipe_name, // out_to_appletviewer, out_watch_source, appletviewer_mutex, owner, // appletviewer_alive. In addition two pipe files are created. All diff -r cbf8e415c5bf -r df7db8de4a20 plugin/icedteanp/IcedTeaPluginRequestProcessor.cc --- a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc Wed Sep 26 15:15:35 2012 -0400 +++ b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc Tue Oct 02 10:49:06 2012 -0400 @@ -471,7 +471,7 @@ * * This is a static function, called in another thread. Since certain data * can only be requested from the main thread in Mozilla, this function - * does whatever it can seperately, and then makes an internal request that + * does whatever it can separately, and then makes an internal request that * causes _getMember to do the rest of the work. * * @param message_parts The request message From adomurad at redhat.com Tue Oct 2 12:05:20 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 02 Oct 2012 15:05:20 -0400 Subject: [rfc][icedtea-web] JNLPClassLoader oldstyle forloops made to for-each loops, minor cleanup In-Reply-To: <4FFAE052.1080408@redhat.com> References: <1341602908.16030.31.camel@voip-10-15-18-79.yyz.redhat.com> <4FFAE052.1080408@redhat.com> Message-ID: <506B3AF0.6060005@redhat.com> On 07/09/2012 09:44 AM, Jiri Vanek wrote: > On 07/06/2012 09:28 PM, Adam Domurad wrote: >> You may notice I don't like looking at old style for loops ... >> >> 2012-07-06 Adam Domurad >> >> * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: >> Changed some old-style for-loops -> for-each loops. Small code >> cleanup >> and generic type Class references changed to Class. > > Do you mind to add unittests to all methods you are touching? (any > souch a touch is good reason to add some;) ) > With unittests, I'm ok for head, 1.3, and 1.2. > > > J. Ping. Never did come up with any worthwhile unit tests, can you elaborate on what you had in mind? Thanks, - Adam From adomurad at redhat.com Tue Oct 2 12:38:35 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 02 Oct 2012 15:38:35 -0400 Subject: [rfc][icedtea-web] Extract JNLPClassLoader#CodeBaseClassLoader as non-inner class Message-ID: <506B42BB.3040704@redhat.com> JNLPClassLoader.java needs some components broken off, and this is an easy start. This changes no functionality, the class has simply been moved and references updated. Note that the class can not be made package-private as would be ideal, because of a reference in PluginAppletViewer.java. ChangeLog: 2012-10-02 Adam Domurad Extract out JNLPClassLoader#CodeBaseClassLoader as a non-inner class. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Extracted CodeBaseClassLoader out. * netx/net/sourceforge/jnlp/runtime/CodeBaseClassLoader.java: New, put CodeBaseClassLoader here. * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java: Updated CodeBaseClassLoader reference to correct location. * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: Updated CodeBaseClassLoader reference to correct location. * tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java: Updated CodeBaseClassLoader reference to correct location. From adomurad at redhat.com Tue Oct 2 12:40:39 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 02 Oct 2012 15:40:39 -0400 Subject: [rfc][icedtea-web] Extract JNLPClassLoader#CodeBaseClassLoader as non-inner class In-Reply-To: <506B42BB.3040704@redhat.com> References: <506B42BB.3040704@redhat.com> Message-ID: <506B4337.4080702@redhat.com> On 10/02/2012 03:38 PM, Adam Domurad wrote: > JNLPClassLoader.java needs some components broken off, and this is an > easy start. > > This changes no functionality, the class has simply been moved and > references updated. > Note that the class can not be made package-private as would be ideal, > because of a reference in PluginAppletViewer.java. > > ChangeLog: > 2012-10-02 Adam Domurad > > Extract out JNLPClassLoader#CodeBaseClassLoader as a non-inner class. > * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: > Extracted CodeBaseClassLoader out. > * netx/net/sourceforge/jnlp/runtime/CodeBaseClassLoader.java: New, > put > CodeBaseClassLoader here. > * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java: Updated > CodeBaseClassLoader reference to correct location. > * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: Updated > CodeBaseClassLoader reference to correct location. > * > tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java: > Updated CodeBaseClassLoader reference to correct location. > Apologies hit send prematurely, patch attached now. -------------- next part -------------- A non-text attachment was scrubbed... Name: codebaseloaderpatch.patch Type: text/x-patch Size: 14140 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121002/0992d074/codebaseloaderpatch.patch From adomurad at redhat.com Tue Oct 2 12:47:50 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 02 Oct 2012 15:47:50 -0400 Subject: [RFC][icedtea-web]: Fix PR1166 - Embedded JNLP File is not supported in applet tag In-Reply-To: <50660483.3030309@redhat.com> References: <50648FF6.408@redhat.com> <50660483.3030309@redhat.com> Message-ID: <506B44E6.7030305@redhat.com> Re-sending on-list. On 09/28/2012 04:11 PM, Saad Mohammad wrote: > Hello, > > The reproducer for this bug is attached. I also found a small bug with embedded > jnlps that use "." as its codebase, therefore I attached an updated bug fix that > resolves this issue.(Added try/catch in Parser) > > Thanks. > > PR1166 > > ============================================================================== > Bug Fix Changelog: > > 2012-09-28 Saad Mohammad > > Fix PR1166: Embedded JNLP File is not supported in applet tag. > * netx/net/sourceforge/jnlp/JNLPFile.java (JNLPFile): > New constructor which accepts inputstream of jnlp file and a > specified codebase. > * netx/net/sourceforge/jnlp/Parser.java (Parser): > If parsing of codebase fails, it will overwrite the codebase > with the one passed in through parameters. > * netx/net/sourceforge/jnlp/PluginBridge.java (PluginBridge): > Supports embedded jnlp file. > > ============================================================================== > Reproducer Changelog: > > 2012-09-28 Saad Mohammad > > Added reproducer for PR1166. > * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlp.jnlp: > Launching jnlp file that is used by jnlp_href in applet tag > * > tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletNoCodebase.html: > Applet with an embedded jnlp file with no codebase specified > * > tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletWithDotCodebase.html: > Applet with an embedded jnlp file with codebase set as a 'dot' > * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/JnlpInApplet.html: > Applet with jnlp_href file. > * tests/reproducers/simple/EmbeddedJnlpInApplet/srcs/EmbeddedJnlp.java: > Simple class that outputs strings. > * > tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java: > Testcase that tests embedded jnlps in html pages. > > ============================================================================== > Hey Saad thanks for the reproducer & fix! Comments on the reproducer to start off: Overall it looks like a good reproducer, but I was unable to get it to pass by applying your patch ? It could be a fault on my end, but they generally did not get to the 'applet destroyed' message. They seemed OK when tested manually. > diff --git a/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlp.jnlp b/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlp.jnlp > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlp.jnlp > @@ -0,0 +1,61 @@ > + > + > + > + > + SignedAppletTest Title & description here seem inaccurate > + IcedTea > + > + SignedAppletTest > + > + > + > + > + > + > + + documentBase="." > + name="EmbeddedJnlp" > + main-class="EmbeddedJnlp" > + width="100" > + height="100"> > + > + > + > + > + > [ ... snipped ... ] > + > +import java.applet.Applet; > + > +public class EmbeddedJnlp extends Applet { > + > + private static final long serialVersionUID = -2473695081641587179L; If this isn't actually meant to be serializable, I'd prefer a SuppressWarning annotation if the warning bugs you. > + > + @Override > + public void init() { > + System.out.println("Starting EmbeddedJnlp Class"); > + } > + > + @Override > + public void start() { > + System.out.println("EmbeddedJnlp was started"); > + } > + > + @Override > + public void stop() { > + System.out.println("Stopping EmbeddedJnlp"); > + } > + > + @Override > + public void destroy() { > + System.out.println("Destroying EmbeddedJnlp"); If you are only searching for one string, it's a little simpler to just have one message, "*** APPLET FINISHED ***" (which is now the 'standard' applet finishing string.) But, as you will. > + } > +} > diff --git a/tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java b/tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java > @@ -0,0 +1,71 @@ > +/* EmbeddedJnlpInAppletTest.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import junit.framework.Assert; > +import net.sourceforge.jnlp.ProcessResult; > +import net.sourceforge.jnlp.browsertesting.BrowserTest; > +import net.sourceforge.jnlp.browsertesting.Browsers; > +import net.sourceforge.jnlp.annotations.TestInBrowsers; > +import org.junit.Test; > + > +public class EmbeddedJnlpInAppletTest extends BrowserTest { > + > + final String s = "Destroying EmbeddedJnlp"; 'static' here, to nit. > + > + @Test > + @TestInBrowsers(testIn = { Browsers.one }) > + public void JnlpInApplet() throws Exception { > + ProcessResult pr = server.executeBrowser("/JnlpInApplet.html"); If you do my suggestion of checking for the (new) 'standard' applet closing message, you can also simply change this call to server.executeBrowser("/JnlpInApplet.html", AutoClose.CLOSE_ON_CORRECT_END); And it will automagically close within reasonable time. > + Assert.assertTrue("EmbeddedJnlp.class was not correctly launched in JnlpInApplet.html: " + pr.stdout + pr.stderr, pr.stdout.contains(s)); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.one }) > + public void EmbeddedJnlpInAppletWithADotAsCodebase() throws Exception { > + ProcessResult pr = server.executeBrowser("/EmbeddedJnlpInAppletWithDotCodebase.html"); As above, also consider this for any future executeBrowser calls, as it will greatly speed up the reproducer system if applied thoroughly. > + Assert.assertTrue("EmbeddedJnlp.class was not correctly launched in EmbeddedJnlpInAppletWithDotCodebase.html: " + pr.stdout + pr.stderr, > + pr.stdout.contains(s)); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.one }) > + public void EmbeddedJnlpInAppletWithNoCodebase() throws Exception { > + ProcessResult pr = server.executeBrowser("/EmbeddedJnlpInAppletWithNoCodebase.html"); As above. > + Assert.assertTrue("EmbeddedJnlp.class was not correctly launched in EmbeddedJnlpInAppletWithDotCodebase.html: " + pr.stdout + pr.stderr, > + pr.stdout.contains(s)); > + } > +} Cheers, - Adam From ptisnovs at icedtea.classpath.org Wed Oct 3 01:06:56 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 03 Oct 2012 08:06:56 +0000 Subject: /hg/gfx-test: Added eleven new tests into src/org/gfxtest/testsu... Message-ID: changeset 8441dc42876a in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=8441dc42876a author: Pavel Tisnovsky date: Wed Oct 03 10:09:39 2012 +0200 Added eleven new tests into src/org/gfxtest/testsuites/BitBltBasicTests.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltBasicTests.java | 165 +++++++++++++++++++++++ 2 files changed, 170 insertions(+), 0 deletions(-) diffs (187 lines): diff -r fc16baaaeee4 -r 8441dc42876a ChangeLog --- a/ChangeLog Tue Oct 02 09:29:36 2012 +0200 +++ b/ChangeLog Wed Oct 03 10:09:39 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-03 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltBasicTests.java: + Added eleven new tests. + 2012-10-02 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltCropImage.java: diff -r fc16baaaeee4 -r 8441dc42876a src/org/gfxtest/testsuites/BitBltBasicTests.java --- a/src/org/gfxtest/testsuites/BitBltBasicTests.java Tue Oct 02 09:29:36 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltBasicTests.java Wed Oct 03 10:09:39 2012 +0200 @@ -814,6 +814,171 @@ } /** + * Test basic BitBlt operation for diagonal grid buffered image with type TYPE_INT_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); + } + + /** + * Test basic BitBlt operation for diagonal grid buffered image with type TYPE_INT_BGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_INT_BGR); + } + + /** + * Test basic BitBlt operation for diagonal grid buffered image with type TYPE_INT_ARGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); + } + + /** + * Test basic BitBlt operation for diagonal grid buffered image with type TYPE_INT_ARGB_PRE. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE); + } + + /** + * Test basic BitBlt operation for diagonal grid buffered image with type TYPE_4BYTE_ABGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR); + } + + /** + * Test basic BitBlt operation for diagonal grid buffered image with type TYPE_4BYTE_ABGR_PRE. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageType4ByteABGR_PRE(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE); + } + + /** + * Test basic BitBlt operation for diagonal grid buffered image with type TYPE_BYTE_GRAY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY); + } + + /** + * Test basic BitBlt operation for diagonal grid buffered image with type TYPE_USHORT_GRAY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY); + } + + /** + * Test basic BitBlt operation for diagonal grid buffered image with type TYPE_USHORT_565_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB); + } + + /** + * Test basic BitBlt operation for diagonal grid buffered image with type TYPE_USHORT_555_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB); + } + + /** + * Test basic BitBlt operation for diagonal grid buffered image with type TYPE_3BYTE_BGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR); + } + + /** * Test basic BitBlt operation for horizontal stripes buffered image with * type TYPE_BYTE_BINARY. * From helpcrypto at gmail.com Wed Oct 3 01:26:37 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Wed, 3 Oct 2012 10:26:37 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: <50698939.8050107@redhat.com> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> Message-ID: Filed here: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1186 From ptisnovs at icedtea.classpath.org Wed Oct 3 01:59:35 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 03 Oct 2012 08:59:35 +0000 Subject: /hg/rhino-tests: Make the test src/org/RhinoTests/SimpleScriptCo... Message-ID: changeset 66320ce2a04f in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=66320ce2a04f author: Pavel Tisnovsky date: Wed Oct 03 11:02:13 2012 +0200 Make the test src/org/RhinoTests/SimpleScriptContextClassTest.java compatible with JDK 7. diffstat: ChangeLog | 5 + src/org/RhinoTests/SimpleScriptContextClassTest.java | 117 +++++++++++++++--- 2 files changed, 102 insertions(+), 20 deletions(-) diffs (196 lines): diff -r fc600356b864 -r 66320ce2a04f ChangeLog --- a/ChangeLog Tue Oct 02 10:59:08 2012 +0200 +++ b/ChangeLog Wed Oct 03 11:02:13 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-03 Pavel Tisnovsky + + * src/org/RhinoTests/SimpleScriptContextClassTest.java: + Make this test compatible with JDK 7. + 2012-10-02 Pavel Tisnovsky * src/org/RhinoTests/SimpleScriptContextClassTest.java: diff -r fc600356b864 -r 66320ce2a04f src/org/RhinoTests/SimpleScriptContextClassTest.java --- a/src/org/RhinoTests/SimpleScriptContextClassTest.java Tue Oct 02 10:59:08 2012 +0200 +++ b/src/org/RhinoTests/SimpleScriptContextClassTest.java Wed Oct 03 11:02:13 2012 +0200 @@ -43,6 +43,8 @@ import java.util.Arrays; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.HashMap; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -277,32 +279,60 @@ * Test for method javax.script.SimpleScriptContext.getClass().getConstructors() */ protected void testGetConstructors() { + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + testedConstructors_jdk6.put("public javax.script.SimpleScriptContext()", "javax.script.SimpleScriptContext"); + testedConstructors_jdk7.put("public javax.script.SimpleScriptContext()", "javax.script.SimpleScriptContext"); + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all constructors for this class Constructor[] constructors = this.simpleScriptContextClass.getConstructors(); + + // basic check for a number of constructors assertEquals(constructors.length, 1, "only one constructor should be set"); - String constructorName; - String constructorString; - constructorName = constructors[0].getName(); - constructorString = constructors[0].toString(); - assertEquals(constructorName, "javax.script.SimpleScriptContext", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.SimpleScriptContext()", - "wrong constructor.toString() " + constructorName); + + // check if all constructors exists + for (Constructor constructor : constructors) { + String constructorName = constructor.getName(); + String constructorString = constructor.toString(); + assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); + assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); + } } /** * Test for method javax.script.SimpleScriptContext.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - Constructor[] constructors = this.simpleScriptContextClass.getDeclaredConstructors(); - assertEquals(constructors.length, 1, "only one constructor should be set"); - String constructorName; - String constructorString; - constructorName = constructors[0].getName(); - constructorString = constructors[0].toString(); - assertEquals(constructorName, "javax.script.SimpleScriptContext", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.SimpleScriptContext()", - "wrong constructor.toString() " + constructorName); + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + testedConstructors_jdk6.put("public javax.script.SimpleScriptContext()", "javax.script.SimpleScriptContext"); + testedConstructors_jdk7.put("public javax.script.SimpleScriptContext()", "javax.script.SimpleScriptContext"); + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all declared constructors for this class + Constructor[] declaredConstructors = this.simpleScriptContextClass.getDeclaredConstructors(); + + // basic check for a number of declared constructors + assertEquals(declaredConstructors.length, 1, "only one constructor should be set"); + + // check if all declared constructors exists + for (Constructor declaredConstructor : declaredConstructors) { + String constructorName = declaredConstructor.getName(); + String constructorString = declaredConstructor.toString(); + assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); + assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); + } } /** @@ -360,7 +390,7 @@ */ protected void testGetMethods() { // following methods should be inherited - final String[] methodsThatShouldExists = { + final String[] methodsThatShouldExists_jdk6 = { "public boolean java.lang.Object.equals(java.lang.Object)", "public final native java.lang.Class java.lang.Object.getClass()", "public final native void java.lang.Object.notify()", @@ -385,6 +415,33 @@ "public void javax.script.SimpleScriptContext.setReader(java.io.Reader)", "public void javax.script.SimpleScriptContext.setWriter(java.io.Writer)", }; + + final String[] methodsThatShouldExists_jdk7 = { + "public boolean java.lang.Object.equals(java.lang.Object)", + "public final native java.lang.Class java.lang.Object.getClass()", + "public final native void java.lang.Object.notify()", + "public final native void java.lang.Object.notifyAll()", + "public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException", + "public final void java.lang.Object.wait() throws java.lang.InterruptedException", + "public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException", + "public int javax.script.SimpleScriptContext.getAttributesScope(java.lang.String)", + "public java.io.Reader javax.script.SimpleScriptContext.getReader()", + "public java.io.Writer javax.script.SimpleScriptContext.getErrorWriter()", + "public java.io.Writer javax.script.SimpleScriptContext.getWriter()", + "public java.lang.Object javax.script.SimpleScriptContext.getAttribute(java.lang.String)", + "public java.lang.Object javax.script.SimpleScriptContext.getAttribute(java.lang.String,int)", + "public java.lang.Object javax.script.SimpleScriptContext.removeAttribute(java.lang.String,int)", + "public java.lang.String java.lang.Object.toString()", + "public java.util.List javax.script.SimpleScriptContext.getScopes()", + "public javax.script.Bindings javax.script.SimpleScriptContext.getBindings(int)", + "public native int java.lang.Object.hashCode()", + "public void javax.script.SimpleScriptContext.setAttribute(java.lang.String,java.lang.Object,int)", + "public void javax.script.SimpleScriptContext.setBindings(javax.script.Bindings,int)", + "public void javax.script.SimpleScriptContext.setErrorWriter(java.io.Writer)", + "public void javax.script.SimpleScriptContext.setReader(java.io.Reader)", + "public void javax.script.SimpleScriptContext.setWriter(java.io.Writer)", + }; + // get all inherited methods Method[] methods = this.simpleScriptContextClass.getMethods(); // and transform the array into a list of method names @@ -392,6 +449,7 @@ for (Method method : methods) { methodsAsString.add(method.toString()); } + String[] methodsThatShouldExists = getJavaVersion() < 7 ? methodsThatShouldExists_jdk6 : methodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : methodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), @@ -404,7 +462,7 @@ */ protected void testGetDeclaredMethods() { // following methods should be declared - final String[] declaredMethodsThatShouldExists = { + final String[] declaredMethodsThatShouldExists_jdk6 = { "public int javax.script.SimpleScriptContext.getAttributesScope(java.lang.String)", "public java.io.Reader javax.script.SimpleScriptContext.getReader()", "public java.io.Writer javax.script.SimpleScriptContext.getErrorWriter()", @@ -420,6 +478,24 @@ "public void javax.script.SimpleScriptContext.setReader(java.io.Reader)", "public void javax.script.SimpleScriptContext.setWriter(java.io.Writer)", }; + + final String[] declaredMethodsThatShouldExists_jdk7 = { + "public int javax.script.SimpleScriptContext.getAttributesScope(java.lang.String)", + "public java.io.Reader javax.script.SimpleScriptContext.getReader()", + "public java.io.Writer javax.script.SimpleScriptContext.getErrorWriter()", + "public java.io.Writer javax.script.SimpleScriptContext.getWriter()", + "public java.lang.Object javax.script.SimpleScriptContext.getAttribute(java.lang.String)", + "public java.lang.Object javax.script.SimpleScriptContext.getAttribute(java.lang.String,int)", + "public java.lang.Object javax.script.SimpleScriptContext.removeAttribute(java.lang.String,int)", + "public java.util.List javax.script.SimpleScriptContext.getScopes()", + "public javax.script.Bindings javax.script.SimpleScriptContext.getBindings(int)", + "public void javax.script.SimpleScriptContext.setAttribute(java.lang.String,java.lang.Object,int)", + "public void javax.script.SimpleScriptContext.setBindings(javax.script.Bindings,int)", + "public void javax.script.SimpleScriptContext.setErrorWriter(java.io.Writer)", + "public void javax.script.SimpleScriptContext.setReader(java.io.Reader)", + "public void javax.script.SimpleScriptContext.setWriter(java.io.Writer)", + }; + // get all declared methods Method[] declaredMethods = this.simpleScriptContextClass.getDeclaredMethods(); // and transform the array into a list of method names @@ -427,6 +503,7 @@ for (Method method : declaredMethods) { methodsAsString.add(method.toString()); } + String[] declaredMethodsThatShouldExists = getJavaVersion() < 7 ? declaredMethodsThatShouldExists_jdk6 : declaredMethodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : declaredMethodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), From jfabriko at redhat.com Wed Oct 3 07:17:39 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Wed, 03 Oct 2012 16:17:39 +0200 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "get" tests In-Reply-To: <937119746.4428687.1349093533008.JavaMail.root@redhat.com> References: <937119746.4428687.1349093533008.JavaMail.root@redhat.com> Message-ID: <506C4903.5070505@redhat.com> Thank you for the review, Pavel. I edited the source files according to your comments and commited the reproducer to the icedtea-web repository, Jana On 10/01/2012 02:12 PM, Pavel Tisnovsky wrote: > Hi Jana, > > this new reproducer seems almost ok. I have just two minor objections: > > 1) JSToJGetTest.java - (c) year should be 2012 > 2) JSToJGetTest.java - could you please replace by space(s)? > > With these changes I'm ok with push to IT-web HEAD. > > Thank you! > Pavel > > ----- Jana Fabrikova wrote: >> 2012-10-01 Jana Fabrikova >> >> * /tests/reproducers/simple/JSToJGet: >> adding a new reproducer for the first LiveConnect >> test (Tests for getting members from Java side.) >> >> >> I would like to ask for review of the attached patch, >> thank you, >> Jana > From adomurad at redhat.com Wed Oct 3 07:49:25 2012 From: adomurad at redhat.com (Adam Domurad) Date: Wed, 03 Oct 2012 10:49:25 -0400 Subject: [PATCH] fix two typos In-Reply-To: <4029a469ab4b032291e520fc277d1b5a.squirrel@webmail.minimum.se> References: <4029a469ab4b032291e520fc277d1b5a.squirrel@webmail.minimum.se> Message-ID: <506C5075.4080907@redhat.com> Sorry, resending on-list. On 09/29/2012 09:28 AM, Martin Olsson wrote: > diff -r 6df151bb5320 plugin/icedteanp/IcedTeaNPPlugin.cc > --- a/plugin/icedteanp/IcedTeaNPPlugin.cc Fri May 25 11:44:13 2012 -0400 > +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Fri Sep 28 15:03:26 2012 +0200 > @@ -313,7 +313,7 @@ > > // Creates a new icedtea np plugin instance. This function creates a > // ITNPPluginData* and stores it in instance->pdata. The following > -// ITNPPluginData fiels are initialized: instance_id, in_pipe_name, > +// ITNPPluginData fields are initialized: instance_id, in_pipe_name, > // in_from_appletviewer, in_watch_source, out_pipe_name, > // out_to_appletviewer, out_watch_source, appletviewer_mutex, owner, > // appletviewer_alive. In addition two pipe files are created. All > diff -r 6df151bb5320 plugin/icedteanp/IcedTeaPluginRequestProcessor.cc > --- a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc Fri May 25 11:44:13 2012 -0400 > +++ b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc Fri Sep 28 15:03:26 2012 +0200 > @@ -471,7 +471,7 @@ > * > * This is a static function, called in another thread. Since certain data > * can only be requested from the main thread in Mozilla, this function > - * does whatever it can seperately, and then makes an internal request that > + * does whatever it can separately, and then makes an internal request that > * causes _getMember to do the rest of the work. > * > * @param message_parts The request message Apologies for the delayed reply, this fell off my radar due to not hitting my [icedtea-web] filter. Thanks, will commit. - Adam From jfabriko at icedtea.classpath.org Wed Oct 3 07:06:54 2012 From: jfabriko at icedtea.classpath.org (jfabriko at icedtea.classpath.org) Date: Wed, 03 Oct 2012 14:06:54 +0000 Subject: /hg/icedtea-web: Adding a new simple reproducer JSToJGet for tes... Message-ID: changeset 1db5f473227d in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=1db5f473227d author: Jana Fabrikova date: Wed Oct 03 16:08:20 2012 +0200 Adding a new simple reproducer JSToJGet for testing Liveconnect - getting members from Java side. diffstat: tests/reproducers/simple/JSToJGet/resources/JSToJGet.html | 105 +++ tests/reproducers/simple/JSToJGet/resources/JSToJ_auxiliary.js | 69 ++ tests/reproducers/simple/JSToJGet/resources/JSToJava_Get.js | 249 ++++++++ tests/reproducers/simple/JSToJGet/resources/jstoj-get.jnlp | 20 + tests/reproducers/simple/JSToJGet/srcs/JSToJGet.java | 71 ++ tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java | 309 ++++++++++ 6 files changed, 823 insertions(+), 0 deletions(-) diffs (truncated from 847 to 500 lines): diff -r df7db8de4a20 -r 1db5f473227d tests/reproducers/simple/JSToJGet/resources/JSToJGet.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JSToJGet/resources/JSToJGet.html Wed Oct 03 16:08:20 2012 +0200 @@ -0,0 +1,105 @@ + + + + JavaScript to Java LiveConnect - Get values from applet + + + + + + + + +

The JSToJGet html page

+ + + + + +
+ + + + + diff -r df7db8de4a20 -r 1db5f473227d tests/reproducers/simple/JSToJGet/resources/JSToJ_auxiliary.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JSToJGet/resources/JSToJ_auxiliary.js Wed Oct 03 16:08:20 2012 +0200 @@ -0,0 +1,69 @@ +/* +JSToJ_auxiliary.js +This file contains auxiliary JavaScript functions for LiveConnect tests output, +the following reproducers have this file as a common resource: +- JSToJGet +- JSToJSet +- JSToJFuncParam +- JSToJFuncReturn +- JSToJFuncResol +- JSToJTypeConv +- JToJSGet +- JToJSSet +- JToJSFuncParam +- JToJSFuncReturn +- JToJSEval +*/ + +function check(actual, expected, expectedtype, testid, appletName ) { + if (actual == expected) { //the same value + if (typeof(actual) == expectedtype) { //the same type + passTest( testid, appletName ); + } else { + failTypeTest( testid, appletName, actual, expectedtype ); + } + } else { + failValTest( testid, appletName, actual, expected ); + } +} + +function passTest( testid, appletName ){ + var passStr = "Test no."+testid+" - passed."; + //applet stdout + appletStdOut( appletName, passStr); + //html page + appendMessageDiv(passStr); +} + +function failValTest( testid, appletName, actual, expected ){ + var failValStr = "Test no."+testid+" - failed, value mismatch. expected:["+expected+"] found:["+actual+"]."; + //applet stdout + appletStdOut( appletName, failValStr); + //html page + appendMessageDiv(failValStr); +} + +function failTypeTest( testid, appletName, actual, expectedtype ){ + var failTypeStr = "Test no."+testid+" - failed, type mismatch. expected:["+expectedtype+"] found:["+typeof(actual)+"]."; + //applet stdout + appletStdOutLn( appletName, failTypeStr); + //html page + appendMessageDiv(failTypeStr); +} + +function appletStdOut( appletName, str ){ + document.getElementById( appletName ).stdOutWrite( str ); +} + +function appletStdOutLn( appletName, str ){ + document.getElementById( appletName ).stdOutWriteln( str ); +} + +function afterTestsMessage( appletName ){ + document.getElementById( appletName ).stdOutWriteln("afterTests"); +} + +function appendMessageDiv( message ){ + var messageDiv = document.getElementById( 'messageDiv' ); + messageDiv.appendChild( document.createTextNode(message) ); +} diff -r df7db8de4a20 -r 1db5f473227d tests/reproducers/simple/JSToJGet/resources/JSToJava_Get.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JSToJGet/resources/JSToJava_Get.js Wed Oct 03 16:08:20 2012 +0200 @@ -0,0 +1,249 @@ +function test_get_int(){ + var appletName = 'jstojGetApplet'; + try{ + var i = document.getElementById(appletName).i; + check(i, 42, "number", " 1 - (int)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_double() +{ + var appletName = 'jstojGetApplet'; + try{ + var d = document.getElementById(appletName).d; + check(d, 42.42, "number", " 2 - (double)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_float(){ + var appletName = 'jstojGetApplet'; + try{ + var f = document.getElementById(appletName).f; + check(f, 42.099998474121094, "number", " 3 - (float)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_long(){ + var appletName = 'jstojGetApplet'; + try{ + var l = document.getElementById(appletName).l; + check(l, 4294967296, "number", " 4 - (long)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_boolean(){ + var appletName = 'jstojGetApplet'; + try{ + var b = document.getElementById(appletName).b; + check(b, true, "boolean", " 5 - (boolean)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_char(){ + var appletName = 'jstojGetApplet'; + try{ + var c = document.getElementById(appletName).c; + check(c, 8995, "number", " 6 - (char)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_byte(){ + var appletName = 'jstojGetApplet'; + try{ + var by = document.getElementById(appletName).by; + check(by, 43, "number", " 7 - (byte)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_intArrayElement(){ + var appletName = 'jstojGetApplet'; + try{ + var ia = document.getElementById(appletName).ia[4]; + check(ia, 1024, "number", " 8 - (int[] - element access)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_intArrayBeyond(){ + var appletName = 'jstojGetApplet'; + try{ + var ia2 = document.getElementById(appletName).ia[30]; + check(ia2, null, "undefined", " 9 - (int[] - beyond length)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_regularString(){ + var appletName = 'jstojGetApplet'; + try{ + var rs = document.getElementById(appletName).rs; + check(rs, "I'm a string!", "string", "10 - (regular string)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_specialCharsString(){ + var appletName = 'jstojGetApplet'; + try{ + var ss = document.getElementById(appletName).ss; + check(ss, "?????????$?????????", "string", "11 - (string with special characters)",appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_null(){ + var appletName = 'jstojGetApplet'; + try{ + var n = document.getElementById(appletName).n; + check(n, null, "object","12 - (null)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_Integer(){ + var appletName = 'jstojGetApplet'; + try{ + var I = document.getElementById(appletName).I; + check(I, 24, "object","13 - (Integer)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_Double(){ + var appletName = 'jstojGetApplet'; + try{ + var D = document.getElementById(appletName).D; + check(D, 24.24, "object", "14 - (Double)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_Float(){ + var appletName = 'jstojGetApplet'; + try{ + var F = document.getElementById(appletName).F; + check(F, 24.124, "object", "15 - (Float)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_Long(){ + var appletName = 'jstojGetApplet'; + try{ + var L = document.getElementById(appletName).L; + check(L, 6927694924, "object", "16 - (Long)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_Boolean(){ + var appletName = 'jstojGetApplet'; + try{ + var B = document.getElementById(appletName).B; + check(B, false, "object", "17 - (Boolean)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_Character(){ + var appletName = 'jstojGetApplet'; + try{ + var C = document.getElementById(appletName).C; + check(C, '???', "object", "18 - (Character)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_Byte(){ + var appletName = 'jstojGetApplet'; + try{ + var By = document.getElementById(appletName).By; + check(By, 34, "object", "19 - (Byte)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_DoubleArrayElement(){ + var appletName = 'jstojGetApplet'; + try{ + var DaE = document.getElementById(appletName).Da1[9]; + check(DaE, 24.24, "object", "20 - (Double[] - element access)", appletName); + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + +function test_get_DoubleFullArray(){ + var appletName = 'jstojGetApplet'; + try{ + var DaStr = document.getElementById(appletName).Da1.toString().substr(0,20); + var Da = document.getElementById(appletName).Da1; + + var appletid = appletName; + var testid = "21 - (Double[] - full array)"; + + var expected = "[Ljava.lang.Double;@"; + var expectedtype = "object"; + + if ( DaStr == expected ) { //the same value + if ( typeof(Da) == expectedtype ) { //the same type + passTest( testid, appletid ); + } else { + failTypeTest( testid, appletid, typeof(Da), expectedtype ); + } + } else { + failValTest( testid, appletid, DaStr, expected ); + } + }catch(e){ + appletStdOut( appletName, e ); + appendMessageDiv(e); + } +} + + diff -r df7db8de4a20 -r 1db5f473227d tests/reproducers/simple/JSToJGet/resources/jstoj-get.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JSToJGet/resources/jstoj-get.jnlp Wed Oct 03 16:08:20 2012 +0200 @@ -0,0 +1,20 @@ + + + + JavaScript to Java LiveConnect - Get + RedHat + + LiveConnect - tests for getting members from Java side. + + + + + + + + + diff -r df7db8de4a20 -r 1db5f473227d tests/reproducers/simple/JSToJGet/srcs/JSToJGet.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JSToJGet/srcs/JSToJGet.java Wed Oct 03 16:08:20 2012 +0200 @@ -0,0 +1,71 @@ +import java.applet.*; +import java.awt.*; + +public class JSToJGet extends Applet { + + public static final int i = 42; + public static final double d = 42.42; + public static final float f = 42.1F; + public static final long l = 4294967296L; + public static final boolean b = true; + public static final char c = '\u2323'; + public static final byte by = 43; + public static final String rs = "I'm a string!"; + public static final String ss = "?????????$?????????"; + public static final Object n = null; + public int[] ia = new int[5]; + + public static final Integer I = 24; + public static final Double D = 24.24; + public static final Float F = 24.124F; + public static final Long L = 6927694924L; + public static final Boolean B = false; + public static final Character C = '\u1526'; + public static final Byte By = 34; + public Double[] Da1 = new Double[10]; + public Double[] Da2 = null; + + public char[] ca = new char[3]; + public Character[] Ca = new Character[3]; + + private Label statusLabel; + + public void init() { + setLayout(new BorderLayout()); + statusLabel = new Label(); + add(statusLabel); + String initStr = "JSToJGet applet initialized."; From jfabriko at icedtea.classpath.org Wed Oct 3 07:29:46 2012 From: jfabriko at icedtea.classpath.org (jfabriko at icedtea.classpath.org) Date: Wed, 03 Oct 2012 14:29:46 +0000 Subject: /hg/icedtea-web: Added the changelog message for the new reprodu... Message-ID: changeset ececd7006a91 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=ececd7006a91 author: Jana Fabrikova date: Wed Oct 03 16:31:18 2012 +0200 Added the changelog message for the new reproducer JSToJGet. diffstat: ChangeLog | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diffs (12 lines): diff -r 1db5f473227d -r ececd7006a91 ChangeLog --- a/ChangeLog Wed Oct 03 16:08:20 2012 +0200 +++ b/ChangeLog Wed Oct 03 16:31:18 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-03 Jana Fabrikova + * tests/reproducers/simple/JSToJGet: + adding a new reproducer for the first LiveConnect + test (Tests for getting members from Java side.) + 2012-10-02 Martin Olsson * plugin/icedteanp/IcedTeaNPPlugin.cc: Typo fix. From omajid at redhat.com Wed Oct 3 08:53:28 2012 From: omajid at redhat.com (Omair Majid) Date: Wed, 03 Oct 2012 11:53:28 -0400 Subject: /hg/icedtea-web: Added the changelog message for the new reprodu... In-Reply-To: References: Message-ID: <506C5F78.2040405@redhat.com> Hi Jana, On 10/03/2012 10:29 AM, jfabriko at icedtea.classpath.org wrote: > +2012-10-03 Jana Fabrikova > + * tests/reproducers/simple/JSToJGet: > + adding a new reproducer for the first LiveConnect > + test (Tests for getting members from Java side.) > + If you haven't seen the guidelines for writing ChangeLog files [1], please go through them. A couple of things stood out to me: - Please use two spaces between the date, name and the email address - Please only use tabs for indentation. - Please have a blank line between the date/name/email and the actual change. - Please avoid whitespace at the end of lines. Thanks, Omair [1] http://www.gnu.org/prep/standards/html_node/Change-Logs.html#Change-Logs From jfabriko at icedtea.classpath.org Wed Oct 3 10:17:55 2012 From: jfabriko at icedtea.classpath.org (jfabriko at icedtea.classpath.org) Date: Wed, 03 Oct 2012 17:17:55 +0000 Subject: /hg/icedtea-web: Editing the ChangeLog file to satisfy the rules... Message-ID: changeset 3c9fc2571585 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=3c9fc2571585 author: Jana Fabrikova date: Wed Oct 03 19:19:30 2012 +0200 Editing the ChangeLog file to satisfy the rules of writing changelogs. diffstat: ChangeLog | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diffs (24 lines): diff -r ececd7006a91 -r 3c9fc2571585 ChangeLog --- a/ChangeLog Wed Oct 03 16:31:18 2012 +0200 +++ b/ChangeLog Wed Oct 03 19:19:30 2012 +0200 @@ -1,7 +1,8 @@ -2012-10-03 Jana Fabrikova +2012-10-03 Jana Fabrikova + * tests/reproducers/simple/JSToJGet: - adding a new reproducer for the first LiveConnect - test (Tests for getting members from Java side.) + Added a new reproducer for the first LiveConnect + test - getting members from Java side. 2012-10-02 Martin Olsson @@ -11,7 +12,7 @@ 2012-09-26 Jana Fabrikova * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java: - Added forgotten package name + Added forgotten package name. 2012-09-25 Jiri Vanek From jfabriko at redhat.com Wed Oct 3 10:29:22 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Wed, 03 Oct 2012 19:29:22 +0200 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "set" tests Message-ID: <506C75F2.7010505@redhat.com> 2012-10-03 Jana Fabrikova * /tests/reproducers/simple/JSToJSet: adding a new reproducer for the second LiveConnect test (Tests for setting members on Java side.) I would like to ask for review of the attached patch, thank you, Jana -------------- next part -------------- A non-text attachment was scrubbed... Name: adding_JSToJSet_reproducer.patch Type: text/x-patch Size: 34564 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121003/0714af20/adding_JSToJSet_reproducer.patch From smohammad at redhat.com Wed Oct 3 11:10:03 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Wed, 03 Oct 2012 14:10:03 -0400 Subject: [RFC][icedtea-web]: Fix PR1166 - Embedded JNLP File is not supported in applet tag In-Reply-To: <506B44E6.7030305@redhat.com> References: <50648FF6.408@redhat.com> <50660483.3030309@redhat.com> <506B44E6.7030305@redhat.com> Message-ID: <506C7F7B.8020909@redhat.com> Hi Adam, Thanks for looking over my patches. I updated the reproducers after your review. Along with the attached reproducer, I also added unit test and updated the bug fix patch so it is more compatible with tests. Also, just a note, the reproducers do all pass for me through the test engine. Let me know if you are having any trouble. Thanks. CHANGELOGS: ============================================================================== BUG FIX: 2012-10-03 Saad Mohammad Fix PR1166: Embedded JNLP File is not supported in applet tag. * configure.ac: Checks for sun.misc.BASE64Encoder and sun.misc.BASE64Decoder * netx/net/sourceforge/jnlp/JNLPFile.java (JNLPFile): New constructor which accepts inputstream of jnlp file and a specified codebase. * netx/net/sourceforge/jnlp/Parser.java (Parser): If parsing of codebase fails, it will overwrite the codebase with the one passed in through parameters. * netx/net/sourceforge/jnlp/PluginBridge.java: (PluginBridge) Supports embedded jnlp file. (decodeBase64String) Decodes Base64 strings to byte array. ============================================================================== REPRODUCER: 2012-10-03 Saad Mohammad Added reproducer for PR1166. * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlp.jnlp: Launching jnlp file that is used by jnlp_href in applet tag * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletNoCodebase.html: Applet with an embedded jnlp file with no codebase specified * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletWithDotCodebase.html: Applet with an embedded jnlp file with codebase set as a 'dot' * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/JnlpInApplet.html: Applet with jnlp_href file. * tests/reproducers/simple/EmbeddedJnlpInApplet/srcs/EmbeddedJnlp.java: Simple class that outputs strings. * tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java: Testcase that tests embedded jnlps in html pages. ============================================================================== UNIT TESTS: 2012-10-03 Saad Mohammad * tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java: Tests the JNLPFile constructor that accepts an InputStream and an alternative codebase. * tests/netx/unit/net/sourceforge/jnlp/ParserTest.java: Tests if the constructor handles the alternative codebase parameter correctly. * tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java: Tests if BASE64 strings are decoded correctly and if PluginBridge is constructed with an embedded jnlp. ============================================================================== -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: BUG_FIX0-3.patch Type: text/x-patch Size: 4585 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121003/cec443b1/BUG_FIX0-3.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: BUG_FIX_Changelog-News0-3.patch Type: text/x-patch Size: 1255 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121003/cec443b1/BUG_FIX_Changelog-News0-3.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: REPRODUCER0-3.patch.patch Type: text/x-patch Size: 23583 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121003/cec443b1/REPRODUCER0-3.patch.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: REPRODUCER_Changelog0-3.patch Type: text/x-patch Size: 1103 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121003/cec443b1/REPRODUCER_Changelog0-3.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: UNIT_TEST0-3.patch Type: text/x-patch Size: 15921 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121003/cec443b1/UNIT_TEST0-3.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: UNIT_TEST-Changelog0-3.patch Type: text/x-patch Size: 702 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121003/cec443b1/UNIT_TEST-Changelog0-3.patch From ptisnovs at icedtea.classpath.org Thu Oct 4 02:09:54 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 04 Oct 2012 09:09:54 +0000 Subject: /hg/rhino-tests: Added new test case src/org/RhinoTests/Bindings... Message-ID: changeset 1469d167df45 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=1469d167df45 author: Pavel Tisnovsky date: Thu Oct 04 11:12:33 2012 +0200 Added new test case src/org/RhinoTests/BindingsClassTest.java with 25 tests. diffstat: ChangeLog | 7 + Makefile | 2 + src/org/RhinoTests/BindingsClassTest.java | 451 ++++++++++++++++++++++++++++++ 3 files changed, 460 insertions(+), 0 deletions(-) diffs (488 lines): diff -r 66320ce2a04f -r 1469d167df45 ChangeLog --- a/ChangeLog Wed Oct 03 11:02:13 2012 +0200 +++ b/ChangeLog Thu Oct 04 11:12:33 2012 +0200 @@ -1,3 +1,10 @@ +2012-10-04 Pavel Tisnovsky + + * src/org/RhinoTests/BindingsClassTest.java: + Added new test case with 25 tests. + * Makefile: + Added new class to compile and new test to run. + 2012-10-03 Pavel Tisnovsky * src/org/RhinoTests/SimpleScriptContextClassTest.java: diff -r 66320ce2a04f -r 1469d167df45 Makefile --- a/Makefile Wed Oct 03 11:02:13 2012 +0200 +++ b/Makefile Thu Oct 04 11:12:33 2012 +0200 @@ -59,6 +59,7 @@ ScriptEngineFactoryClassTest \ JavaScriptsTest \ BindingsTest \ + BindingsClassTest \ CompilableTest \ CompilableClassTest \ CompiledScriptTest \ @@ -89,6 +90,7 @@ $(BUILD_DIR)/$(TEST_PACKAGE)/Constants.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/BaseRhinoTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/BindingsTest.class \ + $(BUILD_DIR)/$(TEST_PACKAGE)/BindingsClassTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/CompilableTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/CompilableClassTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/CompiledScriptTest.class \ diff -r 66320ce2a04f -r 1469d167df45 src/org/RhinoTests/BindingsClassTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/RhinoTests/BindingsClassTest.java Thu Oct 04 11:12:33 2012 +0200 @@ -0,0 +1,451 @@ +/* + Rhino test framework + + Copyright (C) 2011, 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.RhinoTests; + +import java.util.Arrays; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +import javax.script.Bindings; +import javax.script.Invocable;import javax.script.SimpleBindings; + + + +/** + * Set of tests which check the API of Bindings interface using + * Java reflection API. + * + * @author Pavel Tisnovsky + */ +public class BindingsClassTest extends BaseRhinoTest { + + /** + * Object that represents the type of Bindings. + */ + Class bindingsClass = null; + + @Override + protected void setUp(String[] args) { + // setup attribute used by tests + this.bindingsClass = Bindings.class; + } + + @Override + protected void tearDown() { + // this block could be empty + return; + } + + /** + * Test for method javax.script.Bindings.getClass().isAssignableFrom() + */ + protected void testIsAssignableFrom() { + assertTrue(this.bindingsClass.isAssignableFrom(Bindings.class), + "Method Bindings.getClass().isAssignableFrom() returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().isInstance() + */ + protected void testIsInstance() { + assertTrue(this.bindingsClass.isInstance((Bindings)(new SimpleBindings())), + "Method Bindings.getClass().isInstance() returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().isInterface() + */ + protected void testIsInterface() { + assertTrue(this.bindingsClass.isInterface(), + "Method Bindings.getClass().isInterface() returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().isLocalClass() + */ + protected void testIsLocalClass() { + assertFalse(this.bindingsClass.isLocalClass(), + "Method Bindings.getClass().isLocalClass() returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().isMemberClass() + */ + protected void testIsMemberClass() { + assertFalse(this.bindingsClass.isMemberClass(), + "Method Bindings.getClass().isMemberClass() returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().isPrimitive() + */ + protected void testIsPrimitive() { + assertFalse(this.bindingsClass.isPrimitive(), + "Method Bindings.getClass().isPrimitive() returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().isSynthetic() + */ + protected void testIsSynthetic() { + assertFalse(this.bindingsClass.isSynthetic(), + "Method Bindings.getClass().isSynthetic() returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().isAnnotation() + */ + protected void testIsAnnotation() { + assertFalse(this.bindingsClass.isAnnotation(), + "Method Bindings.getClass().isAnnotation() returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().isAnnotationPresent() + */ + protected void testIsAnnotationPresent() { + assertFalse(this.bindingsClass.isAnnotationPresent(java.lang.annotation.Annotation.class), + "Method Bindings.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value"); + assertFalse(this.bindingsClass.isAnnotationPresent(java.lang.annotation.Documented.class), + "Method Bindings.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value"); + assertFalse(this.bindingsClass.isAnnotationPresent(java.lang.annotation.Inherited.class), + "Method Bindings.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value"); + assertFalse(this.bindingsClass.isAnnotationPresent(java.lang.annotation.Retention.class), + "Method Bindings.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value"); + assertFalse(this.bindingsClass.isAnnotationPresent(java.lang.annotation.Target.class), + "Method Bindings.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value"); + assertFalse(this.bindingsClass.isAnnotationPresent(java.lang.Deprecated.class), + "Method Bindings.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value"); + assertFalse(this.bindingsClass.isAnnotationPresent(java.lang.Override.class), + "Method Bindings.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value"); + assertFalse(this.bindingsClass.isAnnotationPresent(java.lang.SuppressWarnings.class), + "Method Bindings.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().isAnonymousClass() + */ + protected void testIsAnonymousClass() { + assertFalse(this.bindingsClass.isAnonymousClass(), + "Method Bindings.getClass().isAnonymousClass() returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().isArray() + */ + protected void testIsArray() { + assertFalse(this.bindingsClass.isArray(), + "Method Bindings.getClass().isArray() returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().isEnum() + */ + protected void testIsEnum() { + assertFalse(this.bindingsClass.isEnum(), + "Method Bindings.getClass().isEnum() returns wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().getInterfaces() + */ + protected void testGetInterfaces() { + List> interfaces = Arrays.asList(this.bindingsClass.getInterfaces()); + assertTrue(interfaces.contains(Map.class), + "list of implemented interfaces does not contain Map"); + } + + /** + * Test for method javax.script.Bindings.getClass().getModifiers() + */ + protected void testGetModifiers() { + int modifiers = this.bindingsClass.getModifiers(); + assertTrue(Modifier.isPublic(modifiers), + "Method Bindings.getClass().getModifiers() - isPublic modifier is set to a wrong value"); + assertFalse(Modifier.isPrivate(modifiers), + "Method Bindings.getClass().getModifiers() - isPrivate modifier is set to a wrong value"); + assertFalse(Modifier.isProtected(modifiers), + "Method Bindings.getClass().getModifiers() - isProtected modifier is set to a wrong value"); + assertTrue(Modifier.isAbstract(modifiers), + "Method Bindings.getClass().getModifiers() - isAbstract modifier is set to a wrong value"); + assertFalse(Modifier.isFinal(modifiers), + "Method Bindings.getClass().getModifiers() - isFinal modifier is set to a wrong value"); + assertTrue(Modifier.isInterface(modifiers), + "Method Bindings.getClass().getModifiers() - isInterface modifier is set to a wrong value"); + assertFalse(Modifier.isNative(modifiers), + "Method Bindings.getClass().getModifiers() - isNative modifier is set to a wrong value"); + assertFalse(Modifier.isStatic(modifiers), + "Method Bindings.getClass().getModifiers() - isStatic modifier is set to a wrong value"); + assertFalse(Modifier.isStrict(modifiers), + "Method Bindings.getClass().getModifiers() - isStrict modifier is set to a wrong value"); + assertFalse(Modifier.isSynchronized(modifiers), + "Method Bindings.getClass().getModifiers() - isSynchronized modifier is set to a wrong value"); + assertFalse(Modifier.isTransient(modifiers), + "Method Bindings.getClass().getModifiers() - isTransient modifier is set to a wrong value"); + assertFalse(Modifier.isVolatile(modifiers), + "Method Bindings.getClass().getModifiers() - isVolatile modifier is set to a wrong value"); + } + + /** + * Test for method javax.script.Bindings.getClass().getName() + */ + protected void testGetName() { + String name = this.bindingsClass.getName(); + assertEquals(name, "javax.script.Bindings", + "Method Bindings.getClass().getName() returns wrong value " + name); + } + + /** + * Test for method javax.script.Bindings.getClass().getPackage() + */ + protected void testGetPackage() { + Package p = this.bindingsClass.getPackage(); + String packageName = p.getName(); + assertEquals(packageName, "javax.script", + "Method Bindings.getClass().getPackage().getName() returns wrong value " + packageName); + } + + /** + * Test for method javax.script.Bindings.getClass().getSimpleName() + */ + protected void testGetSimpleName() { + String simpleName = this.bindingsClass.getSimpleName(); + assertEquals(simpleName, "Bindings", + "Method Bindings.getClass().getSimpleName() returns wrong value " + simpleName); + } + + /** + * Test for method javax.script.Bindings.getClass().getSuperclass() + */ + protected void testGetSuperclass() { + Class superClass = this.bindingsClass.getSuperclass(); + assertNull(superClass, + "Method Bindings.getClass().getSuperclass() does not return null"); + } + + /** + * Test for method javax.script.Bindings.getClass().getConstructors() + */ + protected void testGetConstructors() { + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all constructors for this class + Constructor[] constructors = this.bindingsClass.getConstructors(); + + // basic check for a number of constructors + assertEquals(constructors.length, 0, "no constructors should be set"); + + } + + /** + * Test for method javax.script.Bindings.getClass().getDeclaredConstructors() + */ + protected void testGetDeclaredConstructors() { + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all declared constructors for this class + Constructor[] declaredConstructors = this.bindingsClass.getDeclaredConstructors(); + + // basic check for a number of declared constructors + assertEquals(declaredConstructors.length, 0, "no constructors should be set"); + + } + + /** + * Test for method javax.script.Bindings.getClass().getFields() + */ + protected void testGetFields() { + // following fields should exists + final String[] fieldsThatShouldExists = { + }; + // get all fields + Field[] fields = this.bindingsClass.getFields(); + // and transform the array into a list of field names + List fieldsAsString = new ArrayList(); + for (Field field : fields) { + fieldsAsString.add(field.toString()); + } + // check if all required fields really exists + for (String fieldThatShouldExists : fieldsThatShouldExists) { + assertTrue(fieldsAsString.contains(fieldThatShouldExists), + "field " + fieldThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.Bindings.getClass().getDeclaredFields() + */ + protected void testGetDeclaredFields() { + // following fields should be declared + final String[] fieldsThatShouldExists = { + }; + // get all declared fields + Field[] declaredFields = this.bindingsClass.getDeclaredFields(); + // and transform the array into a list of field names + List declaredFieldsAsString = new ArrayList(); + for (Field field : declaredFields) { + declaredFieldsAsString.add(field.toString()); + } + // check if all required fields really exists + for (String fieldThatShouldExists : fieldsThatShouldExists) { + assertTrue(declaredFieldsAsString.contains(fieldThatShouldExists), + "field " + fieldThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.Bindings.getClass().getMethods() + */ + protected void testGetMethods() { + // following methods should be inherited + final String[] methodsThatShouldExists_jdk6 = { + }; + + final String[] methodsThatShouldExists_jdk7 = { + "public abstract boolean java.util.Map.containsValue(java.lang.Object)", + "public abstract boolean java.util.Map.equals(java.lang.Object)", + "public abstract boolean java.util.Map.isEmpty()", + "public abstract boolean javax.script.Bindings.containsKey(java.lang.Object)", + "public abstract int java.util.Map.hashCode()", + "public abstract int java.util.Map.size()", + "public abstract java.lang.Object java.util.Map.put(java.lang.Object,java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.get(java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.put(java.lang.String,java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.remove(java.lang.Object)", + "public abstract java.util.Collection java.util.Map.values()", + "public abstract java.util.Set java.util.Map.entrySet()", + "public abstract java.util.Set java.util.Map.keySet()", + "public abstract void java.util.Map.clear()", + "public abstract void javax.script.Bindings.putAll(java.util.Map)", + }; + + // get all inherited methods + Method[] methods = this.bindingsClass.getMethods(); + // and transform the array into a list of method names + List methodsAsString = new ArrayList(); + for (Method method : methods) { + methodsAsString.add(method.toString()); + } + String[] methodsThatShouldExists = getJavaVersion() < 7 ? methodsThatShouldExists_jdk6 : methodsThatShouldExists_jdk7; + // check if all required methods really exists + for (String methodThatShouldExists : methodsThatShouldExists) { + assertTrue(methodsAsString.contains(methodThatShouldExists), + "method " + methodThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.Bindings.getClass().getDeclaredMethods() + */ + protected void testGetDeclaredMethods() { + // following methods should be declared + final String[] declaredMethodsThatShouldExists_jdk6 = { + }; + + final String[] declaredMethodsThatShouldExists_jdk7 = { + "public abstract boolean javax.script.Bindings.containsKey(java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.get(java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.put(java.lang.String,java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.remove(java.lang.Object)", + "public abstract void javax.script.Bindings.putAll(java.util.Map)", + }; + + // get all declared methods + Method[] declaredMethods = this.bindingsClass.getDeclaredMethods(); + // and transform the array into a list of method names + List methodsAsString = new ArrayList(); + for (Method method : declaredMethods) { + methodsAsString.add(method.toString()); + } + String[] declaredMethodsThatShouldExists = getJavaVersion() < 7 ? declaredMethodsThatShouldExists_jdk6 : declaredMethodsThatShouldExists_jdk7; + // check if all required methods really exists + for (String methodThatShouldExists : declaredMethodsThatShouldExists) { + assertTrue(methodsAsString.contains(methodThatShouldExists), + "declared method " + methodThatShouldExists + " not found"); + } + } + + /** + * Test for instanceof operator applied to a class javax.script.Bindings + */ + @SuppressWarnings("cast") + protected void testInstanceOf() { + // tested object + Object o = (Bindings)(new SimpleBindings()); + + // basic check of instanceof operator + assertTrue(o instanceof Bindings, "instanceof Bindings is wrongly evaluated to false"); + + // check operator instanceof against all superclasses + assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); + } + + /** + * Entry point to this test case. + * + * @param args parameters passed from command line + */ + public static void main(String[] args) { + new BindingsClassTest().doTests(args); + } +} + From ptisnovs at icedtea.classpath.org Thu Oct 4 02:34:19 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 04 Oct 2012 09:34:19 +0000 Subject: /hg/gfx-test: New tests added to the test suite src/org/gfxtest/... Message-ID: changeset 2bb7a15bf318 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=2bb7a15bf318 author: Pavel Tisnovsky date: Thu Oct 04 11:37:00 2012 +0200 New tests added to the test suite src/org/gfxtest/testsuites/BitBltBasicTests.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltBasicTests.java | 165 +++++++++++++++++++++++ 2 files changed, 170 insertions(+), 0 deletions(-) diffs (187 lines): diff -r 8441dc42876a -r 2bb7a15bf318 ChangeLog --- a/ChangeLog Wed Oct 03 10:09:39 2012 +0200 +++ b/ChangeLog Thu Oct 04 11:37:00 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-04 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltBasicTests.java: + New tests added to this test suite. + 2012-10-03 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltBasicTests.java: diff -r 8441dc42876a -r 2bb7a15bf318 src/org/gfxtest/testsuites/BitBltBasicTests.java --- a/src/org/gfxtest/testsuites/BitBltBasicTests.java Wed Oct 03 10:09:39 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltBasicTests.java Thu Oct 04 11:37:00 2012 +0200 @@ -995,6 +995,171 @@ } /** + * Test basic BitBlt operation for horizontal stripes buffered image with type TYPE_INT_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); + } + + /** + * Test basic BitBlt operation for horizontal stripes buffered image with type TYPE_INT_BGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_BGR); + } + + /** + * Test basic BitBlt operation for horizontal stripes buffered image with type TYPE_INT_ARGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); + } + + /** + * Test basic BitBlt operation for horizontal stripes buffered image with type TYPE_INT_ARGB_PRE. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE); + } + + /** + * Test basic BitBlt operation for horizontal stripes buffered image with type TYPE_4BYTE_ABGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR); + } + + /** + * Test basic BitBlt operation for horizontal stripes buffered image with type TYPE_4BYTE_ABGR_PRE. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageType4ByteABGR_PRE(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE); + } + + /** + * Test basic BitBlt operation for horizontal stripes buffered image with type TYPE_BYTE_GRAY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY); + } + + /** + * Test basic BitBlt operation for horizontal stripes buffered image with type TYPE_USHORT_GRAY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY); + } + + /** + * Test basic BitBlt operation for horizontal stripes buffered image with type TYPE_USHORT_565_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB); + } + + /** + * Test basic BitBlt operation for horizontal stripes buffered image with type TYPE_USHORT_555_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB); + } + + /** + * Test basic BitBlt operation for horizontal stripes buffered image with type TYPE_3BYTE_BGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR); + } + + /** * Test basic BitBlt operation for vertical stripes buffered image with type * TYPE_BYTE_BINARY. * From bugzilla-daemon at icedtea.classpath.org Thu Oct 4 07:20:27 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 04 Oct 2012 14:20:27 +0000 Subject: [Bug 1096] NPEs and then launch fails with "access denied" In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1096 Adam Domurad changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adomurad at redhat.com --- Comment #3 from Adam Domurad --- I have reproduced this error, it seems to be related to the fact icedtea-web expects the inner-jar adom-ii__V0.2.8.jar to be signed, while webstart allows for only the outer-jar to be signed. I have managed to run the game by downloading the jars locally, tinkering the jnlp to point to the local folder, signing the nested jar, and putting it back in. There seems to be another issue however with icedtea-web unable to locate the springframework jars. I have not yet been able to determine where the proprietary implementation might be getting these from. I will work on a reproducer, and hopefully convince the maintainers to use a work-around. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121004/64cf69fe/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Oct 4 07:40:55 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 04 Oct 2012 14:40:55 +0000 Subject: [Bug 1096] ITW requires independent signing of nested jars In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1096 Adam Domurad changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|NPEs and then launch fails |ITW requires independent |with "access denied" |signing of nested jars -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121004/ebb13165/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Oct 4 07:45:36 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 04 Oct 2012 14:45:36 +0000 Subject: [Bug 1096] ITW requires independent signing of nested jars In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1096 Adam Domurad changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jvanek at redhat.com |adomurad at redhat.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121004/e9d45dc4/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Oct 4 14:02:18 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 04 Oct 2012 21:02:18 +0000 Subject: [Bug 1189] New: Icedtea-plugin needs code attribute instead of reading from jnlp. Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1189 Priority: P3 Bug ID: 1189 CC: unassigned at icedtea.classpath.org Assignee: dbhole at redhat.com Summary: Icedtea-plugin needs code attribute instead of reading from jnlp. Severity: normal Classification: Unclassified OS: Linux Reporter: fermarja at gmail.com Hardware: x86_64 Status: NEW Version: unspecified Component: Plugin Product: IcedTea-Web Created attachment 764 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=764&action=edit example working in sun-jdk but failing in icedtea When loading an applet by JNLP, in Windows sun-jdk-7, you can omit the code attribute, and indicate it on jnlp file. If you try this on icedtea-web you obtain the message: Warning: tag requires code attribute Even worse, if you use deployJava.js and you pass code attribute it works, but if you don't indicate code attribute, you'll get this message netx: Initialization Error: Could not initialize applet. (Fatal: Application Error: Unknown Main-Class. Could not determine the main class for this application.) net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize applet. and firefox/iceweasel will eat all your CPU until you kill the java process or press "stop script" option in the firefox's dialog. Attached an example that works in win7-i386-firefox-sunjdk and fails in debian-x86_64 -iceweasel-icedtea. Note: the example applet is not graphical, it's to make digital signatures calling it from javascript icedtea version : 1.3 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121004/d5072eac/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Oct 4 14:37:50 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 04 Oct 2012 21:37:50 +0000 Subject: [Bug 1189] Icedtea-plugin needs code attribute instead of reading from jnlp. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1189 Saad Mohammad changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |smohammad at redhat.com Assignee|dbhole at redhat.com |smohammad at redhat.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121004/cc998c51/attachment.html From ptisnovs at icedtea.classpath.org Fri Oct 5 02:40:35 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 05 Oct 2012 09:40:35 +0000 Subject: /hg/gfx-test: Added eleven new tests + updated javadoc: Message-ID: changeset 12b8706751c4 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=12b8706751c4 author: Pavel Tisnovsky date: Fri Oct 05 11:43:17 2012 +0200 Added eleven new tests + updated javadoc: * src/org/gfxtest/testsuites/PrintTestBitBlt.java: diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/PrintTestBitBlt.java | 189 ++++++++++++++++++++++++ 2 files changed, 194 insertions(+), 0 deletions(-) diffs (376 lines): diff -r 2bb7a15bf318 -r 12b8706751c4 ChangeLog --- a/ChangeLog Thu Oct 04 11:37:00 2012 +0200 +++ b/ChangeLog Fri Oct 05 11:43:17 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-05 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestBitBlt.java: + Added eleven new tests + updated javadoc. + 2012-10-04 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltBasicTests.java: diff -r 2bb7a15bf318 -r 12b8706751c4 src/org/gfxtest/testsuites/PrintTestBitBlt.java --- a/src/org/gfxtest/testsuites/PrintTestBitBlt.java Thu Oct 04 11:37:00 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestBitBlt.java Fri Oct 05 11:43:17 2012 +0200 @@ -89,6 +89,7 @@ */ public TestResult testBitBltEmptyBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR); } @@ -103,6 +104,7 @@ */ public TestResult testBitBltEmptyBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR); } @@ -117,6 +119,7 @@ */ public TestResult testBitBltEmptyBufferedImageType4ByteABGR_Pre(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE); } @@ -131,6 +134,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -145,6 +149,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); } @@ -159,6 +164,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); } @@ -173,6 +179,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE); } @@ -187,6 +194,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_BGR); } @@ -201,6 +209,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB); } @@ -215,6 +224,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB); } @@ -229,6 +239,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY); } @@ -243,6 +254,7 @@ */ public TestResult testBitBltEmptyBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY); } @@ -257,10 +269,176 @@ */ public TestResult testBitBltCheckerBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_BGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_BGR); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB_PRE. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_4BYTE_ABGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_4BYTE_ABGR_PRE. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGR_PRE(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_BYTE_GRAY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_USHORT_GRAY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_USHORT_565_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_USHORT_555_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR); + } + + /** * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_BYTE_BINARY. * * @param image @@ -271,6 +449,7 @@ */ public TestResult testBitBltDiagonalCheckerBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -285,6 +464,7 @@ */ public TestResult testBitBltGridBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -300,6 +480,7 @@ */ public TestResult testBitBltDiagonalGridBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -315,6 +496,7 @@ */ public TestResult testBitBltHorizontalStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -330,6 +512,7 @@ */ public TestResult testBitBltVerticalStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -345,6 +528,7 @@ */ public TestResult testBitBltDiagonalStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -360,6 +544,7 @@ */ public TestResult testBitBltHorizontalColorStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -375,6 +560,7 @@ */ public TestResult testBitBltVerticalColorStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -390,6 +576,7 @@ */ public TestResult testBitBltDiagonalColorStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithDiagonalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -405,6 +592,7 @@ */ public TestResult testBitBltBWDotsImageTypeByteBinary(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithBWDotsImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); } @@ -420,6 +608,7 @@ */ public TestResult testBitBltColorDotsImageTypeByteIntARGB(TestImage image, Graphics2D graphics2d) { + // create new buffered image and then perform basic BitBlt test. return CommonBitmapOperations.doBitBltTestWithColorDotsImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); } From ptisnovs at icedtea.classpath.org Fri Oct 5 02:47:28 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 05 Oct 2012 09:47:28 +0000 Subject: /hg/rhino-tests: Make the test src/org/RhinoTests/ScriptExceptio... Message-ID: changeset f7012c8427c1 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=f7012c8427c1 author: Pavel Tisnovsky date: Fri Oct 05 11:49:48 2012 +0200 Make the test src/org/RhinoTests/ScriptExceptionClassTest.java compatible with JDK 7. diffstat: ChangeLog | 5 + src/org/RhinoTests/ScriptExceptionClassTest.java | 85 +++++++++++++++++------ 2 files changed, 66 insertions(+), 24 deletions(-) diffs (163 lines): diff -r 1469d167df45 -r f7012c8427c1 ChangeLog --- a/ChangeLog Thu Oct 04 11:12:33 2012 +0200 +++ b/ChangeLog Fri Oct 05 11:49:48 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-05 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptExceptionClassTest.java: + Make this test compatible with JDK 7. + 2012-10-04 Pavel Tisnovsky * src/org/RhinoTests/BindingsClassTest.java: diff -r 1469d167df45 -r f7012c8427c1 src/org/RhinoTests/ScriptExceptionClassTest.java --- a/src/org/RhinoTests/ScriptExceptionClassTest.java Thu Oct 04 11:12:33 2012 +0200 +++ b/src/org/RhinoTests/ScriptExceptionClassTest.java Fri Oct 05 11:49:48 2012 +0200 @@ -263,7 +263,7 @@ * Test for method javax.script.ScriptException.getClass().getSuperclass() */ protected void testGetSuperclass() { - Class superClass = this.scriptExceptionClass.getSuperclass(); + Class superClass = this.scriptExceptionClass.getSuperclass(); String superClassName = superClass.getName(); assertEquals(superClassName, "java.lang.Exception", "Method ScriptException.getClass().getSuperclass() returns wrong value " + superClassName); @@ -274,13 +274,27 @@ */ protected void testGetConstructors() { // map of constructors which should exists - Map testedConstructors = new HashMap(); - testedConstructors.put("public javax.script.ScriptException(java.lang.String)", "javax.script.ScriptException"); - testedConstructors.put("public javax.script.ScriptException(java.lang.Exception)", "javax.script.ScriptException"); - testedConstructors.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int)", "javax.script.ScriptException"); - testedConstructors.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int,int)", "javax.script.ScriptException"); + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); - Constructor[] constructors = this.scriptExceptionClass.getDeclaredConstructors(); + testedConstructors_jdk6.put("public javax.script.ScriptException(java.lang.String)", "javax.script.ScriptException"); + testedConstructors_jdk6.put("public javax.script.ScriptException(java.lang.Exception)", "javax.script.ScriptException"); + testedConstructors_jdk6.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int)", "javax.script.ScriptException"); + testedConstructors_jdk6.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int,int)", "javax.script.ScriptException"); + + testedConstructors_jdk7.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int,int)", "javax.script.ScriptException"); + testedConstructors_jdk7.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int)", "javax.script.ScriptException"); + testedConstructors_jdk7.put("public javax.script.ScriptException(java.lang.Exception)", "javax.script.ScriptException"); + testedConstructors_jdk7.put("public javax.script.ScriptException(java.lang.String)", "javax.script.ScriptException"); + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all constructors for this class + Constructor[] constructors = this.scriptExceptionClass.getConstructors(); + + // basic check for a number of constructors assertEquals(constructors.length, 4, "only 4 constructors should be set"); // check if all constructors exists @@ -296,20 +310,34 @@ * Test for method javax.script.ScriptException.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - // map of declared constructors which should exists - Map testedConstructors = new HashMap(); - testedConstructors.put("public javax.script.ScriptException(java.lang.String)", "javax.script.ScriptException"); - testedConstructors.put("public javax.script.ScriptException(java.lang.Exception)", "javax.script.ScriptException"); - testedConstructors.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int)", "javax.script.ScriptException"); - testedConstructors.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int,int)", "javax.script.ScriptException"); + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); - Constructor[] constructors = this.scriptExceptionClass.getDeclaredConstructors(); - assertEquals(constructors.length, 4, "only 4 constructors should be set"); + testedConstructors_jdk6.put("public javax.script.ScriptException(java.lang.String)", "javax.script.ScriptException"); + testedConstructors_jdk6.put("public javax.script.ScriptException(java.lang.Exception)", "javax.script.ScriptException"); + testedConstructors_jdk6.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int)", "javax.script.ScriptException"); + testedConstructors_jdk6.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int,int)", "javax.script.ScriptException"); - // check if all constructors exists - for (Constructor constructor : constructors) { - String constructorName = constructors[0].getName(); - String constructorString = constructors[0].toString(); + testedConstructors_jdk7.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int,int)", "javax.script.ScriptException"); + testedConstructors_jdk7.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int)", "javax.script.ScriptException"); + testedConstructors_jdk7.put("public javax.script.ScriptException(java.lang.Exception)", "javax.script.ScriptException"); + testedConstructors_jdk7.put("public javax.script.ScriptException(java.lang.String)", "javax.script.ScriptException"); + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all declared constructors for this class + Constructor[] declaredConstructors = this.scriptExceptionClass.getDeclaredConstructors(); + + // basic check for a number of declared constructors + assertEquals(declaredConstructors.length, 4, "only 4 constructors should be set"); + + // check if all declared constructors exists + for (Constructor declaredConstructor : declaredConstructors) { + String constructorName = declaredConstructor.getName(); + String constructorString = declaredConstructor.toString(); assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); } @@ -396,6 +424,8 @@ "public final native void java.lang.Object.notify()", "public final native void java.lang.Object.notifyAll()", "public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException", + "public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()", + "public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable)", "public final void java.lang.Object.wait() throws java.lang.InterruptedException", "public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException", "public int javax.script.ScriptException.getColumnNumber()", @@ -405,16 +435,14 @@ "public java.lang.String java.lang.Throwable.toString()", "public java.lang.String javax.script.ScriptException.getFileName()", "public java.lang.String javax.script.ScriptException.getMessage()", + "public native int java.lang.Object.hashCode()", + "public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()", "public synchronized java.lang.Throwable java.lang.Throwable.getCause()", - "public native int java.lang.Object.hashCode()", "public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable)", - "public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()", "public void java.lang.Throwable.printStackTrace()", "public void java.lang.Throwable.printStackTrace(java.io.PrintStream)", "public void java.lang.Throwable.printStackTrace(java.io.PrintWriter)", "public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])", - "public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable)", - "public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()", }; // get all inherited methods @@ -437,12 +465,20 @@ */ protected void testGetDeclaredMethods() { // following methods should be declared - final String[] declaredMethodsThatShouldExists = { + final String[] declaredMethodsThatShouldExists_jdk6 = { "public int javax.script.ScriptException.getColumnNumber()", "public int javax.script.ScriptException.getLineNumber()", "public java.lang.String javax.script.ScriptException.getFileName()", "public java.lang.String javax.script.ScriptException.getMessage()", }; + + final String[] declaredMethodsThatShouldExists_jdk7 = { + "public int javax.script.ScriptException.getColumnNumber()", + "public int javax.script.ScriptException.getLineNumber()", + "public java.lang.String javax.script.ScriptException.getFileName()", + "public java.lang.String javax.script.ScriptException.getMessage()", + }; + // get all declared methods Method[] declaredMethods = this.scriptExceptionClass.getDeclaredMethods(); // and transform the array into a list of method names @@ -450,6 +486,7 @@ for (Method method : declaredMethods) { methodsAsString.add(method.toString()); } + String[] declaredMethodsThatShouldExists = getJavaVersion() < 7 ? declaredMethodsThatShouldExists_jdk6 : declaredMethodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : declaredMethodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), From bugzilla-daemon at icedtea.classpath.org Fri Oct 5 09:29:05 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 05 Oct 2012 16:29:05 +0000 Subject: [Bug 1190] New: unuseable javaws cache handling Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1190 Priority: P3 Bug ID: 1190 CC: unassigned at icedtea.classpath.org Assignee: omajid at redhat.com Summary: unuseable javaws cache handling Severity: major Classification: Unclassified OS: Linux Reporter: horst.fiedler.at at gmail.com Hardware: x86 Status: NEW Version: 7-1.0 Component: NetX Product: IcedTea javaws caching doesnt distinguish webstart applications when they use different ports (aka for test versus production version), e.g. javaws http://host:8080/path/webapp.jnlp and javaws http://host:18080/path/webapp.jnlp shows same (the one started first after javaws -Xclearcache ) application while sun/oracle javaws performs correctly. Suggestion: Cache filenames shall include port part !!!! e.g. .icedtea/cache/9/http/host/port/path/... instead of .icedtea/cache/9/http/host/path/... -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121005/b5add066/attachment.html From bugzilla-daemon at icedtea.classpath.org Fri Oct 5 11:24:00 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 05 Oct 2012 18:24:00 +0000 Subject: [Bug 1190] unuseable javaws cache handling In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1190 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dbhole at redhat.com Assignee|omajid at redhat.com |jvanek at redhat.com --- Comment #1 from Deepak Bhole --- Re-assigning to Jiri who has worked on caching code before. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121005/f045ae2a/attachment.html From adomurad at redhat.com Fri Oct 5 12:41:57 2012 From: adomurad at redhat.com (Adam Domurad) Date: Fri, 05 Oct 2012 15:41:57 -0400 Subject: [RFC][icedtea-web]: Fix PR1166 - Embedded JNLP File is not supported in applet tag In-Reply-To: <506C7F7B.8020909@redhat.com> References: <50648FF6.408@redhat.com> <50660483.3030309@redhat.com> <506B44E6.7030305@redhat.com> <506C7F7B.8020909@redhat.com> Message-ID: <506F3805.40804@redhat.com> On 10/03/2012 02:10 PM, Saad Mohammad wrote: > Hi Adam, > > Thanks for looking over my patches. I updated the reproducers after your review. > Along with the attached reproducer, I also added unit test and updated the bug > fix patch so it is more compatible with tests. > > Also, just a note, the reproducers do all pass for me through the test engine. > Let me know if you are having any trouble. > > Thanks. > > CHANGELOGS: > ============================================================================== > BUG FIX: > > 2012-10-03 Saad Mohammad > > Fix PR1166: Embedded JNLP File is not supported in applet tag. > * configure.ac: Checks for sun.misc.BASE64Encoder and > sun.misc.BASE64Decoder > * netx/net/sourceforge/jnlp/JNLPFile.java (JNLPFile): > New constructor which accepts inputstream of jnlp file and a > specified codebase. > * netx/net/sourceforge/jnlp/Parser.java (Parser): If parsing of > codebase fails, it will overwrite the codebase with the one passed > in through parameters. > * netx/net/sourceforge/jnlp/PluginBridge.java: > (PluginBridge) Supports embedded jnlp file. > (decodeBase64String) Decodes Base64 strings to byte array. > ============================================================================== > REPRODUCER: > > 2012-10-03 Saad Mohammad > > Added reproducer for PR1166. > * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlp.jnlp: > Launching jnlp file that is used by jnlp_href in applet tag > * > tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletNoCodebase.html: > Applet with an embedded jnlp file with no codebase specified > * > tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletWithDotCodebase.html: > Applet with an embedded jnlp file with codebase set as a 'dot' > * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/JnlpInApplet.html: > Applet with jnlp_href file. > * tests/reproducers/simple/EmbeddedJnlpInApplet/srcs/EmbeddedJnlp.java: > Simple class that outputs strings. > * > tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java: > Testcase that tests embedded jnlps in html pages. > > ============================================================================== > UNIT TESTS: > > 2012-10-03 Saad Mohammad > > * tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java: > Tests the JNLPFile constructor that accepts an InputStream and an alternative > codebase. > * tests/netx/unit/net/sourceforge/jnlp/ParserTest.java: > Tests if the constructor handles the alternative codebase parameter correctly. > * tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java: > Tests if BASE64 strings are decoded correctly and if PluginBridge is > constructed with an > embedded jnlp. > Reviewing updated reproducer: > diff --git > a/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlp.jnlp > b/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlp.jnlp > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlp.jnlp > @@ -0,0 +1,61 @@ > + > + > + > + > + SignedAppletTest > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web "/> > + SignedAppletTest > + > + > + > + > + > + > + + documentBase="." > + name="EmbeddedJnlp" > + main-class="EmbeddedJnlp" > + width="100" > + height="100"> > + > + > + > + > + > diff --git > a/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletNoCodebase.html > b/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletNoCodebase.html > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletNoCodebase.html > @@ -0,0 +1,98 @@ > + > + > +

> + > + > + > + > + + > value="PCEtLQ0KDQpUaGlzIGZpbGUgaXMgcGFydCBvZiBJY2VkVGVhLg0KDQpJY2VkVGVhIGlzIGZyZWUg > +c29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkNCml0IHVuZGVy > +IHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVk > +IGJ5DQp0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyLCBvciAo > +YXQgeW91ciBvcHRpb24pDQphbnkgbGF0ZXIgdmVyc2lvbi4NCg0KSWNlZFRlYSBpcyBkaXN0cmli > +dXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQNCldJVEhPVVQgQU5Z > +IFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YNCk1FUkNIQU5U > +QUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgR05V > +DQpHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuDQoNCllvdSBzaG91bGQg > +aGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlDQph > +bG9uZyB3aXRoIEljZWRUZWE7IHNlZSB0aGUgZmlsZSBDT1BZSU5HLiAgSWYgbm90LCB3cml0ZSB0 > +byB0aGUNCkZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgNTEgRnJhbmtsaW4gU3RyZWV0 > +LCBGaWZ0aCBGbG9vciwgQm9zdG9uLCBNQQ0KMDIxMTAtMTMwMSBVU0EuDQoNCkxpbmtpbmcgdGhp > +cyBsaWJyYXJ5IHN0YXRpY2FsbHkgb3IgZHluYW1pY2FsbHkgd2l0aCBvdGhlciBtb2R1bGVzIGlz > +DQptYWtpbmcgYSBjb21iaW5lZCB3b3JrIGJhc2VkIG9uIHRoaXMgbGlicmFyeS4gIFRodXMsIHRo > +ZSB0ZXJtcyBhbmQNCmNvbmRpdGlvbnMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNl > +IGNvdmVyIHRoZSB3aG9sZQ0KY29tYmluYXRpb24uDQoNCkFzIGEgc3BlY2lhbCBleGNlcHRpb24s > +IHRoZSBjb3B5cmlnaHQgaG9sZGVycyBvZiB0aGlzIGxpYnJhcnkgZ2l2ZSB5b3UNCnBlcm1pc3Np > +b24gdG8gbGluayB0aGlzIGxpYnJhcnkgd2l0aCBpbmRlcGVuZGVudCBtb2R1bGVzIHRvIHByb2R1 > +Y2UgYW4NCmV4ZWN1dGFibGUsIHJlZ2FyZGxlc3Mgb2YgdGhlIGxpY2Vuc2UgdGVybXMgb2YgdGhl > +c2UgaW5kZXBlbmRlbnQNCm1vZHVsZXMsIGFuZCB0byBjb3B5IGFuZCBkaXN0cmlidXRlIHRoZSBy > +ZXN1bHRpbmcgZXhlY3V0YWJsZSB1bmRlcg0KdGVybXMgb2YgeW91ciBjaG9pY2UsIHByb3ZpZGVk > +IHRoYXQgeW91IGFsc28gbWVldCwgZm9yIGVhY2ggbGlua2VkDQppbmRlcGVuZGVudCBtb2R1bGUs > +IHRoZSB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB0aGUgbGljZW5zZSBvZiB0aGF0DQptb2R1bGUu > +ICBBbiBpbmRlcGVuZGVudCBtb2R1bGUgaXMgYSBtb2R1bGUgd2hpY2ggaXMgbm90IGRlcml2ZWQg > +ZnJvbQ0Kb3IgYmFzZWQgb24gdGhpcyBsaWJyYXJ5LiAgSWYgeW91IG1vZGlmeSB0aGlzIGxpYnJh > +cnksIHlvdSBtYXkgZXh0ZW5kDQp0aGlzIGV4Y2VwdGlvbiB0byB5b3VyIHZlcnNpb24gb2YgdGhl > +IGxpYnJhcnksIGJ1dCB5b3UgYXJlIG5vdA0Kb2JsaWdhdGVkIHRvIGRvIHNvLiAgSWYgeW91IGRv > +IG5vdCB3aXNoIHRvIGRvIHNvLCBkZWxldGUgdGhpcw0KZXhjZXB0aW9uIHN0YXRlbWVudCBmcm9t > +IHlvdXIgdmVyc2lvbi4NCg0KIC0tPg0KPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRm > +LTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgaHJlZj0iRW1iZWRkZWRKbmxwV2l0aE5vQ29kZWJhc2Uu > +am5scCI+DQogICAgPGluZm9ybWF0aW9uPg0KICAgICAgICA8dGl0bGU+U2lnbmVkQXBwbGV0VGVz > +dDwvdGl0bGU+DQogICAgICAgIDx2ZW5kb3I+SWNlZFRlYTwvdmVuZG9yPg0KICAgICAgICA8aG9t > +ZXBhZ2UgaHJlZj0iaHR0cDovL2ljZWR0ZWEuY2xhc3NwYXRoLm9yZy93aWtpL0ljZWRUZWEtV2Vi > +I1Rlc3RpbmdfSWNlZFRlYS1XZWIgIi8+DQogICAgICAgIDxkZXNjcmlwdGlvbj5TaWduZWRBcHBs > +ZXRUZXN0PC9kZXNjcmlwdGlvbj4NCiAgICAgICAgPG9mZmxpbmUvPg0KICAgIDwvaW5mb3JtYXRp > +b24+DQogICAgPHJlc291cmNlcz4NCiAgICAgICAgPGoyc2UgdmVyc2lvbj0iMS40KyIvPg0KICAg > +ICAgICA8amFyIGhyZWY9IkVtYmVkZGVkSm5scEluQXBwbGV0LmphciIvPg0KICAgIDwvcmVzb3Vy > +Y2VzPg0KICAgIDxhcHBsZXQtZGVzYw0KICAgICAgZG9jdW1lbnRCYXNlPSIuIg0KICAgICAgbmFt > +ZT0iRW1iZWRkZWRKbmxwIg0KICAgICAgbWFpbi1jbGFzcz0iRW1iZWRkZWRKbmxwIg0KICAgICAg > +d2lkdGg9IjEwMCINCiAgICAgIGhlaWdodD0iMTAwIj4NCiAgICA8L2FwcGxldC1kZXNjPg0KPC9q > +bmxwPg0KDQoNCjwvYXBwbGV0LWRlc2M+"> > + > + > +

> + > + > diff --git > a/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletWithDotCodebase.html > b/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletWithDotCodebase.html > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletWithDotCodebase.html > @@ -0,0 +1,98 @@ > + > + > +

> + > + > + > + > + + > value="PCEtLQ0KDQpUaGlzIGZpbGUgaXMgcGFydCBvZiBJY2VkVGVhLg0KDQpJY2VkVGVhIGlzIGZyZWUg > +c29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkNCml0IHVuZGVy > +IHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVk > +IGJ5DQp0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyLCBvciAo > +YXQgeW91ciBvcHRpb24pDQphbnkgbGF0ZXIgdmVyc2lvbi4NCg0KSWNlZFRlYSBpcyBkaXN0cmli > +dXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQNCldJVEhPVVQgQU5Z > +IFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YNCk1FUkNIQU5U > +QUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgR05V > +DQpHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuDQoNCllvdSBzaG91bGQg > +aGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlDQph > +bG9uZyB3aXRoIEljZWRUZWE7IHNlZSB0aGUgZmlsZSBDT1BZSU5HLiAgSWYgbm90LCB3cml0ZSB0 > +byB0aGUNCkZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgNTEgRnJhbmtsaW4gU3RyZWV0 > +LCBGaWZ0aCBGbG9vciwgQm9zdG9uLCBNQQ0KMDIxMTAtMTMwMSBVU0EuDQoNCkxpbmtpbmcgdGhp > +cyBsaWJyYXJ5IHN0YXRpY2FsbHkgb3IgZHluYW1pY2FsbHkgd2l0aCBvdGhlciBtb2R1bGVzIGlz > +DQptYWtpbmcgYSBjb21iaW5lZCB3b3JrIGJhc2VkIG9uIHRoaXMgbGlicmFyeS4gIFRodXMsIHRo > +ZSB0ZXJtcyBhbmQNCmNvbmRpdGlvbnMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNl > +IGNvdmVyIHRoZSB3aG9sZQ0KY29tYmluYXRpb24uDQoNCkFzIGEgc3BlY2lhbCBleGNlcHRpb24s > +IHRoZSBjb3B5cmlnaHQgaG9sZGVycyBvZiB0aGlzIGxpYnJhcnkgZ2l2ZSB5b3UNCnBlcm1pc3Np > +b24gdG8gbGluayB0aGlzIGxpYnJhcnkgd2l0aCBpbmRlcGVuZGVudCBtb2R1bGVzIHRvIHByb2R1 > +Y2UgYW4NCmV4ZWN1dGFibGUsIHJlZ2FyZGxlc3Mgb2YgdGhlIGxpY2Vuc2UgdGVybXMgb2YgdGhl > +c2UgaW5kZXBlbmRlbnQNCm1vZHVsZXMsIGFuZCB0byBjb3B5IGFuZCBkaXN0cmlidXRlIHRoZSBy > +ZXN1bHRpbmcgZXhlY3V0YWJsZSB1bmRlcg0KdGVybXMgb2YgeW91ciBjaG9pY2UsIHByb3ZpZGVk > +IHRoYXQgeW91IGFsc28gbWVldCwgZm9yIGVhY2ggbGlua2VkDQppbmRlcGVuZGVudCBtb2R1bGUs > +IHRoZSB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB0aGUgbGljZW5zZSBvZiB0aGF0DQptb2R1bGUu > +ICBBbiBpbmRlcGVuZGVudCBtb2R1bGUgaXMgYSBtb2R1bGUgd2hpY2ggaXMgbm90IGRlcml2ZWQg > +ZnJvbQ0Kb3IgYmFzZWQgb24gdGhpcyBsaWJyYXJ5LiAgSWYgeW91IG1vZGlmeSB0aGlzIGxpYnJh > +cnksIHlvdSBtYXkgZXh0ZW5kDQp0aGlzIGV4Y2VwdGlvbiB0byB5b3VyIHZlcnNpb24gb2YgdGhl > +IGxpYnJhcnksIGJ1dCB5b3UgYXJlIG5vdA0Kb2JsaWdhdGVkIHRvIGRvIHNvLiAgSWYgeW91IGRv > +IG5vdCB3aXNoIHRvIGRvIHNvLCBkZWxldGUgdGhpcw0KZXhjZXB0aW9uIHN0YXRlbWVudCBmcm9t > +IHlvdXIgdmVyc2lvbi4NCg0KIC0tPg0KPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRm > +LTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgaHJlZj0iRW1iZWRkZWRKbmxwV2l0aERvdENvZGViYXNl > +LmpubHAiIGNvZGViYXNlPSIuIj4NCiAgICA8aW5mb3JtYXRpb24+DQogICAgICAgIDx0aXRsZT5T > +aWduZWRBcHBsZXRUZXN0PC90aXRsZT4NCiAgICAgICAgPHZlbmRvcj5JY2VkVGVhPC92ZW5kb3I+ > +DQogICAgICAgIDxob21lcGFnZSBocmVmPSJodHRwOi8vaWNlZHRlYS5jbGFzc3BhdGgub3JnL3dp > +a2kvSWNlZFRlYS1XZWIjVGVzdGluZ19JY2VkVGVhLVdlYiAiLz4NCiAgICAgICAgPGRlc2NyaXB0 > +aW9uPlNpZ25lZEFwcGxldFRlc3Q8L2Rlc2NyaXB0aW9uPg0KICAgICAgICA8b2ZmbGluZS8+DQog > +ICAgPC9pbmZvcm1hdGlvbj4NCiAgICA8cmVzb3VyY2VzPg0KICAgICAgICA8ajJzZSB2ZXJzaW9u > +PSIxLjQrIi8+DQogICAgICAgIDxqYXIgaHJlZj0iRW1iZWRkZWRKbmxwSW5BcHBsZXQuamFyIi8+ > +DQogICAgPC9yZXNvdXJjZXM+DQogICAgPGFwcGxldC1kZXNjDQogICAgICBkb2N1bWVudEJhc2U9 > +Ii4iDQogICAgICBuYW1lPSJFbWJlZGRlZEpubHAiDQogICAgICBtYWluLWNsYXNzPSJFbWJlZGRl > +ZEpubHAiDQogICAgICB3aWR0aD0iMTAwIg0KICAgICAgaGVpZ2h0PSIxMDAiPg0KICAgIDwvYXBw > +bGV0LWRlc2M+DQo8L2pubHA+DQoNCg0KPC9hcHBsZXQtZGVzYz4="> > + > + > +

> + > + > diff --git > a/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/JnlpInApplet.html > b/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/JnlpInApplet.html > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/simple/EmbeddedJnlpInApplet/resources/JnlpInApplet.html > @@ -0,0 +1,45 @@ > + > + > +

> + > + > + > +

> + > + > diff --git > a/tests/reproducers/simple/EmbeddedJnlpInApplet/srcs/EmbeddedJnlp.java > b/tests/reproducers/simple/EmbeddedJnlpInApplet/srcs/EmbeddedJnlp.java > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/EmbeddedJnlpInApplet/srcs/EmbeddedJnlp.java > @@ -0,0 +1,83 @@ > +/* EmbeddedJnlp.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import java.applet.Applet; > + > + at SuppressWarnings("serial") > +public class EmbeddedJnlp extends Applet { > + > + private class Killer extends Thread { > + > + public int n = 2000; > + > + @Override > + public void run() { > + try { > + Thread.sleep(n); > + System.out.println("AppletTestSigned killing himself > after " + n + " ms of life"); This isn't AppletTestSigned:) > + System.out.println("*** APPLET FINISHED ***"); > + System.exit(0); > + } catch (Exception ex) { > + } > + } > + } > + > + private Killer killer; > + > + @Override > + public void init() { > + System.out.println("Starting EmbeddedJnlp Class"); > + killer = new Killer(); > + } > + > + @Override > + public void start() { > + System.out.println("EmbeddedJnlp was started"); > + killer.start(); > + System.out.println("killer was started"); > + } I think it'd be simpler (& slightly faster) to not have a killer, and simply print APPLET FINISHED in the start() method. The auto-closer will 'kill' the applet. > > + > + @Override > + public void stop() { > + System.out.println("Stopping EmbeddedJnlp"); > + } > + > + @Override > + public void destroy() { > + System.out.println("Destroying EmbeddedJnlp"); > + } > +} > diff --git > a/tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java > b/tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java > @@ -0,0 +1,73 @@ > +/* EmbeddedJnlpInAppletTest.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import junit.framework.Assert; > +import net.sourceforge.jnlp.ProcessResult; > +import net.sourceforge.jnlp.ServerAccess.AutoClose; > +import net.sourceforge.jnlp.browsertesting.BrowserTest; > +import net.sourceforge.jnlp.browsertesting.Browsers; > +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; > +import net.sourceforge.jnlp.annotations.TestInBrowsers; > +import org.junit.Test; > + > +public class EmbeddedJnlpInAppletTest extends BrowserTest { > + > + final static String s = > AutoOkClosingListener.MAGICAL_OK_CLOSING_STRING; > + > + @Test > + @TestInBrowsers(testIn = { Browsers.one }) > + public void JnlpInApplet() throws Exception { > + ProcessResult pr = > server.executeBrowser("/JnlpInApplet.html", > AutoClose.CLOSE_ON_CORRECT_END); > + Assert.assertTrue("EmbeddedJnlp.class was not correctly > launched in JnlpInApplet.html: " + pr.stdout + pr.stderr, > pr.stdout.contains(s)); > + } Might be an nitpick, but I'd prefer a statement here just saying the message you were looking for wasn't found. Listening stdout and stderr is something logs_reproducers.html does well already. > + > + @Test > + @TestInBrowsers(testIn = { Browsers.one }) > + public void EmbeddedJnlpInAppletWithADotAsCodebase() throws > Exception { > + ProcessResult pr = > server.executeBrowser("/EmbeddedJnlpInAppletWithDotCodebase.html", > AutoClose.CLOSE_ON_CORRECT_END); > + Assert.assertTrue("EmbeddedJnlp.class was not correctly > launched in EmbeddedJnlpInAppletWithDotCodebase.html: " + pr.stdout + > pr.stderr, > + pr.stdout.contains(s)); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.one }) > + public void EmbeddedJnlpInAppletWithNoCodebase() throws Exception { > + ProcessResult pr = > server.executeBrowser("/EmbeddedJnlpInAppletWithNoCodebase.html", > AutoClose.CLOSE_ON_CORRECT_END); > + Assert.assertTrue("EmbeddedJnlp.class was not correctly > launched in EmbeddedJnlpInAppletWithNoCodebase.html: " + pr.stdout + > pr.stderr, > + pr.stdout.contains(s)); > + } > +} Otherwise, good stuff. - Adam From smohammad at redhat.com Fri Oct 5 14:37:08 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Fri, 05 Oct 2012 17:37:08 -0400 Subject: [RFC][icedtea-web]: DownloadService implementation In-Reply-To: <1348857406.17801.92.camel@adomurad-desktop> References: <50411B4E.8080308@redhat.com> <50609F44.2040102@redhat.com> <1348857406.17801.92.camel@adomurad-desktop> Message-ID: <506F5304.9010606@redhat.com> Hi Adam, Thanks for the review of DownloadService implementation patch. The updated patch is attached. As you recommend in the review, I have moved as much functionality as I could away from JNLPClassLoader to two new classes: net.sourceforge.jnlp.runtime.LocateJnlpClassLoader net.sourceforge.jnlp.runtime.ManageJnlpResources I also removed XDownloadService helper and replaced it with XDownloadService.getClassLoader( ). For unit testing purposes, I will just create a class which inherits from XDownloadService and only override getClassLoader( ) so it returns a mocked JNLPClassLoader since runtime resources are not available. You can still test this patch with the reproducer patch. Let me know if you have any other questions. Thanks :). Changelog: 2012-10-05 Saad Mohammad Core implementation of DownloadService. * netx/net/sourceforge/jnlp/cache/CacheUtil.java (getCacheParentDirectory): Returns the parent directory of the cached resource. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (getLoaders): Returns all loaders that this loader uses, including itself (addNewJar): Adds a new jar to the classloader with specified UpdatePolicy. (removeJars): Remove jars from the filesystem. (initializeNewJarDownload): Downloads and initializes jars into the current loader. (manageExternalJars): Manages jars which are not mentioned in the JNLP file. * netx/net/sourceforge/jnlp/runtime/LocateJnlpClassLoader.java: (getLoaderByJnlpFile): Returns the classloader of the jnlp file specified. (getLoaderByResourceUrl): Returns the classloader that contains the specified jar. * netx/net/sourceforge/jnlp/runtime/ManageJnlpResources.java: (findJars): Returns jars from the JNLP file with the specified partname. (removeCachedJars): Removes jar from cache. (downloadJars): Downloads jars identified by part name. (loadExternalResouceToCache): Download and initalize resources which are not mentioned in the jnlp file. (removeExternalCachedResource): Removes resources from cache which are not mentioned in the jnlp file. (isExternalResourceCached): Determines if the resource that is not mentioned in the jnlp file is cached and returns a boolean with the result. * netx/net/sourceforge/jnlp/services/XDownloadService.java: Core implementation of DownloadService. -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: implementation9.patch Type: text/x-patch Size: 24337 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121005/1dcc13b3/implementation9.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: changelog0-2.patch Type: text/x-patch Size: 1787 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121005/1dcc13b3/changelog0-2.patch From bugzilla-daemon at icedtea.classpath.org Fri Oct 5 16:52:32 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 05 Oct 2012 23:52:32 +0000 Subject: [Bug 1191] New: JRE crashes when out of memory - "Failed to write core dump." Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1191 Priority: P3 Bug ID: 1191 CC: unassigned at icedtea.classpath.org Assignee: gnu.andrew at redhat.com Summary: JRE crashes when out of memory - "Failed to write core dump." Severity: normal Classification: Unclassified OS: Linux Reporter: lyubomir.p.k at gmail.com Hardware: x86_64 Status: NEW Version: unspecified Component: IcedTea Product: IcedTea Created attachment 765 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=765&action=edit Log file written on crash Running several instances of the following code: package tool; import javax.swing.*; public class BAT { public static void main(String[] args) { JFrame frame = new JFrame(); frame.setSize(400, 300); frame.setVisible(true); } } either causes this exception: Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread or this error: Error occurred during initialization of VM java.lang.OutOfMemoryError: unable to create new native thread In the latter case, if I try to run one more instance, I am notified of a crash and a log is written similar to the one attached. - Additional notes: Not sure how to determine component version. This is what I have installed (currently latest in the Arch Linux repositories): jdk7-openjdk 7.u7_2.3.2-2 jre7-openjdk 7.u7_2.3.2-2 jre7-openjdk-headless 7.u7_2.3.2-2 icedtea-web-java7 1.3-1 icedtea-web-java7-doc 1.3-1 and this is from the logs: JRE version: 7.0_07-b30 Java VM: OpenJDK 64-Bit Server VM (23.2-b09 mixed mode linux-amd64 compressed oops) I ran the code using the "Run" button in Eclipse, then closed the new window and ran it again - repeat several times. My machine has 3 GiB of physical RAM. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121005/69c1d6b1/attachment.html From bugzilla-daemon at icedtea.classpath.org Fri Oct 5 19:42:55 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 06 Oct 2012 02:42:55 +0000 Subject: [Bug 1192] New: A fatal error, JRE eclipse Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1192 Priority: P3 Bug ID: 1192 CC: unassigned at icedtea.classpath.org Assignee: gnu.andrew at redhat.com Summary: A fatal error, JRE eclipse Severity: critical Classification: Unclassified OS: Linux Reporter: imc.coder at gmail.com Hardware: x86 Status: NEW Version: 7-1.0 Component: IcedTea Product: IcedTea -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121006/05510bf1/attachment.html From bugzilla-daemon at icedtea.classpath.org Fri Oct 5 19:47:32 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 06 Oct 2012 02:47:32 +0000 Subject: [Bug 1192] A fatal error, JRE eclipse In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1192 --- Comment #1 from imc.coder at gmail.com --- Created attachment 766 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=766&action=edit result log of JRE -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121006/d798721b/attachment.html From bugzilla-daemon at icedtea.classpath.org Fri Oct 5 19:49:27 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 06 Oct 2012 02:49:27 +0000 Subject: [Bug 1192] A fatal error, JRE eclipse In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1192 --- Comment #2 from imc.coder at gmail.com --- the problem happens when I run eclipse Indigo -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121006/8624dd28/attachment.html From omajid at icedtea.classpath.org Fri Oct 5 20:06:10 2012 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Sat, 06 Oct 2012 03:06:10 +0000 Subject: /hg/icedtea-web: PR1145: IcedTea-Web can cause ClassCircularityE... Message-ID: changeset 5a473790c21d in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=5a473790c21d author: Omair Majid date: Fri Oct 05 23:02:53 2012 -0400 PR1145: IcedTea-Web can cause ClassCircularityError It is possible for the ClassLoader to encounter a ClassCircularityError. This can happen when the ClassLoader detects that checking if a class 'A' has been loaded triggers another check of whether 'A' has been loaded before the first check has completed. This can happen easily when trying to load Policy or Permission classes, which lie in our code path that checks whether a class has been loaded. One possible fix is to ensure these classes are not in the path of code that gets executed when we are trying to check for a class. This can be done by removing the call to getAccessControlContextForClassLoading. The javadocs for ClassLoader.findLoadedClass do not mention any permissions required to call the method nor do they mention that the method can throw a SecurityException. The native code that implements findLoadedClass does not have any security checks either. The doProvileged block is probably not needed here and removing it breaks the circularity. diffstat: ChangeLog | 9 +++++++++ NEWS | 1 + netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 14 +------------- 3 files changed, 11 insertions(+), 13 deletions(-) diffs (58 lines): diff -r 3c9fc2571585 -r 5a473790c21d ChangeLog --- a/ChangeLog Wed Oct 03 19:19:30 2012 +0200 +++ b/ChangeLog Fri Oct 05 23:02:53 2012 -0400 @@ -1,3 +1,12 @@ +2012-10-05 Omair Majid + + PR1145 + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (getAccessControlContextForClassLoading): Do not catch + ClassCircularityError. + (findLoadedClassAll): Call findLoadedClass without any special + permissions. + 2012-10-03 Jana Fabrikova * tests/reproducers/simple/JSToJGet: diff -r 3c9fc2571585 -r 5a473790c21d NEWS --- a/NEWS Wed Oct 03 19:19:30 2012 +0200 +++ b/NEWS Fri Oct 05 23:02:53 2012 -0400 @@ -17,6 +17,7 @@ * Common - PR1049: Extension jnlp's signed jar with the content of only META-INF/* is considered - PR955: regression: SweetHome3D fails to run + - PR1145: IcedTea-Web can cause ClassCircularityError - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 New in release 1.3 (2012-XX-XX): diff -r 3c9fc2571585 -r 5a473790c21d netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Oct 03 19:19:30 2012 +0200 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Fri Oct 05 23:02:53 2012 -0400 @@ -1494,17 +1494,7 @@ Class result = null; if (loaders[i] == this) { - final String fName = name; - try { - result = AccessController.doPrivileged( - new PrivilegedExceptionAction>() { - public Class run() { - return JNLPClassLoader.super.findLoadedClass(fName); - } - }, getAccessControlContextForClassLoading()); - } catch (PrivilegedActionException pae) { - result = null; - } + result = JNLPClassLoader.super.findLoadedClass(name); } else { result = loaders[i].findLoadedClassAll(name); } @@ -2154,8 +2144,6 @@ return context; // If context already has all permissions, don't bother } catch (AccessControlException ace) { // continue below - } catch (ClassCircularityError cce) { - // continue below } // Since this is for class-loading, technically any class from one jar From bugzilla-daemon at icedtea.classpath.org Sat Oct 6 09:02:20 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 06 Oct 2012 16:02:20 +0000 Subject: [Bug 1191] JRE crashes when out of memory - "Failed to write core dump." In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1191 Andrew Haley changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aph at redhat.com --- Comment #1 from Andrew Haley --- This is a very odd bug report. If the JVM runs out of resources and it can't create a core dump, then the best it can do is print an error message, which it does. This is not a "crash". -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121006/8ec86503/attachment.html From bugzilla-daemon at icedtea.classpath.org Sat Oct 6 09:07:53 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 06 Oct 2012 16:07:53 +0000 Subject: [Bug 1192] A fatal error, JRE eclipse In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1192 --- Comment #3 from Andrew Haley --- Comment on attachment 766 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=766 result log of JRE This one looks to me like a crash in Eclipse's SWT native code. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121006/07698e2b/attachment.html From bugzilla-daemon at icedtea.classpath.org Sat Oct 6 13:36:45 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 06 Oct 2012 20:36:45 +0000 Subject: [Bug 1193] New: JVM crash Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1193 Priority: P3 Bug ID: 1193 CC: unassigned at icedtea.classpath.org Assignee: gnu.andrew at redhat.com Summary: JVM crash Severity: blocker Classification: Unclassified OS: Linux Reporter: cmokbel at msn.com Hardware: arm Status: NEW Version: unspecified Component: IcedTea Product: IcedTea keep getting this crash (every few days) # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (os_linux_zero.cpp:236), pid=1382, tid=1344595056 # Error: caught unhandled signal 11 # # JRE version: 6.0_18-b18 # Java VM: OpenJDK Zero VM (14.0-b16 mixed mode linux-arm ) # Derivative: IcedTea6 1.8.13 # Distribution: Debian GNU/Linux 6.0.5 (squeeze), package 6b18-1.8.13-0+squeeze2 # If you would like to submit a bug report, please include # instructions how to reproduce the bug and visit: # http://icedtea.classpath.org/bugzilla # --------------- T H R E A D --------------- Current thread (0x00176d30): JavaThread "socat" daemon [_thread_in_vm, id=1469, stack(0x500cf000,0x5024f000)] Stack: [0x500cf000,0x5024f000], sp=0x5018bda4, free space=755k Java frames: 0x5024d824: unboxed parameter[2] = 0x5024d894 0x5024d828: unboxed parameter[1] = 0x5024d898 0x5024d82c: parameter[0] (JNIEnv) = 0x5018e438 0x5024d830: parameter[1] (this) = 0x5024d828 0x5024d834: parameter[2] = 0x5024d824 0x5024d838: parameter[3] = 0x5024d890 0x5024d83c: parameter[4] = 0x5024d88c 0x5024d840: istate->_thread = 0x00176d30 0x5024d844: istate->_bcp = 0x00000000 0x5024d848: istate->_locals = 0x5024d898 0x5024d84c: istate->_constants = 0x48dfc5d0 0x5024d850: istate->_method = java.io.FileInputStream.readBytes([BII)I 0x5024d854: istate->_mdx = 0x00000000 0x5024d858: istate->_stack = 0x5024d83c 0x5024d85c: istate->_msg = 0x00000002 0x5024d860: istate->_result = 0x00000000 0x5024d864: (istate->_result) = 0x00000032 0x5024d868: (istate->_result) = 0x00000000 0x5024d86c: istate->_prev_link = 0x00000000 0x5024d870: istate->_oop_temp = 0x00000000 0x5024d874: istate->_stack_base = 0x5024d840 0x5024d878: istate->_stack_limit = 0x5024d83c 0x5024d87c: istate->_monitor_base = 0x5024d840 0x5024d880: istate->_self_link = 0x5024d840 0x5024d884: frame_type = INTERPRETER_FRAME 0x5024d888: next_frame = 0x5024d8e4 0x5024d88c: local[3] = 0x00002000 0x5024d890: local[2] = 0x00000000 0x5024d894: local[1] = 0x44143268 0x5024d898: local[0] = 0x44143250 0x5024d89c: istate->_thread = 0x00176d30 0x5024d8a0: istate->_bcp = 0x48dfac9c (bci 4) 0x5024d8a4: istate->_locals = 0x5024d8f4 0x5024d8a8: istate->_constants = 0x48dfc5d0 0x5024d8ac: istate->_method = java.io.FileInputStream.read([BII)I 0x5024d8b0: istate->_mdx = 0x00000000 0x5024d8b4: istate->_stack = 0x5024d888 0x5024d8b8: istate->_msg = 0x00000008 0x5024d8bc: istate->_result = 0x48dfab60 0x5024d8c0: (istate->_result) = 0x4087e16c 0x5024d8c4: (istate->_result) = 0x00000003 0x5024d8c8: istate->_prev_link = 0x00000000 0x5024d8cc: istate->_oop_temp = 0x00000000 0x5024d8d0: istate->_stack_base = 0x5024d89c 0x5024d8d4: istate->_stack_limit = 0x5024d888 0x5024d8d8: istate->_monitor_base = 0x5024d89c 0x5024d8dc: istate->_self_link = 0x5024d89c 0x5024d8e0: frame_type = INTERPRETER_FRAME 0x5024d8e4: next_frame = 0x5024d940 0x5024d8e8: local[3] = 0x00002000 0x5024d8ec: local[2] = 0x00000000 0x5024d8f0: local[1] = 0x44143268 0x5024d8f4: local[0] = 0x44143250 0x5024d8f8: istate->_thread = 0x00176d30 0x5024d8fc: istate->_bcp = 0x48e00c1f (bci 175) 0x5024d900: istate->_locals = 0x5024d950 0x5024d904: istate->_constants = 0x48e02330 0x5024d908: istate->_method = java.io.BufferedInputStream.fill()V 0x5024d90c: istate->_mdx = 0x00000000 0x5024d910: istate->_stack = 0x5024d8e4 0x5024d914: istate->_msg = 0x00000008 0x5024d918: istate->_result = 0x48dface0 0x5024d91c: (istate->_result) = 0x4087e140 0x5024d920: (istate->_result) = 0x00000003 0x5024d924: istate->_prev_link = 0x00000000 0x5024d928: istate->_oop_temp = 0x00000000 0x5024d92c: istate->_stack_base = 0x5024d8f8 0x5024d930: istate->_stack_limit = 0x5024d8e0 0x5024d934: istate->_monitor_base = 0x5024d8f8 0x5024d938: istate->_self_link = 0x5024d8f8 0x5024d93c: frame_type = INTERPRETER_FRAME 0x5024d940: next_frame = 0x5024d9a4 0x5024d944: local[3] = 0x00000000 0x5024d948: local[2] = 0x00000000 0x5024d94c: local[1] = 0x44143268 0x5024d950: local[0] = 0x44145278 0x5024d954: monitor[0]->_lock = 0x00000001 0x5024d958: monitor[0]->_obj = 0x44145278 0x5024d95c: istate->_thread = 0x00176d30 0x5024d960: istate->_bcp = 0x48e00d2c (bci 12) 0x5024d964: istate->_locals = 0x5024d9a8 0x5024d968: istate->_constants = 0x48e02330 0x5024d96c: istate->_method = java.io.BufferedInputStream.read()I 0x5024d970: istate->_mdx = 0x00000000 0x5024d974: istate->_stack = 0x5024d94c 0x5024d978: istate->_msg = 0x00000008 0x5024d97c: istate->_result = 0x48e00ca0 0x5024d980: (istate->_result) = 0x4087e140 0x5024d984: (istate->_result) = 0x00000003 0x5024d988: istate->_prev_link = 0x00000000 0x5024d98c: istate->_oop_temp = 0x00000000 0x5024d990: istate->_stack_base = 0x5024d954 0x5024d994: istate->_stack_limit = 0x5024d93c 0x5024d998: istate->_monitor_base = 0x5024d95c 0x5024d99c: istate->_self_link = 0x5024d95c 0x5024d9a0: frame_type = INTERPRETER_FRAME 0x5024d9a4: next_frame = 0x5024d9f4 0x5024d9a8: local[0] = 0x44145278 0x5024d9ac: istate->_thread = 0x00176d30 0x5024d9b0: istate->_bcp = 0x48e018c4 (bci 4) 0x5024d9b4: istate->_locals = 0x5024d9f8 0x5024d9b8: istate->_constants = 0x48e02270 0x5024d9bc: istate->_method = java.io.FilterInputStream.read()I 0x5024d9c0: istate->_mdx = 0x00000000 0x5024d9c4: istate->_stack = 0x5024d9a4 0x5024d9c8: istate->_msg = 0x00000008 0x5024d9cc: istate->_result = 0x48e00d70 0x5024d9d0: (istate->_result) = 0x4087e144 0x5024d9d4: (istate->_result) = 0x00000003 0x5024d9d8: istate->_prev_link = 0x00000000 0x5024d9dc: istate->_oop_temp = 0x00000000 0x5024d9e0: istate->_stack_base = 0x5024d9ac 0x5024d9e4: istate->_stack_limit = 0x5024d9a4 0x5024d9e8: istate->_monitor_base = 0x5024d9ac 0x5024d9ec: istate->_self_link = 0x5024d9ac 0x5024d9f0: frame_type = INTERPRETER_FRAME 0x5024d9f4: next_frame = 0x5024da4c 0x5024d9f8: local[0] = 0x44145298 0x5024d9fc: monitor[0]->_lock = 0x00000049 0x5024da00: monitor[0]->_obj = 0x00000000 0x5024da04: istate->_thread = 0x00176d30 0x5024da08: istate->_bcp = 0x493903d1 (bci 121) 0x5024da0c: istate->_locals = 0x5024da5c 0x5024da10: istate->_constants = 0x494590b8 0x5024da14: istate->_method = SiteController.GSMRelay$3.run()V 0x5024da18: istate->_mdx = 0x00000000 0x5024da1c: istate->_stack = 0x5024d9f4 0x5024da20: istate->_msg = 0x00000008 0x5024da24: istate->_result = 0x48e018e0 0x5024da28: (istate->_result) = 0x4087e140 0x5024da2c: (istate->_result) = 0x00000003 0x5024da30: istate->_prev_link = 0x00000000 0x5024da34: istate->_oop_temp = 0x00000000 0x5024da38: istate->_stack_base = 0x5024d9fc 0x5024da3c: istate->_stack_limit = 0x5024d9ec 0x5024da40: istate->_monitor_base = 0x5024da04 0x5024da44: istate->_self_link = 0x5024da04 0x5024da48: frame_type = INTERPRETER_FRAME 0x5024da4c: next_frame = 0x5024da68 0x5024da50: local[3] = 0x00000000 0x5024da54: local[2] = 0x440472d8 0x5024da58: local[1] = 0x0000007e 0x5024da5c: local[0] = 0x441431e0 0x5024da60: call_wrapper = 0x5024dac4 0x5024da64: frame_type = ENTRY_FRAME 0x5024da68: next_frame = 0x00000000 --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x001929e0 JavaThread "process reaper" daemon [_thread_in_native, id=2831, stack(0x533cf000,0x5354f000)] 0x0022f6a8 JavaThread "Timeout thread for Relay Client to:74.15.188.212 from:10.80.196.102:45514" daemon [_thread_blocked, id=1642, stack(0x53ccf000,0x53e4f000)] 0x001db1b8 JavaThread "TCP Relay Waiting For input" [_thread_in_native, id=1641, stack(0x5384f000,0x539cf000)] 0x00227930 JavaThread "Timer-0" daemon [_thread_blocked, id=1640, stack(0x53b4f000,0x53ccf000)] 0x002694c0 JavaThread "DefaultUDPTransportMapping_127.0.0.1/0" daemon [_thread_in_native, id=1639, stack(0x539cf000,0x53b4f000)] 0x0017d768 JavaThread "Timeout thread for Relay Client to:74.15.188.212 from:10.80.196.102:58703" daemon [_thread_blocked, id=1634, stack(0x536cf000,0x5384f000)] 0x00179f80 JavaThread "TCP Relay Waiting For input" [_thread_in_native, id=1633, stack(0x5354f000,0x536cf000)] 0x00161d68 JavaThread "DestroyJavaVM" [_thread_blocked, id=1385, stack(0x4062b000,0x407aa000)] 0x00130ab8 JavaThread "Restart Controller Thread" [_thread_blocked, id=1625, stack(0x50b4f000,0x50ccf000)] 0x001ae4c0 JavaThread "SNMP Agent Wait()" [_thread_blocked, id=1624, stack(0x50fcf000,0x5114f000)] 0x0015f828 JavaThread "Thread-107 Serial POLL" [_thread_blocked, id=1621, stack(0x5324f000,0x533cf000)] 0x001f2d58 JavaThread "DefaultUDPTransportMapping_0.0.0.0/161" daemon [_thread_in_native, id=1608, stack(0x530cf000,0x5324f000)] 0x001f4d08 JavaThread "SNMP Agent : Waiting for refresh Aliases Request" [_thread_in_native, id=1606, stack(0x52f4f000,0x530cf000)] 0x001804c0 JavaThread "ADC Readings" [_thread_in_native, id=1605, stack(0x52dcf000,0x52f4f000)] 0x00063670 JavaThread "process reaper" daemon [_thread_in_native, id=1603, stack(0x51ecf000,0x5204f000)] 0x00145c98 JavaThread "Polling Service :63" [_thread_blocked, id=1602, stack(0x52c4f000,0x52dcf000)] 0x001447c8 JavaThread "Polling Service :55" [_thread_in_vm, id=1601, stack(0x52acf000,0x52c4f000)] 0x001e7890 JavaThread "Polling Service :54" [_thread_blocked, id=1600, stack(0x5294f000,0x52acf000)] 0x001e61f8 JavaThread "Application-Bandwidth Management Connection Thread 22" [_thread_in_native, id=1599, stack(0x527cf000,0x5294f000)] 0x001e4dc8 JavaThread "Application-Bandwidth Management Connection Thread 4" [_thread_in_native, id=1598, stack(0x5264f000,0x527cf000)] 0x001646e8 JavaThread "Application-Bandwidth Management Connection Thread 15" [_thread_in_native, id=1597, stack(0x524cf000,0x5264f000)] 0x001e2850 JavaThread "DefaultUDPTransportMapping_0.0.0.0/162" daemon [_thread_in_native, id=1596, stack(0x5234f000,0x524cf000)] 0x0018c388 JavaThread "Application-Bandwidth Management Connection Thread 10" [_thread_in_native, id=1592, stack(0x521cf000,0x5234f000)] 0x001301b0 JavaThread "Application-Bandwidth Management Connection Thread 12" [_thread_in_native, id=1591, stack(0x5114f000,0x512cf000)] 0x00064ba8 JavaThread "BWM Application 22 waiting for input" [_thread_in_native, id=1590, stack(0x5204f000,0x521cf000)] 0x000669d8 JavaThread "BWM Application 4 waiting for input" [_thread_in_native, id=1587, stack(0x51d4f000,0x51ecf000)] 0x000620c8 JavaThread "Application-Bandwidth Management Connection Thread 11" [_thread_in_native, id=1586, stack(0x51bcf000,0x51d4f000)] 0x00060af8 JavaThread "BWM Application 15 waiting for input" [_thread_in_native, id=1585, stack(0x51a4f000,0x51bcf000)] 0x00198288 JavaThread "BWM Application 10 waiting for input" [_thread_in_native, id=1584, stack(0x518cf000,0x51a4f000)] 0x00196d68 JavaThread "BWM Application 12 waiting for input" [_thread_in_native, id=1583, stack(0x5174f000,0x518cf000)] 0x00195958 JavaThread "BWM Application 11 waiting for input" [_thread_in_native, id=1582, stack(0x515cf000,0x5174f000)] 0x00194340 JavaThread "BWM Application 1 waiting for input" [_thread_in_native, id=1581, stack(0x5144f000,0x515cf000)] 0x001991f8 JavaThread "Application-Bandwidth Management Connection Thread 1" [_thread_in_native, id=1580, stack(0x512cf000,0x5144f000)] 0x0012a978 JavaThread "UDP Bandwidth Manager Listen:ppp0" [_thread_in_native, id=1546, stack(0x50e4f000,0x50fcf000)] 0x001af9a8 JavaThread "Network Discovery for UDP 10.80.196.102:101" daemon [_thread_blocked, id=1545, stack(0x50ccf000,0x50e4f000)] 0x001ae0a8 JavaThread "TCP Bandwidth Manager Listen:ppp0" [_thread_in_native, id=1543, stack(0x509cf000,0x50b4f000)] 0x001adc90 JavaThread "Network Discovery for TCP 10.80.196.102:0" daemon [_thread_blocked, id=1542, stack(0x5084f000,0x509cf000)] 0x00180808 JavaThread "pppd out" daemon [_thread_in_native, id=1474, stack(0x506cf000,0x5084f000)] 0x001dda80 JavaThread "pppd err" daemon [_thread_in_native, id=1473, stack(0x5054f000,0x506cf000)] 0x001dc2c8 JavaThread "process reaper" daemon [_thread_in_native, id=1471, stack(0x503cf000,0x5054f000)] 0x001781e0 JavaThread "Modem Thread" daemon [_thread_in_native, id=1470, stack(0x5024f000,0x503cf000)] =>0x00176d30 JavaThread "socat" daemon [_thread_in_vm, id=1469, stack(0x500cf000,0x5024f000)] 0x0011c898 JavaThread "process reaper" daemon [_thread_in_native, id=1467, stack(0x4f64f000,0x4f7cf000)] 0x001eaa70 JavaThread "Ougoing Messages Watch Dog" daemon [_thread_blocked, id=1455, stack(0x4ff4f000,0x500cf000)] 0x001ecf80 JavaThread "BWM: Proccessing Outgoing messages" [_thread_blocked, id=1454, stack(0x4fdcf000,0x4ff4f000)] 0x00055ea8 JavaThread "Making Sure NOC Can Reach Me" [_thread_blocked, id=1453, stack(0x4fc4f000,0x4fdcf000)] 0x000549c8 JavaThread "Rediscovering Transports" [_thread_blocked, id=1452, stack(0x4facf000,0x4fc4f000)] 0x00053818 JavaThread "UDP Bandwidth Manager Listen:eth0" [_thread_in_native, id=1451, stack(0x4f94f000,0x4facf000)] 0x001ed7f0 JavaThread "Network Discovery for UDP 192.168.0.7:101" daemon [_thread_blocked, id=1450, stack(0x4f7cf000,0x4f94f000)] 0x0005a5e0 JavaThread "TCP Bandwidth Manager Listen:eth0" [_thread_in_native, id=1448, stack(0x4f4cf000,0x4f64f000)] 0x000573c8 JavaThread "Network Discovery for TCP 192.168.0.7:0" daemon [_thread_blocked, id=1447, stack(0x4f34f000,0x4f4cf000)] 0x00123cb0 JavaThread "PPPD Watchdog" daemon [_thread_blocked, id=1446, stack(0x4f1cf000,0x4f34f000)] 0x0003d0a8 JavaThread "DIO Waiting for changes" [_thread_in_native, id=1440, stack(0x4f04f000,0x4f1cf000)] 0x0003bb70 JavaThread "DIO EDT" [_thread_blocked, id=1439, stack(0x4eecf000,0x4f04f000)] 0x000f1f08 JavaThread "BWM Listnen For Clients" [_thread_in_native, id=1427, stack(0x4e8ce000,0x4ea4e000)] 0x001be718 JavaThread "Broadcast SN/IP" daemon [_thread_in_native, id=1426, stack(0x4e74e000,0x4e8ce000)] 0x00116b40 JavaThread "OIDLogDataSource" daemon [_thread_blocked, id=1425, stack(0x4e5ce000,0x4e74e000)] 0x001c9300 JavaThread "No Persist Data Source, Check time Outs" daemon [_thread_in_Java, id=1424, stack(0x4e44e000,0x4e5ce000)] 0x000e60f0 JavaThread "Maintaining Connection Pool" daemon [_thread_blocked, id=1419, stack(0x4e2c4000,0x4e444000)] 0x000ea3e0 JavaThread "Testing Connection Pools" daemon [_thread_blocked, id=1418, stack(0x4e144000,0x4e2c4000)] 0x000f3a70 JavaThread "Maintaining Connection Pool" daemon [_thread_blocked, id=1417, stack(0x4dfc4000,0x4e144000)] 0x000f2560 JavaThread "Testing Connection Pools" daemon [_thread_blocked, id=1416, stack(0x4de44000,0x4dfc4000)] 0x000e8870 JavaThread "Maintaining Connection Pool" daemon [_thread_blocked, id=1415, stack(0x4db22000,0x4dca2000)] 0x000e84c0 JavaThread "Testing Connection Pools" daemon [_thread_blocked, id=1414, stack(0x4dca2000,0x4de22000)] 0x000b2f90 JavaThread "Memory Thread" daemon [_thread_blocked, id=1394, stack(0x4d9a2000,0x4db22000)] 0x000ccaa0 JavaThread "Low Memory Thread" daemon [_thread_blocked, id=1393, stack(0x4d822000,0x4d9a2000)] 0x000a73f0 JavaThread "Verbosity" daemon [_thread_in_native, id=1392, stack(0x4d686000,0x4d806000)] 0x000872d0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1390, stack(0x4d464000,0x4d5e4000)] 0x00085a68 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1389, stack(0x4d2e4000,0x4d464000)] 0x00077770 JavaThread "Finalizer" daemon [_thread_blocked, id=1388, stack(0x4d164000,0x4d2e4000)] 0x00072e50 JavaThread "Reference Handler" daemon [_thread_blocked, id=1387, stack(0x4cfe4000,0x4d164000)] Other Threads: 0x0006ea70 VMThread [stack: 0x4cf65000,0x4cfe4000] [id=1386] 0x00088ed0 WatcherThread [stack: 0x4d5e5000,0x4d664000] [id=1391] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 18432K, used 7705K [0x42900000, 0x43d00000, 0x43d00000) eden space 16384K, 46% used [0x42900000, 0x4307f220, 0x43900000) from space 2048K, 1% used [0x43900000, 0x43907598, 0x43b00000) to space 2048K, 0% used [0x43b00000, 0x43b00000, 0x43d00000) tenured generation total 81920K, used 5580K [0x43d00000, 0x48d00000, 0x48d00000) the space 81920K, 6% used [0x43d00000, 0x442732e8, 0x44273400, 0x48d00000) compacting perm gen total 10240K, used 10153K [0x48d00000, 0x49700000, 0x4cd00000) the space 10240K, 99% used [0x48d00000, 0x496ea4c0, 0x496ea600, 0x49700000) No shared spaces configured. Dynamic libraries: 00008000-00012000 r-xp 00000000 b3:04 39431 /usr/lib/jvm/java-6-openjdk/jre/bin/java 00019000-0001a000 rwxp 00009000 b3:04 39431 /usr/lib/jvm/java-6-openjdk/jre/bin/java 0001a000-00295000 rwxp 0001a000 00:00 0 [heap] 40000000-4001d000 r-xp 00000000 b3:04 23898 /lib/ld-2.11.3.so 4001d000-4001e000 rwxp 4001d000 00:00 0 4001e000-4001f000 r-xp 4001e000 00:00 0 4001f000-40020000 rwxp 4001f000 00:00 0 40020000-40023000 r-xs 0000f000 b3:04 32068 /usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar 40023000-40024000 r-xs 00000000 b3:04 24249 /home/broadnet/SiteControllerDirectAgent.jar 40024000-40025000 r-xp 0001c000 b3:04 23898 /lib/ld-2.11.3.so 40025000-40026000 rwxp 0001d000 b3:04 23898 /lib/ld-2.11.3.so 40026000-4003a000 r-xp 00000000 b3:04 33989 /usr/lib/libz.so.1.2.3.4 4003a000-40041000 ---p 00014000 b3:04 33989 /usr/lib/libz.so.1.2.3.4 40041000-40042000 rwxp 00013000 b3:04 33989 /usr/lib/libz.so.1.2.3.4 40042000-40043000 rwxp 40042000 00:00 0 40043000-40058000 r-xp 00000000 b3:04 23889 /lib/libpthread-2.11.3.so 40058000-4005f000 ---p 00015000 b3:04 23889 /lib/libpthread-2.11.3.so 4005f000-40060000 r-xp 00014000 b3:04 23889 /lib/libpthread-2.11.3.so 40060000-40061000 rwxp 00015000 b3:04 23889 /lib/libpthread-2.11.3.so 40061000-40063000 rwxp 40061000 00:00 0 40063000-40066000 r-xp 00000000 b3:04 48788 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/jli/libjli.so 40066000-4006d000 ---p 00003000 b3:04 48788 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/jli/libjli.so 4006d000-4006e000 rwxp 00002000 b3:04 48788 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/jli/libjli.so 4006e000-40070000 r-xp 00000000 b3:04 23912 /lib/libdl-2.11.3.so 40070000-40077000 ---p 00002000 b3:04 23912 /lib/libdl-2.11.3.so 40077000-40078000 r-xp 00001000 b3:04 23912 /lib/libdl-2.11.3.so 40078000-40079000 rwxp 00002000 b3:04 23912 /lib/libdl-2.11.3.so 40079000-4019c000 r-xp 00000000 b3:04 23938 /lib/libc-2.11.3.so 4019c000-401a4000 ---p 00123000 b3:04 23938 /lib/libc-2.11.3.so 401a4000-401a6000 r-xp 00123000 b3:04 23938 /lib/libc-2.11.3.so 401a6000-401a7000 rwxp 00125000 b3:04 23938 /lib/libc-2.11.3.so 401a7000-401aa000 rwxp 401a7000 00:00 0 401aa000-401b6000 r-xp 00000000 b3:04 23905 /lib/libgcc_s.so.1 401b6000-401bd000 ---p 0000c000 b3:04 23905 /lib/libgcc_s.so.1 401bd000-401be000 rwxp 0000b000 b3:04 23905 /lib/libgcc_s.so.1 401be000-401c0000 rwxp 401be000 00:00 0 401c0000-4053c000 r-xp 00000000 b3:04 48862 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/server/libjvm.so 4053c000-40543000 ---p 0037c000 b3:04 48862 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/server/libjvm.so 40543000-40560000 rwxp 0037b000 b3:04 48862 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/server/libjvm.so 40560000-40582000 rwxp 40560000 00:00 0 40582000-40620000 r-xp 00000000 b3:04 23903 /lib/libm-2.11.3.so 40620000-40628000 ---p 0009e000 b3:04 23903 /lib/libm-2.11.3.so 40628000-40629000 r-xp 0009e000 b3:04 23903 /lib/libm-2.11.3.so 40629000-4062a000 rwxp 0009f000 b3:04 23903 /lib/libm-2.11.3.so 4062a000-4062e000 ---p 4062a000 00:00 0 4062e000-407aa000 rwxp 4062e000 00:00 0 407aa000-407b0000 r-xp 00000000 b3:04 24270 /lib/librt-2.11.3.so 407b0000-407b7000 ---p 00006000 b3:04 24270 /lib/librt-2.11.3.so 407b7000-407b8000 r-xp 00005000 b3:04 24270 /lib/librt-2.11.3.so 407b8000-407b9000 rwxp 00006000 b3:04 24270 /lib/librt-2.11.3.so 407b9000-407c4000 r-xp 00000000 b3:04 48793 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libverify.so 407c4000-407cb000 ---p 0000b000 b3:04 48793 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libverify.so 407cb000-407cc000 rwxp 0000a000 b3:04 48793 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libverify.so 407cc000-407f8000 r-xp 00000000 b3:04 49192 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libjava.so 407f8000-40800000 ---p 0002c000 b3:04 49192 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libjava.so 40800000-40802000 rwxp 0002c000 b3:04 49192 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libjava.so 40802000-40814000 r-xp 00000000 b3:04 24269 /lib/libnsl-2.11.3.so 40814000-4081b000 ---p 00012000 b3:04 24269 /lib/libnsl-2.11.3.so 4081b000-4081c000 r-xp 00011000 b3:04 24269 /lib/libnsl-2.11.3.so 4081c000-4081d000 rwxp 00012000 b3:04 24269 /lib/libnsl-2.11.3.so 4081d000-4081f000 rwxp 4081d000 00:00 0 4081f000-40825000 r-xp 00000000 b3:04 49193 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/native_threads/libhpi.so 40825000-4082d000 ---p 00006000 b3:04 49193 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/native_threads/libhpi.so 4082d000-4082e000 rwxp 00006000 b3:04 49193 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/native_threads/libhpi.so 4082e000-40832000 r-xs 00069000 b3:04 24245 /home/broadnet/SiteControllerBandwidthManagement.jar 40832000-40833000 r-xs 00000000 b3:04 24248 /home/broadnet/SiteControllerDependancies.jar 40833000-40834000 r-xs 00001000 b3:04 24250 /home/broadnet/SiteControllerGSMModemDependancies.jar 40834000-4083a000 r-xp 00000000 b3:04 23894 /lib/libnss_compat-2.11.3.so 4083a000-40841000 ---p 00006000 b3:04 23894 /lib/libnss_compat-2.11.3.so 40841000-40842000 r-xp 00005000 b3:04 23894 /lib/libnss_compat-2.11.3.so 40842000-40843000 rwxp 00006000 b3:04 23894 /lib/libnss_compat-2.11.3.so 40843000-4084c000 r-xp 00000000 b3:04 24271 /lib/libnss_nis-2.11.3.so 4084c000-40853000 ---p 00009000 b3:04 24271 /lib/libnss_nis-2.11.3.so 40853000-40854000 r-xp 00008000 b3:04 24271 /lib/libnss_nis-2.11.3.so 40854000-40855000 rwxp 00009000 b3:04 24271 /lib/libnss_nis-2.11.3.so 40855000-4085f000 r-xp 00000000 b3:04 24264 /lib/libnss_files-2.11.3.so 4085f000-40866000 ---p 0000a000 b3:04 24264 /lib/libnss_files-2.11.3.so 40866000-40867000 r-xp 00009000 b3:04 24264 /lib/libnss_files-2.11.3.so 40867000-40868000 rwxp 0000a000 b3:04 24264 /lib/libnss_files-2.11.3.so 40868000-40870000 rwxs 00000000 b3:04 55560 /tmp/hsperfdata_root/1382 40870000-40876000 r-xp 00000000 b3:04 48795 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libzip.so 40876000-4087d000 ---p 00006000 b3:04 48795 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libzip.so 4087d000-4087e000 rwxp 00005000 b3:04 48795 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libzip.so 4087e000-408a6000 rwxp 4087e000 00:00 0 408a6000-4287e000 rwxp 408a6000 00:00 0 4287e000-4287f000 rwxp 4287e000 00:00 0 4287f000-428fe000 rwxp 4287f000 00:00 0 428fe000-42900000 r-xs 00009000 b3:04 24246 /home/broadnet/SiteControllerBandwidthManagementClient.jar 42900000-49700000 rwxp 42900000 00:00 0 49700000-4cd00000 rwxp 49700000 00:00 0 4cd00000-4cd37000 rwxp 4cd00000 00:00 0 4cd37000-4cd52000 rwxp 4cd37000 00:00 0 4cd52000-4cd82000 rwxp 4cd52000 00:00 0 4cd82000-4cd9d000 rwxp 4cd82000 00:00 0 4cd9d000-4cf31000 r-xs 0392f000 b3:04 33846 /usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar 4cf31000-4cf64000 rwxp 4cf31000 00:00 0 4cf64000-4cf65000 ---p 4cf64000 00:00 0 4cf65000-4cfe4000 rwxp 4cf65000 00:00 0 4cfe4000-4cfe7000 ---p 4cfe4000 00:00 0 4cfe7000-4d164000 rwxp 4cfe7000 00:00 0 4d164000-4d167000 ---p 4d164000 00:00 0 4d167000-4d2e4000 rwxp 4d167000 00:00 0 4d2e4000-4d2e7000 ---p 4d2e4000 00:00 0 4d2e7000-4d464000 rwxp 4d2e7000 00:00 0 4d464000-4d467000 ---p 4d464000 00:00 0 4d467000-4d5e4000 rwxp 4d467000 00:00 0 4d5e4000-4d5e5000 ---p 4d5e4000 00:00 0 4d5e5000-4d664000 rwxp 4d5e5000 00:00 0 4d664000-4d66c000 r-xs 00066000 b3:04 72394 /usr/share/java/gnome-java-bridge.jar 4d66c000-4d676000 r-xs 00080000 b3:04 24243 /home/broadnet/ProgramWritter.jar 4d676000-4d67c000 r-xs 000ad000 b3:04 24220 /home/broadnet/mysql-connector-java-5.1.12-bin.jar 4d67c000-4d67f000 r-xs 000a2000 b3:04 24247 /home/broadnet/SiteControllerBandwidthManagementData.jar 4d67f000-4d682000 r-xs 00014000 b3:04 23886 /home/broadnet/SiteController.jar 4d682000-4d683000 r-xs 00002000 b3:04 24315 /home/broadnet/SiteControllerPollingAgent.jar 4d683000-4d686000 r-xs 0007d000 b3:04 32173 /usr/lib/jvm/java-6-openjdk/jre/lib/jsse.jar 4d686000-4d689000 ---p 4d686000 00:00 0 4d689000-4d806000 rwxp 4d689000 00:00 0 4d806000-4d819000 r-xp 00000000 b3:04 49197 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libnet.so 4d819000-4d821000 ---p 00013000 b3:04 49197 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libnet.so 4d821000-4d822000 rwxp 00013000 b3:04 49197 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libnet.so 4d822000-4d825000 ---p 4d822000 00:00 0 4d825000-4d9a2000 rwxp 4d825000 00:00 0 4d9a2000-4d9a5000 ---p 4d9a2000 00:00 0 4d9a5000-4db22000 rwxp 4d9a5000 00:00 0 4db22000-4db25000 ---p 4db22000 00:00 0 4db25000-4dca2000 rwxp 4db25000 00:00 0 4dca2000-4dca5000 ---p 4dca2000 00:00 0 4dca5000-4de22000 rwxp 4dca5000 00:00 0 4de22000-4de24000 r-xs 0005c000 b3:04 24254 /home/broadnet/SiteControllerSNMPAgentData.jar 4de24000-4de2b000 r-xs 00053000 b3:04 23743 /home/broadnet/log4j-1.2.14.jar 4de2b000-4de32000 r-xs 00073000 b3:04 24259 /home/broadnet/SNMP.jar 4de32000-4de3d000 r-xs 00078000 b3:04 24260 /home/broadnet/SNMP_AGENT.jar 4de3d000-4de40000 r-xs 00025000 b3:04 24123 /home/broadnet/SiteOSS_PollingService.jar 4de40000-4de43000 r-xs 000b7000 b3:04 24258 /home/broadnet/SiteOSS_PollingServiceData.jar 4de43000-4de44000 r-xs 00003000 b3:04 24251 /home/broadnet/SiteControllerImportChanges.jar 4de44000-4de47000 ---p 4de44000 00:00 0 4de47000-4dfc4000 rwxp 4de47000 00:00 0 4dfc4000-4dfc7000 ---p 4dfc4000 00:00 0 4dfc7000-4e144000 rwxp 4dfc7000 00:00 0 4e144000-4e147000 ---p 4e144000 00:00 0 4e147000-4e2c4000 rwxp 4e147000 00:00 0 4e2c4000-4e2c7000 ---p 4e2c4000 00:00 0 4e2c7000-4e444000 rwxp 4e2c7000 00:00 0 4e444000-4e445000 r-xs 00000000 b3:04 24256 /home/broadnet/SiteOSS_OIDInterface.jar 4e445000-4e446000 r-xs 00000000 b3:04 24255 /home/broadnet/SiteOSS_CustomOID.jar 4e446000-4e449000 r-xs 0001a000 b3:04 24316 /home/broadnet/SiteControllerSNMPAgent.jar 4e449000-4e44a000 r-xs 00006000 b3:04 23879 /home/broadnet/comm.jar 4e44a000-4e44e000 r-xs 00041000 b3:04 24252 /home/broadnet/SiteControllerModbus.jar 4e44e000-4e451000 ---p 4e44e000 00:00 0 4e451000-4e5ce000 rwxp 4e451000 00:00 0 4e5ce000-4e5d1000 ---p 4e5ce000 00:00 0 4e5d1000-4e74e000 rwxp 4e5d1000 00:00 0 4e74e000-4e751000 ---p 4e74e000 00:00 0 4e751000-4e8ce000 rwxp 4e751000 00:00 0 4e8ce000-4e8d1000 ---p 4e8ce000 00:00 0 4e8d1000-4ea4e000 rwxp 4e8d1000 00:00 0 4ea4e000-4ea51000 rwxp 4ea4e000 00:00 0 4ea51000-4ebce000 rwxp 4ea51000 00:00 0 4ebce000-4ebd1000 rwxp 4ebce000 00:00 0 4ebd1000-4ed4e000 rwxp 4ebd1000 00:00 0 4ed4e000-4ed4f000 r-xp 4ed4e000 00:00 0 4ed4f000-4ed52000 rwxp 4ed4f000 00:00 0 4ed52000-4eecf000 rwxp 4ed52000 00:00 0 4eecf000-4eed2000 ---p 4eecf000 00:00 0 4eed2000-4f04f000 rwxp 4eed2000 00:00 0 4f04f000-4f052000 ---p 4f04f000 00:00 0 4f052000-4f1cf000 rwxp 4f052000 00:00 0 4f1cf000-4f1d2000 ---p 4f1cf000 00:00 0 4f1d2000-4f34f000 rwxp 4f1d2000 00:00 0 4f34f000-4f352000 ---p 4f34f000 00:00 0 4f352000-4f4cf000 rwxp 4f352000 00:00 0 4f4cf000-4f4d2000 ---p 4f4cf000 00:00 0 4f4d2000-4f64f000 rwxp 4f4d2000 00:00 0 4f64f000-4f652000 ---p 4f64f000 00:00 0 4f652000-4f7cf000 rwxp 4f652000 00:00 0 4f7cf000-4f7d2000 ---p 4f7cf000 00:00 0 4f7d2000-4f94f000 rwxp 4f7d2000 00:00 0 4f94f000-4f952000 ---p 4f94f000 00:00 0 4f952000-4facf000 rwxp 4f952000 00:00 0 4facf000-4fad2000 ---p 4facf000 00:00 0 4fad2000-4fc4f000 rwxp 4fad2000 00:00 0 4fc4f000-4fc52000 ---p 4fc4f000 00:00 0 4fc52000-4fdcf000 rwxp 4fc52000 00:00 0 4fdcf000-4fdd2000 ---p 4fdcf000 00:00 0 4fdd2000-4ff4f000 rwxp 4fdd2000 00:00 0 4ff4f000-4ff52000 ---p 4ff4f000 00:00 0 4ff52000-500cf000 rwxp 4ff52000 00:00 0 500cf000-500d2000 ---p 500cf000 00:00 0 500d2000-5024f000 rwxp 500d2000 00:00 0 5024f000-50252000 ---p 5024f000 00:00 0 50252000-503cf000 rwxp 50252000 00:00 0 503cf000-503d2000 ---p 503cf000 00:00 0 503d2000-5054f000 rwxp 503d2000 00:00 0 5054f000-50552000 ---p 5054f000 00:00 0 50552000-506cf000 rwxp 50552000 00:00 0 506cf000-506d2000 ---p 506cf000 00:00 0 506d2000-5084f000 rwxp 506d2000 00:00 0 5084f000-50852000 ---p 5084f000 00:00 0 50852000-509cf000 rwxp 50852000 00:00 0 509cf000-509d2000 ---p 509cf000 00:00 0 509d2000-50b4f000 rwxp 509d2000 00:00 0 50b4f000-50b52000 ---p 50b4f000 00:00 0 50b52000-50ccf000 rwxp 50b52000 00:00 0 50ccf000-50cd2000 ---p 50ccf000 00:00 0 50cd2000-50e4f000 rwxp 50cd2000 00:00 0 50e4f000-50e52000 ---p 50e4f000 00:00 0 50e52000-50fcf000 rwxp 50e52000 00:00 0 50fcf000-50fd2000 ---p 50fcf000 00:00 0 50fd2000-5114f000 rwxp 50fd2000 00:00 0 5114f000-51152000 ---p 5114f000 00:00 0 51152000-512cf000 rwxp 51152000 00:00 0 512cf000-512d2000 ---p 512cf000 00:00 0 512d2000-5144f000 rwxp 512d2000 00:00 0 5144f000-51452000 ---p 5144f000 00:00 0 51452000-515cf000 rwxp 51452000 00:00 0 515cf000-515d2000 ---p 515cf000 00:00 0 515d2000-5174f000 rwxp 515d2000 00:00 0 5174f000-51752000 ---p 5174f000 00:00 0 51752000-518cf000 rwxp 51752000 00:00 0 518cf000-518d2000 ---p 518cf000 00:00 0 518d2000-51a4f000 rwxp 518d2000 00:00 0 51a4f000-51a52000 ---p 51a4f000 00:00 0 51a52000-51bcf000 rwxp 51a52000 00:00 0 51bcf000-51bd2000 ---p 51bcf000 00:00 0 51bd2000-51d4f000 rwxp 51bd2000 00:00 0 51d4f000-51d52000 ---p 51d4f000 00:00 0 51d52000-51ecf000 rwxp 51d52000 00:00 0 51ecf000-51ed2000 ---p 51ecf000 00:00 0 51ed2000-5204f000 rwxp 51ed2000 00:00 0 5204f000-52052000 ---p 5204f000 00:00 0 52052000-521cf000 rwxp 52052000 00:00 0 521cf000-521d2000 ---p 521cf000 00:00 0 521d2000-5234f000 rwxp 521d2000 00:00 0 5234f000-52352000 ---p 5234f000 00:00 0 52352000-524cf000 rwxp 52352000 00:00 0 524cf000-524d2000 ---p 524cf000 00:00 0 524d2000-5264f000 rwxp 524d2000 00:00 0 5264f000-52652000 ---p 5264f000 00:00 0 52652000-527cf000 rwxp 52652000 00:00 0 527cf000-527d2000 ---p 527cf000 00:00 0 527d2000-5294f000 rwxp 527d2000 00:00 0 5294f000-52952000 ---p 5294f000 00:00 0 52952000-52acf000 rwxp 52952000 00:00 0 52acf000-52ad2000 ---p 52acf000 00:00 0 52ad2000-52c4f000 rwxp 52ad2000 00:00 0 52c4f000-52c52000 ---p 52c4f000 00:00 0 52c52000-52dcf000 rwxp 52c52000 00:00 0 52dcf000-52dd2000 ---p 52dcf000 00:00 0 52dd2000-52f4f000 rwxp 52dd2000 00:00 0 52f4f000-52f52000 ---p 52f4f000 00:00 0 52f52000-530cf000 rwxp 52f52000 00:00 0 530cf000-530d2000 ---p 530cf000 00:00 0 530d2000-5324f000 rwxp 530d2000 00:00 0 5324f000-53252000 ---p 5324f000 00:00 0 53252000-533cf000 rwxp 53252000 00:00 0 533cf000-533d2000 rwxp 533cf000 00:00 0 533d2000-5354f000 rwxp 533d2000 00:00 0 5354f000-53552000 ---p 5354f000 00:00 0 53552000-536cf000 rwxp 53552000 00:00 0 536cf000-536d2000 ---p 536cf000 00:00 0 536d2000-5384f000 rwxp 536d2000 00:00 0 5384f000-53852000 ---p 5384f000 00:00 0 53852000-539cf000 rwxp 53852000 00:00 0 539cf000-539d2000 ---p 539cf000 00:00 0 539d2000-53b4f000 rwxp 539d2000 00:00 0 53b4f000-53b52000 ---p 53b4f000 00:00 0 53b52000-53ccf000 rwxp 53b52000 00:00 0 53ccf000-53cd2000 ---p 53ccf000 00:00 0 53cd2000-53e4f000 rwxp 53cd2000 00:00 0 53e4f000-53e52000 rwxp 53e4f000 00:00 0 53e52000-53fcf000 rwxp 53e52000 00:00 0 53fcf000-53fd2000 rwxp 53fcf000 00:00 0 53fd2000-5414f000 rwxp 53fd2000 00:00 0 bee49000-bee5e000 rwxp befeb000 00:00 0 [stack] VM Arguments: jvm_args: -XX:+PrintCommandLineFlags -XX:OnOutOfMemoryError=pkill -9 java -Xms100M -Xmx100M java_command: sitecontrollerpollingagent.Main Launcher Type: SUN_STANDARD Environment Variables: PATH=/sbin:/usr/sbin:/bin:/usr/bin LD_LIBRARY_PATH=/usr/lib/jvm/java-6-openjdk/jre/lib/arm/server:/usr/lib/jvm/java-6-openjdk/jre/lib/arm:/usr/lib/jvm/java-6-openjdk/jre/../lib/arm SHELL=/bin/sh DISPLAY=:0.0 Signal Handlers: SIGSEGV: [libjvm.so+0x2ffc10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGBUS: [libjvm.so+0x2ffc10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGFPE: [libjvm.so+0x25c254], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGPIPE: [libjvm.so+0x25c254], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGXFSZ: [libjvm.so+0x25c254], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGILL: [libjvm.so+0x25c254], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGUSR2: [libjvm.so+0x25eef8], sa_mask[0]=0x00000000, sa_flags=0x10000004 SIGHUP: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGTERM: [libjvm.so+0x25df8c], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGQUIT: [libjvm.so+0x25df8c], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 --------------- S Y S T E M --------------- OS:6.0.5 uname:Linux 2.6.29-ts4700-00 #2 PREEMPT Wed Apr 11 11:14:30 EDT 2012 armv5tejl libc:glibc 2.11.3 NPTL 2.11.3 rlimit: STACK 8192k, CORE 0k, NPROC 2048, NOFILE 1024, AS infinity load average:1.67 1.86 1.95 CPU:total 1 Memory: 4k page, physical 256316k(110420k free), swap 0k(0k free) vm_info: OpenJDK Zero VM (14.0-b16) for linux-arm JRE (1.6.0_18-b18), built on Jun 29 2012 13:52:12 by "buildd" with gcc 4.4.5 time: Thu Oct 4 00:41:34 2012 elapsed time: 3574 seconds -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121006/bf13305d/attachment.html From bugzilla-daemon at icedtea.classpath.org Sat Oct 6 18:55:38 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 07 Oct 2012 01:55:38 +0000 Subject: [Bug 1192] A fatal error, JRE eclipse In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1192 --- Comment #4 from imc.coder at gmail.com --- this occurs also with Java 7 of Oracle [RESOLVED] update to eclipse Juno, I suspected which eclipse Indigo, not is stable with Java 7. Tanks Andrew -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121007/7f1fdc06/attachment.html From bugzilla-daemon at icedtea.classpath.org Sat Oct 6 18:58:42 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 07 Oct 2012 01:58:42 +0000 Subject: [Bug 1192] A fatal error, JRE eclipse In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1192 imc.coder at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121007/6e5a402e/attachment.html From bugzilla-daemon at icedtea.classpath.org Sat Oct 6 19:02:30 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 07 Oct 2012 02:02:30 +0000 Subject: [Bug 1013] ImageIO.read fails to open .jpg containing ICC_ProfileGray In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1013 imc.coder at gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121007/9f6bc5d4/attachment.html From bugzilla-daemon at icedtea.classpath.org Sun Oct 7 02:22:00 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 07 Oct 2012 09:22:00 +0000 Subject: [Bug 1013] ImageIO.read fails to open .jpg containing ICC_ProfileGray In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1013 Mike changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX |--- Severity|normal |major --- Comment #10 from Mike --- I'm reopening this because it's still possible to cause the JVM to segfault with six lines of code, as in the testcase I attached in June. Although it may no longer be an issue for the original submitter, a segfault is still a major issue; this is the main bug keeping us from IcedTea or recommending it to our customers. I hope it's not a WONTFIX, and if it has been resolved in a recent release then this bug should be updated to reflect that. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121007/a38ced68/attachment.html From bugzilla-daemon at icedtea.classpath.org Sun Oct 7 02:27:01 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 07 Oct 2012 09:27:01 +0000 Subject: [Bug 1013] Segmentation fault when loading Color Profile In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1013 Mike changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ImageIO.read fails to open |Segmentation fault when |.jpg containing |loading Color Profile |ICC_ProfileGray | -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121007/f5903a25/attachment.html From helpcrypto at gmail.com Sun Oct 7 23:59:56 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Mon, 8 Oct 2012 08:59:56 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> Message-ID: I know this is not a top-priority bug, and you probably have better things to do, but please, could you just confirm if this is happening? Should I add some test code? (which you may build and sign as an applet) From bugzilla-daemon at icedtea.classpath.org Mon Oct 8 00:48:10 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 08 Oct 2012 07:48:10 +0000 Subject: [Bug 1193] JVM crash In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1193 Xerxes R?nby changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xerxes at zafena.se --- Comment #1 from Xerxes R?nby --- There exist more up to date IcedTea6 and IcedTea7 packages in Debian Wheezy and Debian Experimental. IcedTea 6 1.8 is no longer supported by the IcedTea team. The bug you report looks like a garbage collector issue and this have most likely been fixed during the last year, we have fixed several GC issues for the IcedTea7 2.1 release and later. I reccomend you to upgrade and test IcedTea 7 2.1 or IcedTea 7 2.3 http://packages.qa.debian.org/o/openjdk-7.html -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121008/845c16db/attachment.html From ptisnovs at icedtea.classpath.org Mon Oct 8 02:17:01 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 08 Oct 2012 09:17:01 +0000 Subject: /hg/rhino-tests: Added new functionality and made this test comp... Message-ID: changeset 4f44305e5010 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=4f44305e5010 author: Pavel Tisnovsky date: Mon Oct 08 11:19:45 2012 +0200 Added new functionality and made this test compatible with JDK 7: src/org/RhinoTests/CompilableClassTest.java. diffstat: ChangeLog | 5 ++ src/org/RhinoTests/CompilableClassTest.java | 54 ++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 5 deletions(-) diffs (140 lines): diff -r f7012c8427c1 -r 4f44305e5010 ChangeLog --- a/ChangeLog Fri Oct 05 11:49:48 2012 +0200 +++ b/ChangeLog Mon Oct 08 11:19:45 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-08 Pavel Tisnovsky + + * src/org/RhinoTests/CompilableClassTest.java: + Added new functionality, made this test compatible with JDK 7. + 2012-10-05 Pavel Tisnovsky * src/org/RhinoTests/ScriptExceptionClassTest.java: diff -r f7012c8427c1 -r 4f44305e5010 src/org/RhinoTests/CompilableClassTest.java --- a/src/org/RhinoTests/CompilableClassTest.java Fri Oct 05 11:49:48 2012 +0200 +++ b/src/org/RhinoTests/CompilableClassTest.java Mon Oct 08 11:19:45 2012 +0200 @@ -43,6 +43,8 @@ import java.util.Arrays; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.HashMap; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -50,7 +52,9 @@ import java.lang.reflect.Modifier; import javax.script.Compilable; +import javax.script.Invocable; import javax.script.ScriptEngineManager; +import javax.script.ScriptEngine; @@ -91,7 +95,7 @@ * Test for method javax.script.Compilable.getClass().isInstance() */ protected void testIsInstance() { - assertTrue(this.compilableClass.isInstance((new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript))), + assertTrue(this.compilableClass.isInstance((Compilable)(new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript))), "Method Compilable.getClass().isInstance() returns wrong value"); } @@ -270,16 +274,42 @@ * Test for method javax.script.Compilable.getClass().getConstructors() */ protected void testGetConstructors() { + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all constructors for this class Constructor[] constructors = this.compilableClass.getConstructors(); + + // basic check for a number of constructors assertEquals(constructors.length, 0, "no constructors should be set"); + } /** * Test for method javax.script.Compilable.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - Constructor[] constructors = this.compilableClass.getDeclaredConstructors(); - assertEquals(constructors.length, 0, "no constructors should be set"); + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all declared constructors for this class + Constructor[] declaredConstructors = this.compilableClass.getDeclaredConstructors(); + + // basic check for a number of declared constructors + assertEquals(declaredConstructors.length, 0, "no constructors should be set"); + } /** @@ -329,10 +359,16 @@ */ protected void testGetMethods() { // following methods should be inherited - final String[] methodsThatShouldExists = { + final String[] methodsThatShouldExists_jdk6 = { "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.io.Reader) throws javax.script.ScriptException", "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.lang.String) throws javax.script.ScriptException", }; + + final String[] methodsThatShouldExists_jdk7 = { + "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.io.Reader) throws javax.script.ScriptException", + "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.lang.String) throws javax.script.ScriptException", + }; + // get all inherited methods Method[] methods = this.compilableClass.getMethods(); // and transform the array into a list of method names @@ -340,6 +376,7 @@ for (Method method : methods) { methodsAsString.add(method.toString()); } + String[] methodsThatShouldExists = getJavaVersion() < 7 ? methodsThatShouldExists_jdk6 : methodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : methodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), @@ -352,10 +389,16 @@ */ protected void testGetDeclaredMethods() { // following methods should be declared - final String[] declaredMethodsThatShouldExists = { + final String[] declaredMethodsThatShouldExists_jdk6 = { "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.io.Reader) throws javax.script.ScriptException", "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.lang.String) throws javax.script.ScriptException", }; + + final String[] declaredMethodsThatShouldExists_jdk7 = { + "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.io.Reader) throws javax.script.ScriptException", + "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.lang.String) throws javax.script.ScriptException", + }; + // get all declared methods Method[] declaredMethods = this.compilableClass.getDeclaredMethods(); // and transform the array into a list of method names @@ -363,6 +406,7 @@ for (Method method : declaredMethods) { methodsAsString.add(method.toString()); } + String[] declaredMethodsThatShouldExists = getJavaVersion() < 7 ? declaredMethodsThatShouldExists_jdk6 : declaredMethodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : declaredMethodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), From ptisnovs at icedtea.classpath.org Mon Oct 8 02:30:04 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 08 Oct 2012 09:30:04 +0000 Subject: /hg/gfx-test: Added four new tests to the test suite Message-ID: changeset 40480b1689fa in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=40480b1689fa author: Pavel Tisnovsky date: Mon Oct 08 11:32:50 2012 +0200 Added four new tests to the test suite src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java | 143 +++++++++++++++ 2 files changed, 148 insertions(+), 0 deletions(-) diffs (181 lines): diff -r 12b8706751c4 -r 40480b1689fa ChangeLog --- a/ChangeLog Fri Oct 05 11:43:17 2012 +0200 +++ b/ChangeLog Mon Oct 08 11:32:50 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-08 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java: + Added four new tests to this test suite. + 2012-10-05 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestBitBlt.java: diff -r 12b8706751c4 -r 40480b1689fa src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java --- a/src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java Fri Oct 05 11:43:17 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java Mon Oct 08 11:32:50 2012 +0200 @@ -37,8 +37,10 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package org.gfxtest.testsuites; +import java.awt.BasicStroke; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.QuadCurve2D; @@ -46,6 +48,9 @@ import org.gfxtest.callbacks.QuadraticCurveDrawCallbacks; +import org.gfxtest.framework.ColorPalette; +import org.gfxtest.framework.GrayscalePalette; +import org.gfxtest.framework.HSBPalette; import org.gfxtest.framework.PrintTest; import org.gfxtest.framework.TestImage; import org.gfxtest.framework.TestResult; @@ -183,6 +188,144 @@ } /** + * Test basic behavior of method Graphics.draw(Shape). + * Quadratic curves are rendered with default width and default end caps. + * Color of all rendered curves are selected from a palette. + * All rendered quadratic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawQuadraticCurvesColorPalette(TestImage image, Graphics2D graphics) + { + drawQuadraticCurve(image, graphics, QUADRATIC_CURVE_STEP, new QuadraticCurveDrawCallbacks() + { + /** + * Callback function called before each quadratic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int index) + { + // set curve color + this.graphics.setColor(ColorPalette.getColor(index)); + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Quadratic curves are rendered with default width and default end caps. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered quadratic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawQuadraticCurvesGrayScale(TestImage image, Graphics2D graphics) + { + drawQuadraticCurve(image, graphics, QUADRATIC_CURVE_STEP, new QuadraticCurveDrawCallbacks() + { + /** + * Callback function called before each quadratic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int index) + { + // compute grayscale value + float gray = y1 * 1.0f / this.image.getHeight(); + // set curve color + this.graphics.setColor(GrayscalePalette.createGrayscaleColor(gray)); + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Quadratic curves are rendered with default width and default end caps. + * All rendered quadratic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawQuadraticCurvesColorScale(TestImage image, Graphics2D graphics) + { + drawQuadraticCurve(image, graphics, QUADRATIC_CURVE_STEP, new QuadraticCurveDrawCallbacks() + { + /** + * Callback function called before each quadratic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int index) + { + // compute hue value + float hue = y1 * 1.0f / this.image.getHeight(); + // set curve color + this.graphics.setColor(HSBPalette.createHsbColor(hue)); + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Quadratic curves are rendered with various width and default end caps. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered quadratic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawQuadraticCurvesChangeWidth(TestImage image, Graphics2D graphics) + { + drawQuadraticCurve(image, graphics, QUADRATIC_CURVE_STEP, new QuadraticCurveDrawCallbacks() + { + /** + * Stroke width. + */ + float strokeWidth = 0.0f; + + /** + * Callback function called before each quadratic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int index) + { + // set stroke width + this.graphics.setStroke(new BasicStroke(this.strokeWidth)); + // set new stroke width + this.strokeWidth = this.strokeWidth < MAX_STROKE_WIDTH ? this.strokeWidth + STROKE_WIDTH_DELTA : this.strokeWidth; + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** * Entry point to the test suite. * * @param args From jfabriko at redhat.com Mon Oct 8 04:33:23 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Mon, 08 Oct 2012 13:33:23 +0200 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "function parameters" tests Message-ID: <5072BA03.5070804@redhat.com> 2012-10-08 Jana Fabrikova * /tests/reproducers/simple/JSToJFuncParam: adding a new reproducer for the third LiveConnect test (Tests for function parameter conversion when calling Java functions from JavaScript.) I would like to ask for review of the attached patch, thank you, Jana -------------- next part -------------- A non-text attachment was scrubbed... Name: adding_JSToJFuncParam_reproducer.patch Type: text/x-patch Size: 31192 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121008/a25c2e83/adding_JSToJFuncParam_reproducer.patch From ptisnovs at icedtea.classpath.org Tue Oct 9 00:15:41 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 09 Oct 2012 07:15:41 +0000 Subject: /hg/rhino-tests: Make the test src/org/RhinoTests/SimpleBindings... Message-ID: changeset 077761971a05 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=077761971a05 author: Pavel Tisnovsky date: Tue Oct 09 09:18:20 2012 +0200 Make the test src/org/RhinoTests/SimpleBindingsClassTest.java compatible with JDK 7. diffstat: ChangeLog | 5 + src/org/RhinoTests/SimpleBindingsClassTest.java | 108 ++++++++++++++++------- 2 files changed, 81 insertions(+), 32 deletions(-) diffs (188 lines): diff -r 4f44305e5010 -r 077761971a05 ChangeLog --- a/ChangeLog Mon Oct 08 11:19:45 2012 +0200 +++ b/ChangeLog Tue Oct 09 09:18:20 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-09 Pavel Tisnovsky + + * src/org/RhinoTests/SimpleBindingsClassTest.java: + Make this test compatible with JDK 7. + 2012-10-08 Pavel Tisnovsky * src/org/RhinoTests/CompilableClassTest.java: diff -r 4f44305e5010 -r 077761971a05 src/org/RhinoTests/SimpleBindingsClassTest.java --- a/src/org/RhinoTests/SimpleBindingsClassTest.java Mon Oct 08 11:19:45 2012 +0200 +++ b/src/org/RhinoTests/SimpleBindingsClassTest.java Tue Oct 09 09:18:20 2012 +0200 @@ -43,6 +43,8 @@ import java.util.Arrays; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.HashMap; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -271,44 +273,60 @@ * Test for method javax.script.SimpleBindings.getClass().getConstructors() */ protected void testGetConstructors() { + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + testedConstructors_jdk7.put("public javax.script.SimpleBindings(java.util.Map)", "javax.script.SimpleBindings"); + testedConstructors_jdk7.put("public javax.script.SimpleBindings()", "javax.script.SimpleBindings"); + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all constructors for this class Constructor[] constructors = this.simpleBindingsClass.getConstructors(); + + // basic check for a number of constructors assertEquals(constructors.length, 2, "only 2 constructors should be set"); - String constructorName; - String constructorString; - constructorName = constructors[0].getName(); - constructorString = constructors[0].toString(); - assertEquals(constructorName, "javax.script.SimpleBindings", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.SimpleBindings(java.util.Map)", - "wrong constructor.toString() " + constructorName); - constructorName = constructors[1].getName(); - constructorString = constructors[1].toString(); - assertEquals(constructorName, "javax.script.SimpleBindings", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.SimpleBindings()", - "wrong constructor.toString() " + constructorName); + + // check if all constructors exists + for (Constructor constructor : constructors) { + String constructorName = constructor.getName(); + String constructorString = constructor.toString(); + assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); + assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); + } } /** * Test for method javax.script.SimpleBindings.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - Constructor[] constructors = this.simpleBindingsClass.getDeclaredConstructors(); - assertEquals(constructors.length, 2, "only 2 constructors should be set"); - String constructorName; - String constructorString; - constructorName = constructors[0].getName(); - constructorString = constructors[0].toString(); - assertEquals(constructorName, "javax.script.SimpleBindings", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.SimpleBindings(java.util.Map)", - "wrong constructor.toString() " + constructorName); - constructorName = constructors[1].getName(); - constructorString = constructors[1].toString(); - assertEquals(constructorName, "javax.script.SimpleBindings", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.SimpleBindings()", - "wrong constructor.toString() " + constructorName); + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + testedConstructors_jdk7.put("public javax.script.SimpleBindings(java.util.Map)", "javax.script.SimpleBindings"); + testedConstructors_jdk7.put("public javax.script.SimpleBindings()", "javax.script.SimpleBindings"); + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all declared constructors for this class + Constructor[] declaredConstructors = this.simpleBindingsClass.getDeclaredConstructors(); + + // basic check for a number of declared constructors + assertEquals(declaredConstructors.length, 2, "only 2 constructors should be set"); + + // check if all declared constructors exists + for (Constructor declaredConstructor : declaredConstructors) { + String constructorName = declaredConstructor.getName(); + String constructorString = declaredConstructor.toString(); + assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); + assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); + } } /** @@ -359,7 +377,10 @@ */ protected void testGetMethods() { // following methods should be inherited - final String[] methodsThatShouldExists = { + final String[] methodsThatShouldExists_jdk6 = { + }; + + final String[] methodsThatShouldExists_jdk7 = { "public boolean java.lang.Object.equals(java.lang.Object)", "public boolean javax.script.SimpleBindings.containsKey(java.lang.Object)", "public boolean javax.script.SimpleBindings.containsValue(java.lang.Object)", @@ -383,6 +404,7 @@ "public void javax.script.SimpleBindings.clear()", "public void javax.script.SimpleBindings.putAll(java.util.Map)", }; + // get all inherited methods Method[] methods = this.simpleBindingsClass.getMethods(); // and transform the array into a list of method names @@ -390,7 +412,24 @@ for (Method method : methods) { methodsAsString.add(method.toString()); } + String[] methodsThatShouldExists = getJavaVersion() < 7 ? methodsThatShouldExists_jdk6 : methodsThatShouldExists_jdk7; // check if all required methods really exists + Constructor[] constructors = this.simpleBindingsClass.getDeclaredConstructors(); + assertEquals(constructors.length, 2, "only 2 constructors should be set"); + String constructorName; + String constructorString; + constructorName = constructors[0].getName(); + constructorString = constructors[0].toString(); + assertEquals(constructorName, "javax.script.SimpleBindings", + "wrong constructor name " + constructorName); + assertEquals(constructorString, "public javax.script.SimpleBindings(java.util.Map)", + "wrong constructor.toString() " + constructorName); + constructorName = constructors[1].getName(); + constructorString = constructors[1].toString(); + assertEquals(constructorName, "javax.script.SimpleBindings", + "wrong constructor name " + constructorName); + assertEquals(constructorString, "public javax.script.SimpleBindings()", + "wrong constructor.toString() " + constructorName); for (String methodThatShouldExists : methodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), "method " + methodThatShouldExists + " not found"); @@ -402,7 +441,10 @@ */ protected void testGetDeclaredMethods() { // following methods should be declared - final String[] declaredMethodsThatShouldExists = { + final String[] declaredMethodsThatShouldExists_jdk6 = { + }; + + final String[] declaredMethodsThatShouldExists_jdk7 = { "private void javax.script.SimpleBindings.checkKey(java.lang.Object)", "public boolean javax.script.SimpleBindings.containsKey(java.lang.Object)", "public boolean javax.script.SimpleBindings.containsValue(java.lang.Object)", @@ -418,6 +460,7 @@ "public void javax.script.SimpleBindings.clear()", "public void javax.script.SimpleBindings.putAll(java.util.Map)", }; + // get all declared methods Method[] declaredMethods = this.simpleBindingsClass.getDeclaredMethods(); // and transform the array into a list of method names @@ -425,6 +468,7 @@ for (Method method : declaredMethods) { methodsAsString.add(method.toString()); } + String[] declaredMethodsThatShouldExists = getJavaVersion() < 7 ? declaredMethodsThatShouldExists_jdk6 : declaredMethodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : declaredMethodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), From ptisnovs at icedtea.classpath.org Tue Oct 9 00:22:14 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 09 Oct 2012 07:22:14 +0000 Subject: /hg/gfx-test: Added nine new tests to the test suite src/org/gfx... Message-ID: changeset 26cb5bb2ccf5 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=26cb5bb2ccf5 author: Pavel Tisnovsky date: Tue Oct 09 09:24:59 2012 +0200 Added nine new tests to the test suite src/org/gfxtest/testsuites/PrintTestCubicCurves.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/PrintTestCubicCurves.java | 361 +++++++++++++++++++ 2 files changed, 366 insertions(+), 0 deletions(-) diffs (383 lines): diff -r 40480b1689fa -r 26cb5bb2ccf5 ChangeLog --- a/ChangeLog Mon Oct 08 11:32:50 2012 +0200 +++ b/ChangeLog Tue Oct 09 09:24:59 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-09 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestCubicCurves.java: + Added nine new tests to this test suite. + 2012-10-08 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java: diff -r 40480b1689fa -r 26cb5bb2ccf5 src/org/gfxtest/testsuites/PrintTestCubicCurves.java --- a/src/org/gfxtest/testsuites/PrintTestCubicCurves.java Mon Oct 08 11:32:50 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestCubicCurves.java Tue Oct 09 09:24:59 2012 +0200 @@ -330,6 +330,367 @@ } /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with various width and end caps set to CAP_BUTT. + * Join style is set to bevel style. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesChangeWidthCapButtJoinBevel(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Stroke width. + */ + float strokeWidth = 0.0f; + + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // set stroke width + this.graphics.setStroke(new BasicStroke(this.strokeWidth, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL)); + // set new stroke width + this.strokeWidth = this.strokeWidth < MAX_STROKE_WIDTH ? this.strokeWidth + STROKE_WIDTH_DELTA : this.strokeWidth; + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with various width and end caps set to CAP_ROUND. + * Join style is set to bevel style. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesChangeWidthCapRoundJoinBevel(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Stroke width. + */ + float strokeWidth = 0.0f; + + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // set stroke width + this.graphics.setStroke(new BasicStroke(this.strokeWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL)); + // set new stroke width + this.strokeWidth = this.strokeWidth < MAX_STROKE_WIDTH ? this.strokeWidth + STROKE_WIDTH_DELTA : this.strokeWidth; + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with various width and end caps set to CAP_SQUARE. + * Join style is set to bevel style. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesChangeWidthCapSquareJoinBevel(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Stroke width. + */ + float strokeWidth = 0.0f; + + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // set stroke width + this.graphics.setStroke(new BasicStroke(this.strokeWidth, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL)); + // set new stroke width + this.strokeWidth = this.strokeWidth < MAX_STROKE_WIDTH ? this.strokeWidth + STROKE_WIDTH_DELTA : this.strokeWidth; + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with various width and end caps set to CAP_BUTT. + * Join style is set to miter style. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesChangeWidthCapButtJoinMiter(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Stroke width. + */ + float strokeWidth = 0.0f; + + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // set stroke width + this.graphics.setStroke(new BasicStroke(this.strokeWidth, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)); + // set new stroke width + this.strokeWidth = this.strokeWidth < MAX_STROKE_WIDTH ? this.strokeWidth + STROKE_WIDTH_DELTA : this.strokeWidth; + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with various width and end caps set to CAP_ROUND. + * Join style is set to miter style. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesChangeWidthCapRoundJoinMiter(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Stroke width. + */ + float strokeWidth = 0.0f; + + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // set stroke width + this.graphics.setStroke(new BasicStroke(this.strokeWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)); + // set new stroke width + this.strokeWidth = this.strokeWidth < MAX_STROKE_WIDTH ? this.strokeWidth + STROKE_WIDTH_DELTA : this.strokeWidth; + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with various width and end caps set to CAP_SQUARE. + * Join style is set to miter style. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesChangeWidthCapSquareJoinMiter(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Stroke width. + */ + float strokeWidth = 0.0f; + + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // set stroke width + this.graphics.setStroke(new BasicStroke(this.strokeWidth, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER)); + // set new stroke width + this.strokeWidth = this.strokeWidth < MAX_STROKE_WIDTH ? this.strokeWidth + STROKE_WIDTH_DELTA : this.strokeWidth; + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with various width and end caps set to CAP_BUTT. + * Join style is set to round style. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesChangeWidthCapButtJoinRound(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Stroke width. + */ + float strokeWidth = 0.0f; + + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // set stroke width + this.graphics.setStroke(new BasicStroke(this.strokeWidth, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)); + // set new stroke width + this.strokeWidth = this.strokeWidth < MAX_STROKE_WIDTH ? this.strokeWidth + STROKE_WIDTH_DELTA : this.strokeWidth; + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with various width and end caps set to CAP_ROUND. + * Join style is set to round style. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesChangeWidthCapRoundJoinRound(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Stroke width. + */ + float strokeWidth = 0.0f; + + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // set stroke width + this.graphics.setStroke(new BasicStroke(this.strokeWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); + // set new stroke width + this.strokeWidth = this.strokeWidth < MAX_STROKE_WIDTH ? this.strokeWidth + STROKE_WIDTH_DELTA : this.strokeWidth; + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with various width and end caps set to CAP_SQUARE. + * Join style is set to round style. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesChangeWidthCapSquareJoinRound(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Stroke width. + */ + float strokeWidth = 0.0f; + + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // set stroke width + this.graphics.setStroke(new BasicStroke(this.strokeWidth, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_ROUND)); + // set new stroke width + this.strokeWidth = this.strokeWidth < MAX_STROKE_WIDTH ? this.strokeWidth + STROKE_WIDTH_DELTA : this.strokeWidth; + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** * Entry point to the test suite. * * @param args From helpcrypto at gmail.com Tue Oct 9 08:49:57 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Tue, 9 Oct 2012 17:49:57 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: <50743B29.4020805@redhat.com> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50743B29.4020805@redhat.com> Message-ID: Thank you Adam. I'm not sure if I have the needed skills to contribute to source. Sorry for that. I'll continue testing and report more bugs if detected (surely there are some). Bye! On Tue, Oct 9, 2012 at 4:56 PM, Adam Domurad wrote: > On 10/08/2012 02:59 AM, helpcrypto helpcrypto wrote: >> I know this is not a top-priority bug, and you probably have better >> things to do, but please, could you just confirm if this is >> happening? Should I add some test code? (which you may build and >> sign as an applet) > > I can verify that this occurs, test code is not needed as it is just a > matter of printing the associated property. Thank you for the bug report! > However, its hard to say when the issue will be addressed, unfortunately. > > Cheers, > - Adam > From bugzilla-daemon at icedtea.classpath.org Tue Oct 9 10:33:51 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 09 Oct 2012 17:33:51 +0000 Subject: [Bug 1013] Segmentation fault when loading Color Profile In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1013 --- Comment #11 from Andrew John Hughes --- Are you able to replicate this? I just ran your testcase on 2.1, 2.2 and 2.3 and none of them segfaulted. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121009/f9f11716/attachment.html From omajid at redhat.com Tue Oct 9 10:52:23 2012 From: omajid at redhat.com (Omair Majid) Date: Tue, 09 Oct 2012 13:52:23 -0400 Subject: Moving applet from Oracle jre: first tries In-Reply-To: <50698939.8050107@redhat.com> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> Message-ID: <50746457.5000300@redhat.com> On 10/01/2012 08:14 AM, Omair Majid wrote: > On 10/01/2012 04:01 AM, helpcrypto helpcrypto wrote: >> so...any idea? Should i file a bug? > > Yes, please. > > I think we don't expose deployment properties as system properties in > icedtea-web. We should fix this. Fix attached. Any concerns or suggestions? Thanks, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: pr1186.patch Type: text/x-patch Size: 5919 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121009/7c4b1103/pr1186.patch From adomurad at redhat.com Tue Oct 9 11:43:40 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 09 Oct 2012 14:43:40 -0400 Subject: [RFC][icedtea-web]: Fix PR1166 - Embedded JNLP File is not supported in applet tag In-Reply-To: <506C7F7B.8020909@redhat.com> References: <50648FF6.408@redhat.com> <50660483.3030309@redhat.com> <506B44E6.7030305@redhat.com> <506C7F7B.8020909@redhat.com> Message-ID: <5074705C.2050208@redhat.com> On 10/03/2012 02:10 PM, Saad Mohammad wrote: > Hi Adam, > > Thanks for looking over my patches. I updated the reproducers after your review. > Along with the attached reproducer, I also added unit test and updated the bug > fix patch so it is more compatible with tests. > > Also, just a note, the reproducers do all pass for me through the test engine. > Let me know if you are having any trouble. > > Thanks. > > CHANGELOGS: > ============================================================================== > BUG FIX: > > 2012-10-03 Saad Mohammad > > Fix PR1166: Embedded JNLP File is not supported in applet tag. > * configure.ac: Checks for sun.misc.BASE64Encoder and > sun.misc.BASE64Decoder > * netx/net/sourceforge/jnlp/JNLPFile.java (JNLPFile): > New constructor which accepts inputstream of jnlp file and a > specified codebase. > * netx/net/sourceforge/jnlp/Parser.java (Parser): If parsing of > codebase fails, it will overwrite the codebase with the one passed > in through parameters. > * netx/net/sourceforge/jnlp/PluginBridge.java: > (PluginBridge) Supports embedded jnlp file. > (decodeBase64String) Decodes Base64 strings to byte array. > ============================================================================== > REPRODUCER: > > 2012-10-03 Saad Mohammad > > Added reproducer for PR1166. > * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlp.jnlp: > Launching jnlp file that is used by jnlp_href in applet tag > * > tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletNoCodebase.html: > Applet with an embedded jnlp file with no codebase specified > * > tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletWithDotCodebase.html: > Applet with an embedded jnlp file with codebase set as a 'dot' > * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/JnlpInApplet.html: > Applet with jnlp_href file. > * tests/reproducers/simple/EmbeddedJnlpInApplet/srcs/EmbeddedJnlp.java: > Simple class that outputs strings. > * > tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java: > Testcase that tests embedded jnlps in html pages. > > ============================================================================== > UNIT TESTS: > > 2012-10-03 Saad Mohammad > > * tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java: > Tests the JNLPFile constructor that accepts an InputStream and an alternative > codebase. > * tests/netx/unit/net/sourceforge/jnlp/ParserTest.java: > Tests if the constructor handles the alternative codebase parameter correctly. > * tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java: > Tests if BASE64 strings are decoded correctly and if PluginBridge is > constructed with an > embedded jnlp. > > ============================================================================== > Review of bugfix & unit test: > diff --git a/configure.ac b/configure.ac > --- a/configure.ac > +++ b/configure.ac > @@ -77,6 +77,8 @@ > IT_CHECK_FOR_CLASS(SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK, > [sun.net.www.protocol.jar.URLJarFileCallBack]) > IT_CHECK_FOR_CLASS(SUN_AWT_X11_XEMBEDDEDFRAME, > [sun.awt.X11.XEmbeddedFrame]) > IT_CHECK_FOR_CLASS(SUN_MISC_REF, [sun.misc.Ref]) > +IT_CHECK_FOR_CLASS(SUN_MISC_BASE64ENCODER, [sun.misc.BASE64Encoder]) > +IT_CHECK_FOR_CLASS(SUN_MISC_BASE64DECODER, [sun.misc.BASE64Decoder]) It's neither here nor there, but I wonder if these classes will still be available here once http://openjdk.java.net/jeps/135 rolls around. > IT_CHECK_FOR_CLASS(COM_SUN_JNDI_TOOLKIT_URL_URLUTIL, > [com.sun.jndi.toolkit.url.UrlUtil]) > IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, > [sun.applet.AppletImageRef]) > IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE > diff --git a/netx/net/sourceforge/jnlp/JNLPFile.java > b/netx/net/sourceforge/jnlp/JNLPFile.java > --- a/netx/net/sourceforge/jnlp/JNLPFile.java > +++ b/netx/net/sourceforge/jnlp/JNLPFile.java > @@ -255,6 +255,19 @@ > } > > /** > + * Create a JNLPFile from an input stream. > + * > + * @param input input stream of JNLP file. > + * @param codebase codebase to use if not specified in JNLP file.. > + * @param strict whether to enforce the spec rules > + * @throws IOException if an IO exception occurred > + * @throws ParseException if the JNLP file was invalid > + */ > + public JNLPFile(InputStream input, URL codebase, boolean strict) > throws ParseException { > + parse(Parser.getRootNode(input), strict, null, codebase); > + } > + > It could be worth having the other version of this method (that always passes a 'null' codebase) call this one. > + /** > * Create a JNLPFile from a character stream. > * > * @param input the stream > diff --git a/netx/net/sourceforge/jnlp/Parser.java > b/netx/net/sourceforge/jnlp/Parser.java > --- a/netx/net/sourceforge/jnlp/Parser.java > +++ b/netx/net/sourceforge/jnlp/Parser.java > @@ -143,9 +143,16 @@ > > // JNLP tag information > this.spec = getVersion(root, "spec", "1.0+"); > - this.codebase = addSlash(getURL(root, "codebase", base)); > - if (this.codebase == null) // We only override it if it is > not specified. > + > + try { > + this.codebase = addSlash(getURL(root, "codebase", base)); > + } catch (ParseException e) { > + //If parsing fails, continue by overriding the codebase > with the one passed in > + } > + > + if (this.codebase == null) // Codebase is overwritten if > codebase was not specified in file or if parsing of it failed > this.codebase = codebase; > + > this.base = (this.codebase != null) ? this.codebase : base; > // if codebase not specified use default codebase > fileLocation = getURL(root, "href", this.base); > > diff --git a/netx/net/sourceforge/jnlp/PluginBridge.java > b/netx/net/sourceforge/jnlp/PluginBridge.java > --- a/netx/net/sourceforge/jnlp/PluginBridge.java > +++ b/netx/net/sourceforge/jnlp/PluginBridge.java > @@ -22,7 +22,10 @@ > > package net.sourceforge.jnlp; > > +import java.io.ByteArrayInputStream; > import java.io.File; > +import java.io.IOException; > +import java.io.InputStream; > import java.net.URL; > import java.net.MalformedURLException; > import java.util.HashSet; > @@ -32,6 +35,8 @@ > import java.util.Map; > import java.util.Set; > > +import sun.misc.BASE64Decoder; > + > import net.sourceforge.jnlp.runtime.JNLPRuntime; > > /** > @@ -96,7 +101,17 @@ > // Use codeBase as the context for the URL. If > jnlp_href's > // value is a complete URL, it will replace > codeBase's context. > URL jnlp = new URL(codeBase, atts.get("jnlp_href")); > - JNLPFile jnlpFile = jnlpCreator.create(jnlp, null, > false, JNLPRuntime.getDefaultUpdatePolicy(), codeBase); > + JNLPFile jnlpFile = null; > + > + if (atts.containsKey("jnlp_embedded")) { > + InputStream jnlpInputStream = new > ByteArrayInputStream(decodeBase64String(atts.get("jnlp_embedded"))); > + jnlpFile = new JNLPFile(jnlpInputStream, > codeBase, false); > + } else > + jnlpFile = jnlpCreator.create(jnlp, null, false, > JNLPRuntime.getDefaultUpdatePolicy(), codeBase); I'd prefer consistent {} around the cases here, it looks odd to me to have one case wrapped with {} and one bare. (but then again I always prefer {}) > + > + if (jnlpFile.isApplet()) > + main = jnlpFile.getApplet().getMainClass(); Considering these two lines are new, could they safely be part of the 'containsKey("jnlp_embedded") ' case ? It'd be a little clearer in my opinion. > + > Map jnlpParams = > jnlpFile.getApplet().getParameters(); > info = jnlpFile.info; > > @@ -349,4 +364,12 @@ > public boolean isInstaller() { > return false; > } > + > + /** > + * Returns the decoded BASE64 string > + */ > + public static byte[] decodeBase64String(String encodedString) > throws IOException { > + BASE64Decoder base64 = new BASE64Decoder(); > + return base64.decodeBuffer(encodedString); > + } > } This should be package-private, there's no reason to expose this as part of the class's interface. Unit test: > diff --git a/tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java > b/tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java > --- a/tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java > +++ b/tests/netx/unit/net/sourceforge/jnlp/JNLPFileTest.java > @@ -37,6 +37,10 @@ > > package net.sourceforge.jnlp; > > +import java.io.ByteArrayInputStream; > +import java.io.InputStream; > +import java.net.MalformedURLException; > +import java.net.URL; > import java.util.Locale; > > import net.sourceforge.jnlp.JNLPFile.Match; > @@ -103,4 +107,45 @@ > Assert.assertFalse("Locales list should not match generalized > case but did.", > file.localeMatches(jvmLocale, mismatchAvailable, > Match.GENERALIZED)); > } > + > + @Test > + public void testCodebaseConstructorWithInputstreamAndCodebase() > throws Exception { > + String jnlpContext = "\n" + > + " + "href=\"EmbeddedJnlpFile.jnlp\"\n" + > + "codebase=\"http://icedtea.claspath.org\"\n" + > + ">\n" + > + "" + > + "\n" + > + "Sample Test\n" + > + "RedHat\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + " + "documentBase=\".\"\n" + > + "name=\"redhat.embeddedjnlp\"\n" + > + "main-class=\"redhat.embeddedjnlp\"\n" + > + "width=\"0\"\n" + > + "height=\"0\"\n" + > + "/>\n" + > + ""; > + > + URL codeBase = new URL("http://www.redhat.com/"); > + ; > + InputStream is = new > ByteArrayInputStream(jnlpContext.getBytes()); > + > + JNLPFile jnlpFile = new JNLPFile(is, codeBase, false); > + > + Assert.assertEquals("http://icedtea.claspath.org/", > jnlpFile.getCodeBase().toExternalForm()); > + Assert.assertEquals("redhat.embeddedjnlp", > jnlpFile.getApplet().getMainClass()); > + Assert.assertEquals("Sample Test", jnlpFile.getTitle()); > + Assert.assertEquals(2, jnlpFile.getResources().getJARs().length); > + } > } > diff --git a/tests/netx/unit/net/sourceforge/jnlp/ParserTest.java > b/tests/netx/unit/net/sourceforge/jnlp/ParserTest.java > --- a/tests/netx/unit/net/sourceforge/jnlp/ParserTest.java > +++ b/tests/netx/unit/net/sourceforge/jnlp/ParserTest.java > @@ -38,6 +38,7 @@ > package net.sourceforge.jnlp; > > import java.io.ByteArrayInputStream; > +import java.net.URL; > import java.util.ArrayList; > import java.util.List; > import java.util.Locale; > @@ -1355,4 +1356,60 @@ > > parser.checkForInformation(); > } > + > + @Test > + public void testOverwrittenCodebaseWithValidJnlpCodebase() throws > Exception { > + String data = "\n" + > + " + "href=\"EmbeddedJnlpFile.jnlp\"\n" + > + "codebase=\"http://www.redhat.com/\"\n" + > + ">\n" + > + ""; > + > + Node root = Parser.getRootNode(new > ByteArrayInputStream(data.getBytes())); > + Assert.assertEquals("Root name is not jnlp", "jnlp", > root.getNodeName()); > + URL overwrittenCodebase = new > URL("http://icedtea.classpath.org"); > + > + MockJNLPFile file = new MockJNLPFile(LANG_LOCALE); > + Parser parser = new Parser(file, null, root, false, false, > overwrittenCodebase); > + > + Assert.assertEquals("http://www.redhat.com/", > parser.getCodeBase().toExternalForm()); > + } > + > + @Test > + public void testOverwrittenCodebaseWithInvalidJnlpCodebase() > throws Exception { > + String data = "\n" + > + " + "href=\"EmbeddedJnlpFile.jnlp\"\n" + > + "codebase=\"this codebase is incorrect\"\n" + > + ">\n" + > + ""; > + > + Node root = Parser.getRootNode(new > ByteArrayInputStream(data.getBytes())); > + Assert.assertEquals("Root name is not jnlp", "jnlp", > root.getNodeName()); > + URL overwrittenCodebase = new > URL("http://icedtea.classpath.org"); > + > + MockJNLPFile file = new MockJNLPFile(LANG_LOCALE); > + Parser parser = new Parser(file, null, root, false, false, > overwrittenCodebase); > + > + Assert.assertEquals(overwrittenCodebase.toExternalForm(), > parser.getCodeBase().toExternalForm()); > + } > + > + @Test > + public void testOverwrittenCodebaseWithNoJnlpCodebase() throws > Exception { > + String data = "\n" + > + " + "href=\"EmbeddedJnlpFile.jnlp\"\n" + > + ">\n" + > + ""; > + > + Node root = Parser.getRootNode(new > ByteArrayInputStream(data.getBytes())); > + Assert.assertEquals("Root name is not jnlp", "jnlp", > root.getNodeName()); > + URL overwrittenCodebase = new > URL("http://icedtea.classpath.org"); > + > + MockJNLPFile file = new MockJNLPFile(LANG_LOCALE); > + Parser parser = new Parser(file, null, root, false, false, > overwrittenCodebase); > + > + Assert.assertEquals(overwrittenCodebase.toExternalForm(), > parser.getCodeBase().toExternalForm()); > + } > } > diff --git > a/tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java > b/tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java > --- a/tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java > +++ b/tests/netx/unit/net/sourceforge/jnlp/PluginBridgeTest.java > @@ -27,13 +27,20 @@ > import java.io.IOException; > import java.net.MalformedURLException; > import java.net.URL; > +import java.util.ArrayList; > import java.util.HashMap; > import java.util.Hashtable; > +import java.util.List; > +import junit.framework.Assert; > > import net.sourceforge.jnlp.cache.UpdatePolicy; > > import org.junit.Test; > > +import sun.misc.BASE64Encoder; > + > +import com.sun.org.apache.bcel.internal.generic.INSTANCEOF; > + > public class PluginBridgeTest { > private class MockJNLPCreator extends JNLPCreator { > > @@ -96,4 +103,206 @@ > mockCreator.getJNLPHref().toExternalForm()); > } > > + @Test > + public void testDecodingJNLPFile() throws Exception { > + String actualFile = "\n" + > + " + "href=\"EmbeddedJnlpFile.jnlp\"\n" + > + "codebase=\"http://www.redhat.com\"\n" + > + ">\n" + > + "" + > + "\n" + > + "Sample Test\n" + > + "RedHat\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + "\n" + > + " + "documentBase=\".\"\n" + > + "name=\"redhat.embeddedjnlp\"\n" + > + "main-class=\"redhat.embeddedjnlp\"\n" + > + "width=\"0\"\n" + > + "height=\"0\"\n" + > + "/>\n" + > + ""; > + > + BASE64Encoder encoder = new BASE64Encoder(); > + String encodedFile = encoder.encodeBuffer(actualFile.getBytes()); > + > + byte[] decodedBytes = > PluginBridge.decodeBase64String(encodedFile); > + String decodedString = new String(decodedBytes); > + Assert.assertEquals(actualFile, decodedString); This is a rather long test-string for whats already a very well tested method (the underlying implementation is well-tested, that is.) If you are going to test it, I would use a simple short message. The test will be easier to understand as a result (it has nothing to do with JNLP files). Also the test name is inaccurate, it is merely testing PluginBridge.decodeBase64String. > + } > + > + @Test > + public void testEmbeddedJnlpWithValidCodebase() throws Exception { > + URL codeBase = new URL("http://icedtea.classpath.org"); > + String relativeLocation = "/EmbeddedJnlpFile.jnlp"; > + > + //Codebase within jnlp file is VALID > + /** > + > + + href="EmbeddedJnlpFile.jnlp" > + codebase="http://www.redhat.com" > + > > + > + > + Sample Test > + RedHat > + > + > + > + > + > + > + > + > + > + + documentBase="." > + name="redhat.embeddedjnlp" > + main-class="redhat.embeddedjnlp" > + width="0" > + height="0" > + /> > + > + **/ > + > + String jnlpFileEncoded = > "ICAgICAgICA8P3htbCB2ZXJzaW9uPSIxLjAiPz4NCiAgICAgICAgICAgIDxqbmxwIHNwZWM9IjEu" > + > + > "NSsiIA0KICAgICAgICAgICAgICBocmVmPSJFbWJlZGRlZEpubHBGaWxlLmpubHAiIA0KICAgICAg" > + > + > "ICAgICAgICBjb2RlYmFzZT0iaHR0cDovL3d3dy5yZWRoYXQuY29tIiAgICANCiAgICAgICAgICAg" > + > + > "ID4NCg0KICAgICAgICAgICAgPGluZm9ybWF0aW9uPg0KICAgICAgICAgICAgICAgIDx0aXRsZT5T" > + > + > "YW1wbGUgVGVzdDwvdGl0bGU+DQogICAgICAgICAgICAgICAgPHZlbmRvcj5SZWRIYXQ8L3ZlbmRv" > + > + > "cj4NCiAgICAgICAgICAgICAgICA8b2ZmbGluZS1hbGxvd2VkLz4NCiAgICAgICAgICAgIDwvaW5m" > + > + > "b3JtYXRpb24+DQoNCiAgICAgICAgICAgIDxyZXNvdXJjZXM+DQogICAgICAgICAgICAgICAgPGoy" > + > + > "c2UgdmVyc2lvbj0nMS42KycgLz4NCiAgICAgICAgICAgICAgICA8amFyIGhyZWY9J0VtYmVkZGVk" > + > + > "Sm5scEphck9uZS5qYXInIG1haW49J3RydWUnIC8+DQogICAgICAgICAgICAgICAgPGphciBocmVm" > + > + > "PSdFbWJlZGRlZEpubHBKYXJUd28uamFyJyBtYWluPSd0cnVlJyAvPg0KICAgICAgICAgICAgPC9y" > + > + > "ZXNvdXJjZXM+DQoNCiAgICAgICAgICAgIDxhcHBsZXQtZGVzYw0KICAgICAgICAgICAgICAgIGRv" > + > + > "Y3VtZW50QmFzZT0iLiINCiAgICAgICAgICAgICAgICBuYW1lPSJyZWRoYXQuZW1iZWRkZWRqbmxw" > + > + > "Ig0KICAgICAgICAgICAgICAgIG1haW4tY2xhc3M9InJlZGhhdC5lbWJlZGRlZGpubHAiDQogICAg" > + > + > "ICAgICAgICAgICAgd2lkdGg9IjAiDQogICAgICAgICAgICAgICAgaGVpZ2h0PSIwIg0KICAgICAg" > + > + "ICAgICAgLz4NCiAgICAgICAgICAgIDwvam5scD4="; > + > + MockJNLPCreator mockCreator = new MockJNLPCreator(); > + Hashtable atts = new Hashtable(); > + atts.put("jnlp_href", relativeLocation); > + atts.put("jnlp_embedded", jnlpFileEncoded); > + > + String jnlpCodebase = "http://www.redhat.com"; > + PluginBridge pb = new PluginBridge(codeBase, null, "", "", 0, > 0, atts, "", mockCreator); > + JARDesc[] jars = pb.getResources().getJARs(); > + > + //Check if there are two jars cached > + Assert.assertTrue(jars.length == 2); > + > + //Resource can be in any order > + List resourceLocations = new ArrayList(); > + resourceLocations.add(jars[0].getLocation().toExternalForm()); > + resourceLocations.add(jars[1].getLocation().toExternalForm()); > + > + //Check URLs of jars > + Assert.assertTrue(resourceLocations.contains(jnlpCodebase + > "/EmbeddedJnlpJarOne.jar")); > + Assert.assertTrue((resourceLocations.contains(jnlpCodebase + > "/EmbeddedJnlpJarTwo.jar"))); > + } > + > + @Test > + public void testEmbeddedJnlpWithInvalidCodebase() throws Exception { > + URL overwrittenCodebase = new > URL("http://icedtea.classpath.org"); > + String relativeLocation = "/EmbeddedJnlpFile.jnlp"; > + > + //Codebase within jnlp file is INVALID > + /** > + > + + href="EmbeddedJnlpFile.jnlp" > + codebase="invalidPath" > + > > + > + > + Sample Test > + RedHat > + > + > + > + > + > + > + > + > + > + + documentBase="." > + name="redhat.embeddedjnlp" > + main-class="redhat.embeddedjnlp" > + width="0" > + height="0" > + /> > + > + **/ > + > + String jnlpFileEncoded = > "ICAgICAgICA8P3htbCB2ZXJzaW9uPSIxLjAiPz4NCiAgICAgICAgICAgIDxqbmxwIHNwZWM9IjEu" > + > + > "NSsiIA0KICAgICAgICAgICAgICBocmVmPSJFbWJlZGRlZEpubHBGaWxlLmpubHAiIA0KICAgICAg" > + > + > "ICAgICAgICBjb2RlYmFzZT0iaW52YWxpZFBhdGgiICAgIA0KICAgICAgICAgICAgPg0KDQogICAg" > + > + > "ICAgICAgICA8aW5mb3JtYXRpb24+DQogICAgICAgICAgICAgICAgPHRpdGxlPlNhbXBsZSBUZXN0" > + > + > "PC90aXRsZT4NCiAgICAgICAgICAgICAgICA8dmVuZG9yPlJlZEhhdDwvdmVuZG9yPg0KICAgICAg" > + > + > "ICAgICAgICAgIDxvZmZsaW5lLWFsbG93ZWQvPg0KICAgICAgICAgICAgPC9pbmZvcm1hdGlvbj4N" > + > + > "Cg0KICAgICAgICAgICAgPHJlc291cmNlcz4NCiAgICAgICAgICAgICAgICA8ajJzZSB2ZXJzaW9u" > + > + > "PScxLjYrJyAvPg0KICAgICAgICAgICAgICAgIDxqYXIgaHJlZj0nRW1iZWRkZWRKbmxwSmFyT25l" > + > + > "LmphcicgbWFpbj0ndHJ1ZScgLz4NCiAgICAgICAgICAgICAgICA8amFyIGhyZWY9J0VtYmVkZGVk" > + > + > "Sm5scEphclR3by5qYXInIG1haW49J3RydWUnIC8+DQogICAgICAgICAgICA8L3Jlc291cmNlcz4N" > + > + > "Cg0KICAgICAgICAgICAgPGFwcGxldC1kZXNjDQogICAgICAgICAgICAgICAgZG9jdW1lbnRCYXNl" > + > + > "PSIuIg0KICAgICAgICAgICAgICAgIG5hbWU9InJlZGhhdC5lbWJlZGRlZGpubHAiDQogICAgICAg" > + > + > "ICAgICAgICAgbWFpbi1jbGFzcz0icmVkaGF0LmVtYmVkZGVkam5scCINCiAgICAgICAgICAgICAg" > + > + > "ICB3aWR0aD0iMCINCiAgICAgICAgICAgICAgICBoZWlnaHQ9IjAiDQogICAgICAgICAgICAvPg0K" > + > + "ICAgICAgICAgICAgPC9qbmxwPg=="; > + > + MockJNLPCreator mockCreator = new MockJNLPCreator(); > + Hashtable atts = new Hashtable(); > + atts.put("jnlp_href", relativeLocation); > + atts.put("jnlp_embedded", jnlpFileEncoded); > + > + PluginBridge pb = new PluginBridge(overwrittenCodebase, null, > "", "", 0, 0, atts, "", mockCreator); > + JARDesc[] jars = pb.getResources().getJARs(); > + > + //Check if there are two jars cached > + Assert.assertTrue(jars.length == 2); > + > + //Resource can be in any order > + List resourceLocations = new ArrayList(); > + resourceLocations.add(jars[0].getLocation().toExternalForm()); > + resourceLocations.add(jars[1].getLocation().toExternalForm()); > + > + //Check URLs of jars > + Assert.assertTrue(resourceLocations.contains(overwrittenCodebase + > "/EmbeddedJnlpJarOne.jar")); > + Assert.assertTrue((resourceLocations.contains(overwrittenCodebase + > "/EmbeddedJnlpJarTwo.jar"))); > + } > + > + @Test > + public void testInvalidEmbeddedJnlp() throws Exception { > + URL overwrittenCodebase = new > URL("http://icedtea.classpath.org"); > + String relativeLocation = "/EmbeddedJnlpFile.jnlp"; > + > + //Embedded jnlp is invalid > + String jnlpFileEncoded = "thisContextIsInvalid"; > + > + MockJNLPCreator mockCreator = new MockJNLPCreator(); > + Hashtable atts = new Hashtable(); > + atts.put("jnlp_href", relativeLocation); > + atts.put("jnlp_embedded", jnlpFileEncoded); > + > + try { > + new PluginBridge(overwrittenCodebase, null, "", "", 0, 0, > atts, "", mockCreator); > + } catch (Exception e) { > + return; > + } > + Assert.fail("PluginBridge was successfully created with an > invalid embedded jnlp value"); > + } > } > \ No newline at end of file Thanks for including unit tests & reproducers. It is almost push-ready other than my few nits. Good patch overall, the implementation is rather elegant. Cheers, - Adam From omajid at redhat.com Tue Oct 9 12:13:55 2012 From: omajid at redhat.com (Omair Majid) Date: Tue, 09 Oct 2012 15:13:55 -0400 Subject: [RFC][icedtea-web]: Fix PR1166 - Embedded JNLP File is not supported in applet tag In-Reply-To: <506C7F7B.8020909@redhat.com> References: <50648FF6.408@redhat.com> <50660483.3030309@redhat.com> <506B44E6.7030305@redhat.com> <506C7F7B.8020909@redhat.com> Message-ID: <50747773.3070304@redhat.com> On 10/03/2012 02:10 PM, Saad Mohammad wrote: > Hi Adam, > > Thanks for looking over my patches. I updated the reproducers after your review. > Along with the attached reproducer, I also added unit test and updated the bug > fix patch so it is more compatible with tests. > > Also, just a note, the reproducers do all pass for me through the test engine. > Let me know if you are having any trouble. > Sorry about jumping in the middle, but this looks less-than-desirable: > IT_CHECK_FOR_CLASS(SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK, [sun.net.www.protocol.jar.URLJarFileCallBack]) > IT_CHECK_FOR_CLASS(SUN_AWT_X11_XEMBEDDEDFRAME, [sun.awt.X11.XEmbeddedFrame]) > IT_CHECK_FOR_CLASS(SUN_MISC_REF, [sun.misc.Ref]) > +IT_CHECK_FOR_CLASS(SUN_MISC_BASE64ENCODER, [sun.misc.BASE64Encoder]) > +IT_CHECK_FOR_CLASS(SUN_MISC_BASE64DECODER, [sun.misc.BASE64Decoder]) > IT_CHECK_FOR_CLASS(COM_SUN_JNDI_TOOLKIT_URL_URLUTIL, [com.sun.jndi.toolkit.url.UrlUtil]) > IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef]) > IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE Please use net.sourceforge.jnlp.util.replacements.BASE64Encoder instead of sun.misc.Base64Encoder. Thanks, Omair From adomurad at redhat.com Tue Oct 9 13:03:44 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 09 Oct 2012 16:03:44 -0400 Subject: [RFC][icedtea-web]: DownloadService implementation In-Reply-To: <506F5304.9010606@redhat.com> References: <50411B4E.8080308@redhat.com> <50609F44.2040102@redhat.com> <1348857406.17801.92.camel@adomurad-desktop> <506F5304.9010606@redhat.com> Message-ID: <50748320.2080507@redhat.com> On 10/05/2012 05:37 PM, Saad Mohammad wrote: > Hi Adam, > > Thanks for the review of DownloadService implementation patch. The updated patch > is attached. > > As you recommend in the review, I have moved as much functionality as I could > away from JNLPClassLoader to two new classes: > net.sourceforge.jnlp.runtime.LocateJnlpClassLoader > net.sourceforge.jnlp.runtime.ManageJnlpResources > > I also removed XDownloadService helper and replaced it with > XDownloadService.getClassLoader( ). For unit testing purposes, I will just > create a class which inherits from XDownloadService and only override > getClassLoader( ) so it returns a mocked JNLPClassLoader since runtime resources > are not available. > > You can still test this patch with the reproducer patch. Let me know if you have > any other questions. Thanks :). > > Changelog: > > 2012-10-05 Saad Mohammad > > Core implementation of DownloadService. > * netx/net/sourceforge/jnlp/cache/CacheUtil.java (getCacheParentDirectory): > Returns the parent directory of the cached resource. > * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: > (getLoaders): Returns all loaders that this loader uses, including > itself > (addNewJar): Adds a new jar to the classloader with specified > UpdatePolicy. > (removeJars): Remove jars from the filesystem. > (initializeNewJarDownload): Downloads and initializes jars into the > current loader. > (manageExternalJars): Manages jars which are not mentioned in the > JNLP file. > * netx/net/sourceforge/jnlp/runtime/LocateJnlpClassLoader.java: > (getLoaderByJnlpFile): Returns the classloader of the jnlp file > specified. > (getLoaderByResourceUrl): Returns the classloader that contains the > specified jar. > * netx/net/sourceforge/jnlp/runtime/ManageJnlpResources.java: > (findJars): Returns jars from the JNLP file with the specified > partname. > (removeCachedJars): Removes jar from cache. > (downloadJars): Downloads jars identified by part name. > (loadExternalResouceToCache): Download and initalize resources which > are not mentioned in the jnlp file. > (removeExternalCachedResource): Removes resources from cache which > are not mentioned in the jnlp file. > (isExternalResourceCached): Determines if the resource that is not > mentioned in the jnlp file is cached and returns a boolean with the > result. > * netx/net/sourceforge/jnlp/services/XDownloadService.java: > Core implementation of DownloadService. > > > (Resending to list) Thanks for the updated patch! Looks good to me, go ahead and push once reproducer is in HEAD. Cheers, - Adam From bugzilla-daemon at icedtea.classpath.org Tue Oct 9 13:52:28 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 09 Oct 2012 20:52:28 +0000 Subject: [Bug 1193] JVM crash In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1193 --- Comment #2 from cmokbel at msn.com --- Is openjdk-7 available for Squeeze armel distribution? -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121009/dbc4c098/attachment.html From omajid at redhat.com Tue Oct 9 15:16:55 2012 From: omajid at redhat.com (Omair Majid) Date: Tue, 09 Oct 2012 18:16:55 -0400 Subject: [icedtea-web][rfc] Update on Danesh's major rework of JarCertVerifier In-Reply-To: <1348842748.17801.29.camel@adomurad-desktop> References: <1348585163.17801.24.camel@adomurad-desktop> <1348842748.17801.29.camel@adomurad-desktop> Message-ID: <5074A257.5090009@redhat.com> On 09/28/2012 10:32 AM, Adam Domurad wrote: > This is a reproducer for cases where jar's have multiple signers. (This > only makes sense in the context of the other patches, because it relies > on checking for the new message that is printed when jars have > improperly mixed signage.) > Comments in-line below. > diff -r cbf8e415c5bf tests/reproducers/custom/MultipleSignaturesPerJar/README > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tests/reproducers/custom/MultipleSignaturesPerJar/README Thu Sep 27 16:10:12 2012 -0400 > @@ -0,0 +1,2 @@ > +This test relies on reproducers signed/ReadPropertiesSigned. > +Any changes to that reproducer may require updates here. > \ No newline at end of file Sounds like this message belongs in signed/ReadPropertiesSigned. Someone modifying that is not very likely to look here; this message will likely be ignored. > diff -r cbf8e415c5bf tests/reproducers/custom/MultipleSignaturesPerJar/srcs/Makefile > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tests/reproducers/custom/MultipleSignaturesPerJar/srcs/Makefile Thu Sep 27 16:10:12 2012 -0400 > +# Index jar causes main class jar to load Is this correct/relevant? > diff -r cbf8e415c5bf tests/reproducers/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java > --- a/tests/reproducers/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java Wed Sep 26 15:15:35 2012 -0400 > +++ b/tests/reproducers/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java Thu Sep 27 16:10:12 2012 -0400 > @@ -41,5 +41,6 @@ public class ReadPropertiesSigned { > */ > public static void main(String[] args) { > System.out.println(System.getProperty(args[0])); > + System.out.println("*** APPLET FINISHED ***"); > } > } Is this always an applet? Or do we not care even if it's printed for applications? Thanks, Omair From omajid at redhat.com Tue Oct 9 14:56:16 2012 From: omajid at redhat.com (Omair Majid) Date: Tue, 09 Oct 2012 17:56:16 -0400 Subject: [PATCH] Reproducer for PR1186 (was: Re: Moving applet from Oracle jre: first tries) In-Reply-To: <50746457.5000300@redhat.com> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> Message-ID: <50749D80.9040203@redhat.com> On 10/09/2012 01:52 PM, Omair Majid wrote: > Fix attached. A functional test is attached too. Thanks, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: pr1186-reproducer-01.patch Type: text/x-patch Size: 6546 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121009/1ff43a30/pr1186-reproducer-01.patch From amiko212 at 126.com Tue Oct 9 23:54:22 2012 From: amiko212 at 126.com (liu chao jun) Date: Wed, 10 Oct 2012 14:54:22 +0800 (CST) Subject: Here need your help Message-ID: <1c63f8d2.184b7a.13a4973e2d4.Coremail.amiko212@126.com> hi all , Here is amiko who is a new comer in this maillist ,And now i write to all of you for i need your help during developing LLVM-3.0 and LLVM-3.1 with icedtea-1-11-4 (shark) The questions i want to ask is : 1,Is there any patch updated for shark compile with llvm-3.0.llvm-3.1 compared to the low level editions such as LLVM-2.9 or others ,if has ,where i can find the patches? 2,Is there any method to skip zero compiler when configure shark ? if can skip ,how to do it ? thank you very much and looking forward to your reply! BR//Amiko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121010/79660720/attachment.html From helpcrypto at gmail.com Wed Oct 10 01:16:46 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Wed, 10 Oct 2012 10:16:46 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: <50746457.5000300@redhat.com> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> Message-ID: Hurrah! Is there any easy way to test if working? (or should I download the source, build and give a try?) On Tue, Oct 9, 2012 at 7:52 PM, Omair Majid wrote: > On 10/01/2012 08:14 AM, Omair Majid wrote: >> On 10/01/2012 04:01 AM, helpcrypto helpcrypto wrote: >>> so...any idea? Should i file a bug? >> >> Yes, please. >> >> I think we don't expose deployment properties as system properties in >> icedtea-web. We should fix this. > > Fix attached. > > Any concerns or suggestions? > > Thanks, > Omair From bugzilla-daemon at icedtea.classpath.org Wed Oct 10 02:00:58 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 10 Oct 2012 09:00:58 +0000 Subject: [Bug 1193] JVM crash In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1193 --- Comment #3 from Xerxes R?nby --- (In reply to comment #2) > Is openjdk-7 available for Squeeze armel distribution? Its political/community work to make it happen: You have to ask the Debian maintainers, from the looks of it Debian currently only package this now old 1.8 version for Squeeze. You can collaborate with the Debian backports team to get the latest IcedTea versions into the Debian squeeze-backports repository. http://backports.debian.org/ http://wiki.debian.org/Backports >From a technical viewpoint the latest IcedTea version is already working on Debian Squeeze: You can compile the latest IcedTea 6 or 7 sourcecode release and have it running. We do this daily internally inside the IcedTea team by letting out armv5 squeeze build-bots compile and testing IcedTea after each new source change-set. IcedTea only offer the tested source code and i recommend you to download the latest IcedTea release and compile it on your machine, it is known to work. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121010/05a5971e/attachment.html From bugzilla-daemon at icedtea.classpath.org Wed Oct 10 02:23:45 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 10 Oct 2012 09:23:45 +0000 Subject: [Bug 1013] Segmentation fault when loading Color Profile In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1013 Xerxes R?nby changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |WORKSFORME --- Comment #12 from Xerxes R?nby --- Both the original testcase and the refined testcase, that failed using the Ubuntu pre2.1.1 (unsupported non release version) now pass using IcedTea7 2.3.2. xranby at xranby-ESPRIMO-P7935:~/test/pr1013$ /usr/lib/jvm/java-7-openjdk-i386/bin/java -version java version "1.7.0_07" OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2-1ubuntu0.12.04.1) OpenJDK Server VM (build 23.2-b09, mixed mode) I recommend you to update to the latest openjdk-7 packages found in Ubuntu 12.04. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121010/8b7ef93e/attachment.html From ptisnovs at icedtea.classpath.org Wed Oct 10 03:42:30 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 10 Oct 2012 10:42:30 +0000 Subject: /hg/rhino-tests: Make the test src/org/RhinoTests/BindingsClassT... Message-ID: changeset 6d02300b36fa in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=6d02300b36fa author: Pavel Tisnovsky date: Wed Oct 10 12:45:08 2012 +0200 Make the test src/org/RhinoTests/BindingsClassTest.java compatible with JDK 7. diffstat: ChangeLog | 5 +++++ src/org/RhinoTests/BindingsClassTest.java | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 0 deletions(-) diffs (49 lines): diff -r 077761971a05 -r 6d02300b36fa ChangeLog --- a/ChangeLog Tue Oct 09 09:18:20 2012 +0200 +++ b/ChangeLog Wed Oct 10 12:45:08 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-10 Pavel Tisnovsky + + * src/org/RhinoTests/BindingsClassTest.java: + Make this test compatible with JDK 7. + 2012-10-09 Pavel Tisnovsky * src/org/RhinoTests/SimpleBindingsClassTest.java: diff -r 077761971a05 -r 6d02300b36fa src/org/RhinoTests/BindingsClassTest.java --- a/src/org/RhinoTests/BindingsClassTest.java Tue Oct 09 09:18:20 2012 +0200 +++ b/src/org/RhinoTests/BindingsClassTest.java Wed Oct 10 12:45:08 2012 +0200 @@ -358,6 +358,21 @@ protected void testGetMethods() { // following methods should be inherited final String[] methodsThatShouldExists_jdk6 = { + "public abstract boolean java.util.Map.containsValue(java.lang.Object)", + "public abstract boolean java.util.Map.equals(java.lang.Object)", + "public abstract boolean java.util.Map.isEmpty()", + "public abstract boolean javax.script.Bindings.containsKey(java.lang.Object)", + "public abstract int java.util.Map.hashCode()", + "public abstract int java.util.Map.size()", + "public abstract java.lang.Object java.util.Map.put(java.lang.Object,java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.get(java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.put(java.lang.String,java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.remove(java.lang.Object)", + "public abstract java.util.Collection java.util.Map.values()", + "public abstract java.util.Set java.util.Map.entrySet()", + "public abstract java.util.Set java.util.Map.keySet()", + "public abstract void java.util.Map.clear()", + "public abstract void javax.script.Bindings.putAll(java.util.Map)", }; final String[] methodsThatShouldExists_jdk7 = { @@ -399,6 +414,11 @@ protected void testGetDeclaredMethods() { // following methods should be declared final String[] declaredMethodsThatShouldExists_jdk6 = { + "public abstract boolean javax.script.Bindings.containsKey(java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.get(java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.put(java.lang.String,java.lang.Object)", + "public abstract java.lang.Object javax.script.Bindings.remove(java.lang.Object)", + "public abstract void javax.script.Bindings.putAll(java.util.Map)", }; final String[] declaredMethodsThatShouldExists_jdk7 = { From ptisnovs at icedtea.classpath.org Wed Oct 10 04:39:40 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 10 Oct 2012 11:39:40 +0000 Subject: /hg/gfx-test: Added 14 new tests to the test suite Message-ID: changeset 496ca6dc09af in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=496ca6dc09af author: Pavel Tisnovsky date: Wed Oct 10 12:54:14 2012 +0200 Added 14 new tests to the test suite src/org/gfxtest/testsuites/PrintTestTexturePaint.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/PrintTestTexturePaint.java | 316 +++++++++++++++++- 2 files changed, 320 insertions(+), 1 deletions(-) diffs (357 lines): diff -r 26cb5bb2ccf5 -r 496ca6dc09af ChangeLog --- a/ChangeLog Tue Oct 09 09:24:59 2012 +0200 +++ b/ChangeLog Wed Oct 10 12:54:14 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-10 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestTexturePaint.java: + Added 14 new tests to this test suite. + 2012-10-09 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestCubicCurves.java: diff -r 26cb5bb2ccf5 -r 496ca6dc09af src/org/gfxtest/testsuites/PrintTestTexturePaint.java --- a/src/org/gfxtest/testsuites/PrintTestTexturePaint.java Tue Oct 09 09:24:59 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestTexturePaint.java Wed Oct 10 12:54:14 2012 +0200 @@ -40,7 +40,15 @@ package org.gfxtest.testsuites; +import java.awt.Graphics2D; + + + +import org.gfxtest.framework.CommonRenderingStyles; +import org.gfxtest.framework.CommonShapesRenderer; import org.gfxtest.framework.PrintTest; +import org.gfxtest.framework.TestImage; +import org.gfxtest.framework.TestResult; import org.gfxtest.framework.annotations.RenderStyle; import org.gfxtest.framework.annotations.RenderStyles; import org.gfxtest.framework.annotations.TestType; @@ -56,7 +64,7 @@ * * @author Pavel Tisnovsky */ - at TestType(TestTypes.RENDER_TEST) + at TestType(TestTypes.PRINT_TEST) @RenderStyle(RenderStyles.FILL) @Transformation(Transformations.NONE) @Zoom(1) @@ -64,6 +72,311 @@ { /** + * Test if circle drawn by graphics.drawOval() is rendered correctly. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleEmptyFill(TestImage image, Graphics2D graphics) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics); + // draw the circle + CommonShapesRenderer.drawCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingCheckerTexture(TestImage image, Graphics2D graphics) + { + // set stroke color (it could not be used during the shape rendering) + CommonRenderingStyles.setStrokeColor(graphics); + // set texture + CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics) + { + // set stroke color (it could not be used during the shape rendering) + CommonRenderingStyles.setStrokeColor(graphics); + // set texture + CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingGridTexture(TestImage image, Graphics2D graphics) + { + // set stroke color (it could not be used during the shape rendering) + CommonRenderingStyles.setStrokeColor(graphics); + // set texture + CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingDiagonalGridTexture(TestImage image, Graphics2D graphics) + { + // set stroke color (it could not be used during the shape rendering) + CommonRenderingStyles.setStrokeColor(graphics); + // set texture + CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingHorizontalStripesTexture(TestImage image, Graphics2D graphics) + { + // set stroke color (it could not be used during the shape rendering) + CommonRenderingStyles.setStrokeColor(graphics); + // set texture + CommonRenderingStyles.setTextureFillUsingHorizontalStripesTexture(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingVerticalStripesTexture(TestImage image, Graphics2D graphics) + { + // set stroke color (it could not be used during the shape rendering) + CommonRenderingStyles.setStrokeColor(graphics); + // set texture + CommonRenderingStyles.setTextureFillUsingVerticalStripesTexture(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics) + { + // set stroke color (it could not be used during the shape rendering) + CommonRenderingStyles.setStrokeColor(graphics); + // set texture + CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics) + { + // set stroke color (it could not be used during the shape rendering) + CommonRenderingStyles.setStrokeColor(graphics); + // set texture + CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingDiagonalStripesTexture(TestImage image, Graphics2D graphics) + { + // set stroke color (it could not be used during the shape rendering) + CommonRenderingStyles.setStrokeColor(graphics); + // set texture + CommonRenderingStyles.setTextureFillUsingDiagonalStripesTexture(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingDotTexture(TestImage image, Graphics2D graphics) + { + // set stroke color (it could not be used during the shape rendering) + CommonRenderingStyles.setStrokeColor(graphics); + // set texture + CommonRenderingStyles.setTextureFillUsingColorDotsTexture(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingRGBTexture1(TestImage image, Graphics2D graphics) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture1(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingRGBTexture2(TestImage image, Graphics2D graphics) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture2(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** + * Test if filled circle drawn by graphics.fillOval() is rendered correctly. + * Texture paint is used for filling this circle. + * + * @param image + * image to which two dimensional shape is to be rendered + * @param graphics + * graphics context for image + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testCircleTexturePaintUsingRGBTexture3(TestImage image, Graphics2D graphics) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture3(image, graphics); + // draw the circle + CommonShapesRenderer.drawFilledCircle(image, graphics); + // test return value + return TestResult.PASSED; + } + + /** * Entry point to the test suite. * * @param args @@ -74,3 +387,4 @@ new PrintTestTexturePaint().runTestSuite(args); } } + From jfabriko at redhat.com Wed Oct 10 07:11:42 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Wed, 10 Oct 2012 16:11:42 +0200 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "function return types" tests Message-ID: <5075821E.4010805@redhat.com> 2012-10-10 Jana Fabrikova * /tests/reproducers/simple/JSToJFuncReturn: adding a new reproducer for the fourth LiveConnect test (Tests to process various return types from Java side function calls.) I would like to ask for review of the attached patch, thank you, Jana -------------- next part -------------- A non-text attachment was scrubbed... Name: adding_JSToJFuncReturn_reproducer.patch Type: text/x-patch Size: 31793 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121010/cdd5d7e6/adding_JSToJFuncReturn_reproducer.patch From omajid at redhat.com Wed Oct 10 09:26:47 2012 From: omajid at redhat.com (Omair Majid) Date: Wed, 10 Oct 2012 12:26:47 -0400 Subject: [icedtea-web][rfc] Update on Danesh's major rework of JarCertVerifier In-Reply-To: <1348585163.17801.24.camel@adomurad-desktop> References: <1348585163.17801.24.camel@adomurad-desktop> Message-ID: <5075A1C7.1050402@redhat.com> On 09/25/2012 10:59 AM, Adam Domurad wrote: > + * @param bad > + * 3 booleans to show if the KeyUsage, ExtendedKeyUsage, NetscapeCertType has codeSigning flag turned on. If null, the class field badKeyUsage, badExtendedKeyUsage, badNetscapeCertType will be set. Please consider line-wrapping this. > + public Map getJarSignableEntries() { > + return jarSignableEntries; > + } If untrusted code were able to invoke this method, would that compromise the security of the system? Should we be returning a mutable data structure here? > +public class VerifyJarEntryCertsTest { Could you rename this class to ${CLASS_IT_TESTS}Test? That would be JarCertVerifierTest. Otherwise it will be harder to find this the next time someone is updating JarCertVerifier. > + // This calls ReadPropertiesSigned with user.home, it is not easy to think of a pattern to match this > + // Instead we make sure _something_ was printed > + Assert.assertFalse("stdout should NOT be empty, but was", pr.stdout.isEmpty()); > + Assert.assertFalse("stderr should NOT contains `" + accExcString + "`, but did", pr.stderr.contains(accExcString)); > + } Maybe you can you some other system property that's more predictable (like, say "java.vm.specification.name") ? Rest looks okay to me. Cheers, Omair From aph at redhat.com Wed Oct 10 10:10:38 2012 From: aph at redhat.com (Andrew Haley) Date: Wed, 10 Oct 2012 10:10:38 -0700 Subject: Here need your help In-Reply-To: <1c63f8d2.184b7a.13a4973e2d4.Coremail.amiko212@126.com> References: <1c63f8d2.184b7a.13a4973e2d4.Coremail.amiko212@126.com> Message-ID: <5075AC0E.6010803@redhat.com> On 10/09/2012 11:54 PM, liu chao jun wrote: > hiall , > Here is amiko who is a new comer in this maillist ,And now i write to all of you for i need your help during developing LLVM-3.0 and LLVM-3.1 with icedtea-1-11-4 (shark) > > The questions i want to ask is : > 1,Is there any patch updated for shark compile with llvm-3.0.llvm-3.1 compared to the low level editions such as LLVM-2.9 or others ,if has ,where i can find the patches? > 2,Is there any method to skip zero compiler when configure shark ? if can skip ,how to do it ? Hi, We are very behind with Shark. It doesn't work at the moment. I intend to get it all working in time for JDK 8, but that's some time away. Sorry, Andrew. From jfabriko at redhat.com Wed Oct 10 10:40:43 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Wed, 10 Oct 2012 19:40:43 +0200 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "get" tests In-Reply-To: <50759B33.2040801@redhat.com> References: <937119746.4428687.1349093533008.JavaMail.root@redhat.com> <506C4903.5070505@redhat.com> <50759B33.2040801@redhat.com> Message-ID: <5075B31B.5060305@redhat.com> Hello Adam, thank you for your comment. Please see the attached patch that implements the more readable format (unfortunately I used the same way in all my other reproducers, which fortunately have yet not been pushed into the repository). Jana On 10/10/2012 05:58 PM, Adam Domurad wrote: > On 10/03/2012 10:17 AM, Jana Fabrikova wrote: >> Thank you for the review, Pavel. I edited the source files according >> to your comments and commited the reproducer to the icedtea-web >> repository, >> >> Jana >> >> On 10/01/2012 02:12 PM, Pavel Tisnovsky wrote: >>> Hi Jana, >>> >>> this new reproducer seems almost ok. I have just two minor objections: >>> >>> 1) JSToJGetTest.java - (c) year should be 2012 >>> 2) JSToJGetTest.java - could you please replace by space(s)? >>> >>> With these changes I'm ok with push to IT-web HEAD. >>> >>> Thank you! >>> Pavel >>> >>> ----- Jana Fabrikova wrote: >>>> 2012-10-01 Jana Fabrikova >>>> >>>> * /tests/reproducers/simple/JSToJGet: >>>> adding a new reproducer for the first LiveConnect >>>> test (Tests for getting members from Java side.) >>>> >>>> >>>> I would like to ask for review of the attached patch, >>>> thank you, >>>> Jana >>> >> > > Hello Jana, > > I don't mean to dig up an accepted patch :), however I was noticing > while looking at your second batch of 'set' tests that your tests could > be clearer if instead of: > > genericJSToJavaGetTestMethod(0); > > ... you used something like: > > jsToJavaGetTest("int", "Test no. 1 - (int)"); > > This would make the tests a lot more understandable at a glance. The > array of test scenarios could then be gotten rid of. Please post your > updated patch as a reply, thanks. > > (The name 'genericJSToJavaGetTestMethod' can be left as-is, however I > think the 'generic' and 'method' components are not required to > sufficiently describe the method). > > Cheers, > - Adam -------------- next part -------------- A non-text attachment was scrubbed... Name: reparing_JSToJGet_reproducer.patch Type: text/x-patch Size: 9289 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121010/434ee950/reparing_JSToJGet_reproducer.patch From adomurad at redhat.com Wed Oct 10 10:56:00 2012 From: adomurad at redhat.com (Adam Domurad) Date: Wed, 10 Oct 2012 13:56:00 -0400 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "get" tests In-Reply-To: <5075B31B.5060305@redhat.com> References: <937119746.4428687.1349093533008.JavaMail.root@redhat.com> <506C4903.5070505@redhat.com> <50759B33.2040801@redhat.com> <5075B31B.5060305@redhat.com> Message-ID: <5075B6B0.1080804@redhat.com> ** Sorry, re-sending to list. I seem to be hitting the off-list reply button a lot since switching mail clients. ** On 10/10/2012 01:40 PM, Jana Fabrikova wrote: > Hello Adam, > > thank you for your comment. Please see the attached patch that > implements the more readable format (unfortunately I used the same way > in all my other reproducers, which fortunately have yet not been > pushed into the repository). > > Jana > > On 10/10/2012 05:58 PM, Adam Domurad wrote: >> On 10/03/2012 10:17 AM, Jana Fabrikova wrote: >>> Thank you for the review, Pavel. I edited the source files according >>> to your comments and commited the reproducer to the icedtea-web >>> repository, >>> >>> Jana >>> >>> On 10/01/2012 02:12 PM, Pavel Tisnovsky wrote: >>>> Hi Jana, >>>> >>>> this new reproducer seems almost ok. I have just two minor objections: >>>> >>>> 1) JSToJGetTest.java - (c) year should be 2012 >>>> 2) JSToJGetTest.java - could you please replace by space(s)? >>>> >>>> With these changes I'm ok with push to IT-web HEAD. >>>> >>>> Thank you! >>>> Pavel >>>> >>>> ----- Jana Fabrikova wrote: >>>>> 2012-10-01 Jana Fabrikova >>>>> >>>>> * /tests/reproducers/simple/JSToJGet: >>>>> adding a new reproducer for the first LiveConnect >>>>> test (Tests for getting members from Java side.) >>>>> >>>>> >>>>> I would like to ask for review of the attached patch, >>>>> thank you, >>>>> Jana >>>> >>> >> >> Hello Jana, >> >> I don't mean to dig up an accepted patch :), however I was noticing >> while looking at your second batch of 'set' tests that your tests could >> be clearer if instead of: >> >> genericJSToJavaGetTestMethod(0); >> >> ... you used something like: >> >> jsToJavaGetTest("int", "Test no. 1 - (int)"); >> >> This would make the tests a lot more understandable at a glance. The >> array of test scenarios could then be gotten rid of. Please post your >> updated patch as a reply, thanks. >> >> (The name 'genericJSToJavaGetTestMethod' can be left as-is, however I >> think the 'generic' and 'method' components are not required to >> sufficiently describe the method). >> >> Cheers, >> - Adam > Thanks for the quick reply! Assuming it passes as before, it looks good. Just be sure to include a ChangeLog with your pushes (it doesn't need much details). Cheers, - Adam From omajid at redhat.com Wed Oct 10 11:14:03 2012 From: omajid at redhat.com (Omair Majid) Date: Wed, 10 Oct 2012 14:14:03 -0400 Subject: [fyi][icedtea-web]Refactoring of reproducers as agreed in April In-Reply-To: <4FF30809.7070606@redhat.com> References: <4FEB549E.40402@redhat.com> <4FEB5F21.9020902@redhat.com> <4FEC4648.8050307@redhat.com> <4FEC7631.2040405@redhat.com> <4FEC7BE9.8020609@redhat.com> <4FEC83BB.3050807@redhat.com> <4FEDA48E.9040104@redhat.com> <4FEDD0BA.6040207@redhat.com> <4FF1A346.2080000@redhat.com> <4FF30809.7070606@redhat.com> Message-ID: <5075BAEB.3060203@redhat.com> On 07/03/2012 10:56 AM, Jiri Vanek wrote: > Hi. Updated renaming patch. Please chheck that I did not screw any > renaming :-/ > They look okay to me; I don't see typos. I assume you used a program to perform automatic renaming, right? > diff -r cbb73b27594b netx-dist-tests-whitelist > --- a/netx-dist-tests-whitelist Tue Jul 03 16:42:52 2012 +0200 > +++ b/netx-dist-tests-whitelist Tue Jul 03 16:53:39 2012 +0200 > @@ -1,1 +1,1 @@ > -.* > +.*esource.*est* I don't follow what this is doing. Could you explain or add a comment in the file? Thanks, Omair From omajid at redhat.com Wed Oct 10 11:28:05 2012 From: omajid at redhat.com (Omair Majid) Date: Wed, 10 Oct 2012 14:28:05 -0400 Subject: Moving applet from Oracle jre: first tries In-Reply-To: References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> Message-ID: <5075BE35.5050502@redhat.com> On 10/10/2012 04:16 AM, helpcrypto helpcrypto wrote: > Is there any easy way to test if working? (or should I download the > source, build and give a try?) It's not committed to the source repository just yet - I am waiting for code review. Your best bet would be to clone the icedtea-web repository, apply the patch and then build/run it. The instructions for getting the source, building and running it are listed on [1]. Go for http://icedtea.classpath.org/hg/icedtea-web (the current development branch). Cheers, Omair [1] http://icedtea.classpath.org/wiki/IcedTea-Web#Getting_IcedTea-Web From adomurad at redhat.com Wed Oct 10 12:49:42 2012 From: adomurad at redhat.com (Adam Domurad) Date: Wed, 10 Oct 2012 15:49:42 -0400 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "set" tests In-Reply-To: <506C75F2.7010505@redhat.com> References: <506C75F2.7010505@redhat.com> Message-ID: <5075D156.90604@redhat.com> On 10/03/2012 01:29 PM, Jana Fabrikova wrote: > 2012-10-03 Jana Fabrikova > > * /tests/reproducers/simple/JSToJSet: > adding a new reproducer for the second LiveConnect > test (Tests for setting members on Java side.) > > > I would like to ask for review of the attached patch, > thank you, > Jana Hi Jana, thanks for the test! I have some comments in-line with the test. > diff --git a/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html b/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html > @@ -0,0 +1,104 @@ > + > + > + > + JavaScript to Java LiveConnect - Set values from applet > + > + > + > + > + > + > + > + > +

The JSToJSet html page

> + > + > + > + > + > +
> + > + > + > + > diff --git a/tests/reproducers/simple/JSToJSet/resources/JSToJ_auxiliary.js b/tests/reproducers/simple/JSToJSet/resources/JSToJ_auxiliary.js > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/JSToJSet/resources/JSToJ_auxiliary.js > @@ -0,0 +1,69 @@ > +/* > +JSToJ_auxiliary.js > +This file contains auxiliary JavaScript functions for LiveConnect tests output, > +the following reproducers have this file as a common resource: > +- JSToJGet > +- JSToJSet > +- JSToJFuncParam > +- JSToJFuncReturn > +- JSToJFuncResol > +- JSToJTypeConv > +- JToJSGet > +- JToJSSet > +- JToJSFuncParam > +- JToJSFuncReturn > +- JToJSEval > +*/ > + [ ... file contents snipped ... ] I don't think this is the correct way to do this, although it can be good for tests to share common components. There will only be one copy in the deployment directory, because only one file can exist with a given file name. As well, if this file ever has to change, it will be difficult to tell why it isn't updating correctly (the reason would be that a test with the same-name file is overwriting it.) I think the correct way to do this is to have a reproducer folder that is named something like JSTestResources, and contains only this in the resources/ folder. Since all tests share the same deployment directory, it will be available to all tests. As well, it will only have to be altered in one place if it is ever altered. > + > diff --git a/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp b/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp > @@ -0,0 +1,21 @@ > + > + > + > + JavaScript to Java LiveConnect - Set > + RedHat > + > + LiveConnect - tests for setting members on Java side. > + > + > + > + + href="http://java.sun.com/products/autodl/j2se"/> > + > + > + + name="JS to J Set" > + main-class="JSToJSet" > + width="1000" > + height="100"> > + > + > diff --git a/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java b/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java > @@ -0,0 +1,246 @@ > +import java.applet.*; > +import java.awt.*; > + > +public class JSToJSet extends Applet { > + > + public String[] outputStrings = { "Test no. 1 - (int)", > + "Test no. 2 - (double)", "Test no. 3 - (float)", > + "Test no. 4 - (long)", "Test no. 5 - (boolean)", > + "Test no. 6 - (char)", "Test no. 7 - (byte)", > + "Test no. 8 - (int[] - element access)", > + "Test no. 9 - (int[] - beyond length)", > + "Test no.10 - (regular string)", > + "Test no.11 - (string with special characters)", > + "Test no.12 - (null)", "Test no.13 - (Integer)", > + "Test no.14 - (Double)", "Test no.15 - (Float)", > + "Test no.16 - (Long)", "Test no.17 - (Boolean)", > + "Test no.18 - (Character)", "Test no.19 - (Byte)", > + "Test no.20 - (Double[] - element access)", > + "Test no.21 - (Double[] - full array)" }; > + > + public int i, iWanted; > + public double d, dWanted; > + public float f, fWanted; > + public long l, lWanted; > + public boolean b, bWanted; > + public char c, cWanted; > + public byte by, byWanted; > + public String rs, rsWanted; > + public String ss, ssWanted; > + public Object n, nWanted; > + public int[] ia = new int[5]; > + public int[] iaWanted = new int[5]; > + > + public Integer I, IWanted; > + public Double D, DWanted; > + public Float F, FWanted; > + public Long L, LWanted; > + public Boolean B, BWanted; > + public Character C, CWanted; > + public Byte By, ByWanted; > + public Double[] Da1 = new Double[10]; > + public Double[] Da1Wanted = new Double[10]; > + public Double[] Da2 = null; > + public Double[] Da2Wanted = null; > + > + public char[] ca = new char[3]; > + public char[] caWanted = new char[3]; > + public Character[] Ca = new Character[3]; > + public Character[] CaWanted = new Character[3]; That's a mouthful :) I have some recommentations for a way to refactor this test to be (in my opinion) a lot more easy to understand. I don't mean to make more work for you to do - but this test is quite hard to follow and would be hard to maintain. This idea uses eval + reflection - if you have questions, feel free to ask me :) (Either by email or IRC). Note that this does not require the 'auxiliary' JS file at all. If you'd bear with me ... (also attached as separate file) 1) Refactor JSToJSet.java as something simple, like: class ... { // members ... public int _int; public double _double; public float _float; public long _long; public boolean _boolean; public char _char; public byte _byte; public Integer _Integer; public Double _Double; public Float _Float; public Long _Long; public Boolean _Boolean; public Character _Character; public Byte _Byte; public String _String; public Object _Object; // Test 'size 1' arrays for simplicity, it is sufficient public int[] _intArray = new int[1]; public char[] _charArray = new char[1]; public Double[] _DoubleArray = new Double[1]; public Character[] _CharacterArray = new Character[1]; // checking method: // auxiliary methods for writing to stdout and stderr: public void printNewValueAndFinish(String fieldname) { Field field = getClass().getDeclaredField(fieldname); Object value = field.get(this); if (value != null && value.getClass().isArray()) { System.out.print("New array value is: " + Array.get(value, 0)); } else { System.out.print("New value is: " + value); } System.out.print("*** APPLET FINISHED ***"); // Or whatever ending message you want to check for } } 2) Don't embed javascript in the html file, its hard to find there Instead, have something like this in JSToJava_Set.js: var urlArgs = document.URL.split("?"); var testParams = urlArgs[1].split(";"); // You can choose a different character to separate the parmeters other than ';' var field = testParams[0], value = testParams[1]; var applet = document.getElementById('jstojSetApplet') // Check for special value fields if we need to do anything that cannot be achieved by parsing the value as a javascript value if (value == << some special value here! >>){ value = << do something like allocate a new array here >>; } eval('applet.' + field + ' = value'); applet.printNewValueAndFinish(field) The label is nice but it complicates the test without adding to the purpose. I would be in favour of just getting rid of it. 3) In the test runner, use something like: @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJSet_int_Test() throws Exception { jsToJavaSetNormalTest("_int", "1"); // Passes '_int;0' by URL, checks for 'New value is: ...' } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJSet_Double_Test() throws Exception { jsToJavaSetNormalTest("_Double", "1.0"); // Passes '_Double;0' by URL, checks for 'New value is: ...' } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJSet_Double_Test() throws Exception { jsToJavaSetSpecialTest("_DoubleArray", <>, "New array value is: << something here >>"); // Passes '_Double;<>' by URL, checks for 'New array value is: ...' } Let me know if you have trouble following / implementing this! I hope it will result in a simplified test (especially use simple values - there is no need to test long strings of digits, or a string other than something obvious like "test", as well as one international string as you did). And as Jiri says, don't shoot me:) Cheers, - Adam -------------- next part -------------- A non-text attachment was scrubbed... Name: recommentaton.java Type: text/x-java Size: 3108 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121010/e9b06ded/recommentaton.java From dbhole at redhat.com Wed Oct 10 14:18:23 2012 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 10 Oct 2012 17:18:23 -0400 Subject: Backport fix for PR1161 to icedtea-web 1.3 Message-ID: <20121010211822.GR30465@redhat.com> Hi, I would like to backport the fix for PR1161 to icedtea-web 1.3 in order to do a new release. The issue affects icedtea-web running on Java 7: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-September/020228.html http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1161 I am attaching the final approved version that went into head. It applies to 1.3 with some fuzz. OK for 1.3? ChangeLog: PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 * Makefile.am: If building with JDK 6, don't build VariableX509TrustManagerJDK7. * NEWS: Updated. * acinclude.m4: In addition to setting VERSION_DEFS, also set HAVE_JAVA7 if building with JDK7. * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): Use new getSSLSocketTrustManager() method to get the trust manager. (getSSLSocketTrustManager): New method. Depending on runtime JRE version, returns the appropriate trust manager. * netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Removed unused tm variable. * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java: No longer extends com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager. (checkClientTrusted): Renamed to checkTrustClient and removed overloaded implementations. (checkServerTrusted): Renamed to checkTrustServer. Also, modified to accept socket and engine (may be null). Assume that CN is mismatched by default, rather than matched. If explicitly trusted, bypass other checks, including CN mismatch. (checkAllManagers): Modified to accept socket and engine. Modified to work for both JDK6 and JDK7. (getAcceptedIssuers): Make protected (called by others in package). * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java: New class -- X509TrustManager for JDK6. * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java: New class -- X509TrustManager for JDK7. Thanks, Deepak -------------- next part -------------- diff -r 439f0b1cee5c Makefile.am --- a/Makefile.am Fri Sep 07 17:06:08 2012 -0400 +++ b/Makefile.am Mon Sep 17 15:12:13 2012 -0400 @@ -348,6 +348,9 @@ if !WITH_RHINO sed -i '/RhinoBasedPacEvaluator/ d' $@ endif +if !HAVE_JAVA7 + sed -i '/VariableX509TrustManagerJDK7/ d' $@ +endif stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp mkdir -p $(NETX_DIR) diff -r 439f0b1cee5c NEWS --- a/NEWS Fri Sep 07 17:06:08 2012 -0400 +++ b/NEWS Mon Sep 17 15:12:13 2012 -0400 @@ -17,6 +17,7 @@ * Common - PR1049: Extension jnlp's signed jar with the content of only META-INF/* is considered - PR955: regression: SweetHome3D fails to run + - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 New in release 1.3 (2012-XX-XX): * NetX diff -r 439f0b1cee5c acinclude.m4 --- a/acinclude.m4 Fri Sep 07 17:06:08 2012 -0400 +++ b/acinclude.m4 Mon Sep 17 15:12:13 2012 -0400 @@ -715,9 +715,12 @@ AC_MSG_RESULT(${JAVA}) AC_SUBST(JAVA) JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` - case "${JAVA_VERSION}" in - 1.7*) VERSION_DEFS='-DHAVE_JAVA7';; - esac + HAVE_JAVA7=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.7) print "yes"}'` + if ! test -z "$HAVE_JAVA7" ; then + VERSION_DEFS='-DHAVE_JAVA7' + fi + + AM_CONDITIONAL([HAVE_JAVA7], test x"${HAVE_JAVA7}" = "xyes" ) AC_SUBST(VERSION_DEFS) ]) diff -r 439f0b1cee5c netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Fri Sep 07 17:06:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon Sep 17 15:12:13 2012 -0400 @@ -16,38 +16,59 @@ package net.sourceforge.jnlp.runtime; -import java.io.*; +import java.awt.EventQueue; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; import java.net.Authenticator; import java.net.ProxySelector; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; -import java.awt.*; -import java.text.*; -import java.util.*; +import java.security.AllPermission; +import java.security.KeyStore; +import java.security.Policy; +import java.security.Security; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.text.MessageFormat; import java.util.List; -import java.security.*; -import javax.jnlp.*; +import java.util.ResourceBundle; + +import javax.jnlp.ServiceManager; import javax.naming.ConfigurationException; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.swing.UIManager; import javax.swing.text.html.parser.ParserDelegator; -import sun.net.www.protocol.jar.URLJarFile; - -import net.sourceforge.jnlp.*; +import net.sourceforge.jnlp.DefaultLaunchHandler; +import net.sourceforge.jnlp.GuiLaunchHandler; +import net.sourceforge.jnlp.LaunchHandler; +import net.sourceforge.jnlp.Launcher; import net.sourceforge.jnlp.browser.BrowserAwareProxySelector; -import net.sourceforge.jnlp.cache.*; +import net.sourceforge.jnlp.cache.CacheUtil; +import net.sourceforge.jnlp.cache.DefaultDownloadIndicator; +import net.sourceforge.jnlp.cache.DownloadIndicator; +import net.sourceforge.jnlp.cache.UpdatePolicy; import net.sourceforge.jnlp.config.DeploymentConfiguration; import net.sourceforge.jnlp.security.JNLPAuthenticator; import net.sourceforge.jnlp.security.KeyStores; import net.sourceforge.jnlp.security.SecurityDialogMessageHandler; import net.sourceforge.jnlp.security.VariableX509TrustManager; -import net.sourceforge.jnlp.services.*; -import net.sourceforge.jnlp.util.*; +import net.sourceforge.jnlp.services.XServiceManagerStub; +import net.sourceforge.jnlp.util.FileUtils; +import net.sourceforge.jnlp.util.TeeOutputStream; +import sun.net.www.protocol.jar.URLJarFile; /** * Configure and access the runtime environment. This class @@ -223,7 +244,7 @@ KeyStore ks = KeyStores.getKeyStore(KeyStores.Level.USER, KeyStores.Type.CLIENT_CERTS); KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(ks, KeyStores.getPassword()); - TrustManager[] trust = new TrustManager[] { VariableX509TrustManager.getInstance() }; + TrustManager[] trust = new TrustManager[] { getSSLSocketTrustManager() }; context.init(kmf.getKeyManagers(), trust, null); sslSocketFactory = context.getSocketFactory(); @@ -248,6 +269,52 @@ } /** + * Returns a TrustManager ideal for the running VM. + * + * @return TrustManager the trust manager to use for verifying https certificates + */ + private static TrustManager getSSLSocketTrustManager() throws + ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { + + try { + + Class trustManagerClass; + Constructor tmCtor = null; + + if (System.getProperty("java.version").startsWith("1.6")) { // Java 6 + try { + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); + } catch (ClassNotFoundException cnfe) { + System.err.println("Unable to find class net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); + return null; + } + } else { // Java 7 or more (technically could be <= 1.5 but <= 1.5 is unsupported) + try { + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); + } catch (ClassNotFoundException cnfe) { + System.err.println("Unable to find class net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); + return null; + } + } + + Constructor[] tmCtors = trustManagerClass.getDeclaredConstructors(); + tmCtor = tmCtors[0]; + + for (Constructor ctor : tmCtors) { + if (tmCtor.getGenericParameterTypes().length == 0) { + tmCtor = ctor; + break; + } + } + + return (TrustManager) tmCtor.newInstance(); + } catch (RuntimeException e) { + System.err.println("Unable to load JDK-specific TrustManager. Was this version of IcedTea-Web compiled with JDK6?"); + throw e; + } + } + + /** * This must NOT be called form the application ThreadGroup. An application * can inject events into its {@link EventQueue} and bypass the security * dialogs. diff -r 439f0b1cee5c netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java --- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Fri Sep 07 17:06:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Mon Sep 17 15:12:13 2012 -0400 @@ -59,7 +59,6 @@ public class HttpsCertVerifier implements CertVerifier { - private VariableX509TrustManager tm; private X509Certificate[] chain; private String authType; private String hostName; @@ -67,11 +66,9 @@ private boolean hostMatched; private ArrayList details = new ArrayList(); - public HttpsCertVerifier(VariableX509TrustManager tm, - X509Certificate[] chain, String authType, + public HttpsCertVerifier(X509Certificate[] chain, String authType, boolean isTrusted, boolean hostMatched, String hostName) { - this.tm = tm; this.chain = chain; this.authType = authType; this.hostName = hostName; diff -r 439f0b1cee5c netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java --- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 17:06:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Mon Sep 17 15:12:13 2012 -0400 @@ -37,6 +37,9 @@ package net.sourceforge.jnlp.security; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.Socket; import java.security.AccessController; import java.security.KeyStore; import java.security.PrivilegedAction; @@ -47,25 +50,24 @@ import java.util.Arrays; import java.util.List; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; +import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import sun.security.util.HostnameChecker; import sun.security.validator.ValidatorException; -import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; -import net.sourceforge.jnlp.runtime.JNLPRuntime; - -import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; - /** * This class implements an X509 Trust Manager. The certificates it trusts are * "variable", in the sense that it can dynamically, and temporarily support * different certificates that are not in the keystore. */ -final public class VariableX509TrustManager extends X509ExtendedTrustManager { +final public class VariableX509TrustManager { /** TrustManagers containing trusted CAs */ private X509TrustManager[] caTrustManagers = null; @@ -164,8 +166,8 @@ /** * Check if client is trusted (no support for custom here, only system/user) */ - public void checkClientTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) + public void checkTrustClient(X509Certificate[] chain, String authType, + String hostName) throws CertificateException { boolean trusted = false; @@ -186,99 +188,125 @@ throw savedException; } - public void checkClientTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkClientTrusted(chain, authType, null, null); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) - throws CertificateException { - checkServerTrusted(chain, authType, hostName, false); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkServerTrusted(chain, authType, null, null); - } - /** - * Check if the server is trusted + * Check if the server is trusted. + * + * First, existing stores are checked to see if the certificate is trusted. + * Next, if the certificate is not explicitly trusted by the user, a host + * name check is performed. The user is them prompted as needed. * * @param chain The cert chain * @param authType The auth type algorithm - * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission + * @param hostName The expected hostName that the server should have + * @param socket The SSLSocket in use (may be null) + * @param ending The SSLEngine in use (may be null) */ - public synchronized void checkServerTrusted(X509Certificate[] chain, + public synchronized void checkTrustServer(X509Certificate[] chain, String authType, String hostName, - boolean checkOnly) throws CertificateException { + SSLSocket socket, SSLEngine engine) throws CertificateException { CertificateException ce = null; boolean trusted = true; - boolean CNMatched = true; + boolean CNMatched = false; + // Check trust stores try { - checkAllManagers(chain, authType); + checkAllManagers(chain, authType, socket, engine); } catch (CertificateException e) { trusted = false; ce = e; } // If the certificate is not explicitly trusted, we - // need to prompt the user + // check host match if (!isExplicitlyTrusted(chain, authType)) { - - if (hostName == null) { - CNMatched = false; - } else { + if (hostName != null) { try { HostnameChecker checker = HostnameChecker .getInstance(HostnameChecker.TYPE_TLS); - checker.match(hostName, chain[0]); // only need to match @ 0 for - // CN + checker.match(hostName, chain[0]); // only need to match @ 0 for CN + CNMatched = true; } catch (CertificateException e) { - CNMatched = false; ce = e; } } + } else { + // If it is explicitly trusted, just return right away. + return; } + // If it is (not explicitly trusted) AND + // ((it is not in store) OR (there is a host mismatch)) if (!trusted || !CNMatched) { - if (checkOnly) { - throw ce; - } else { - if (!isTemporarilyUntrusted(chain[0])) { - boolean b = askUser(chain, authType, trusted, CNMatched, hostName); + if (!isTemporarilyUntrusted(chain[0])) { + boolean b = askUser(chain, authType, trusted, CNMatched, hostName); - if (b) { - temporarilyTrust(chain[0]); - } else { - temporarilyUntrust(chain[0]); - } + if (b) { + temporarilyTrust(chain[0]); + return; + } else { + temporarilyUntrust(chain[0]); } + } - checkAllManagers(chain, authType); - } + throw ce; } } /** - * Check system, user and custom trust manager + * Check system, user and custom trust manager. + * + * This method is intended to work with both, JRE6 and JRE7. If socket + * and engine are null, it assumes that the call is for JRE6 (i.e. not + * javax.net.ssl.X509ExtendedTrustManager which is Java 7 specific). If + * either of those are not null, it will assume that the caTrustManagers + * are javax.net.ssl.X509ExtendedTrustManager instances and will + * invoke their check methods. + * + * @param chain The certificate chain + * @param authType The authentication type + * @param socket the SSLSocket being used for the connection + * @param engine the SSLEngine being used for the connection */ - private void checkAllManagers(X509Certificate[] chain, String authType) throws CertificateException { + private void checkAllManagers(X509Certificate[] chain, String authType, Socket socket, SSLEngine engine) throws CertificateException { + // first try CA TrustManagers boolean trusted = false; ValidatorException savedException = null; for (int i = 0; i < caTrustManagers.length; i++) { try { - caTrustManagers[i].checkServerTrusted(chain, authType); + if (socket == null && engine == null) { + caTrustManagers[i].checkServerTrusted(chain, authType); + } else { + + try { + Class x509ETMClass = Class.forName("javax.net.ssl.X509ExtendedTrustManager"); + if (engine == null) { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, Socket.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, socket); + } else { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, SSLEngine.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, engine); + } + } catch (NoSuchMethodException nsme) { + throw new ValidatorException(nsme.getMessage()); + } catch (InvocationTargetException ite) { + throw new ValidatorException(ite.getMessage()); + } catch (IllegalAccessException iae) { + throw new ValidatorException(iae.getMessage()); + } catch (ClassNotFoundException cnfe) { + throw new ValidatorException(cnfe.getMessage()); + } + } + trusted = true; break; } catch (ValidatorException caex) { savedException = caex; } } + if (trusted) { return; } @@ -332,7 +360,7 @@ return explicitlyTrusted; } - public X509Certificate[] getAcceptedIssuers() { + protected X509Certificate[] getAcceptedIssuers() { List issuers = new ArrayList(); for (int i = 0; i < caTrustManagers.length; i++) { @@ -394,7 +422,7 @@ public Boolean run() { return SecurityDialogs.showCertWarningDialog( AccessType.UNVERIFIED, null, - new HttpsCertVerifier(trustManager, chain, authType, + new HttpsCertVerifier(chain, authType, isTrusted, hostMatched, hostName)); } diff -r 439f0b1cee5c netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java Mon Sep 17 15:12:13 2012 -0400 @@ -0,0 +1,75 @@ +/* VariableX509TrustManagerJDK6.java + Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package net.sourceforge.jnlp.security; + +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; + +public class VariableX509TrustManagerJDK6 extends X509ExtendedTrustManager { + + private VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + checkClientTrusted(chain, authType, null, null); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustServer(chain, authType, null /* hostname*/, null /* socket */, null /* engine */); + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return vX509TM.getAcceptedIssuers(); + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException { + vX509TM.checkTrustClient(chain, authType, hostname); // We don't need algorithm, we will always use this for TLS only + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException { + // We don't need to pass algorithm, we will always use this for TLS only + vX509TM.checkTrustServer(chain, authType, hostname, null /* socket */, null /* engine */); + } + +} diff -r 439f0b1cee5c netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java Mon Sep 17 15:12:13 2012 -0400 @@ -0,0 +1,136 @@ +/* VariableX509TrustManagerJDK7.java + Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package net.sourceforge.jnlp.security; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.Socket; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSession; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.X509ExtendedTrustManager; + +public class VariableX509TrustManagerJDK7 extends X509ExtendedTrustManager { + + private VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustClient(chain, authType, null /* hostname*/); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustServer(chain, authType, null /* hostname*/, null /* socket */, null /* engine */); + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return vX509TM.getAcceptedIssuers(); + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { + checkTrustClient(chain, authType, socket, null); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { + checkTrustServer(chain, authType, socket, null); + + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { + checkTrustClient(chain, authType, null, engine); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { + checkTrustServer(chain, authType, null, engine); + } + + /** + * Check if the server is trusted + * + * @param chain The cert chain + * @param authType The auth type algorithm + * @param socket the SSLSocket, may be null + * @param engine the SSLEngine, may be null + */ + private void checkTrustServer(X509Certificate[] chain, + String authType, Socket socket, + SSLEngine engine) throws CertificateException { + + String hostName = null; + + if (socket != null) { + hostName = ((SSLSocket) socket).getHandshakeSession().getPeerHost(); + } else if (engine != null) { + hostName = engine.getHandshakeSession().getPeerHost(); + } + + vX509TM.checkTrustServer(chain, authType, hostName, (SSLSocket) socket, engine); + } + + /** + * Check if the client is trusted + * + * @param chain The cert chain + * @param authType The auth type algorithm + * @param socket the SSLSocket, if provided + * @param engine the SSLEngine, if provided + */ + private void checkTrustClient(X509Certificate[] chain, + String authType, Socket socket, + SSLEngine engine) throws CertificateException { + + String hostName = null; + + if (socket != null) { + hostName = ((SSLSocket) socket).getHandshakeSession().getPeerHost(); + } else if (engine != null) { + hostName = engine.getHandshakeSession().getPeerHost(); + } + + vX509TM.checkTrustClient(chain, authType, hostName); + } +} From jvanalte at redhat.com Wed Oct 10 18:35:47 2012 From: jvanalte at redhat.com (Jon VanAlten) Date: Wed, 10 Oct 2012 21:35:47 -0400 (EDT) Subject: Thermostat 0.4 Released In-Reply-To: <1520338221.8957802.1349914180696.JavaMail.root@redhat.com> Message-ID: <1920489448.9027022.1349919347644.JavaMail.root@redhat.com> Hi all, The Thermostat development team would like for you to now enjoy: Thermostat 0.4: The Martian Chronicles[*] You can download this pre-release at: http://icedtea.classpath.org/download/thermostat/thermostat-0.4.0.tar.gz We have numerous new galaxy-class features to share: * A shiny new major.minor.micro-qualifier version format. * Authentication support * When user has keyring enabled for their desktop, authentication parameters can be saved. * Heap tools * Searching heap contents for objects. * Finding all GC roots, or GC root for a specific object. * The above is supported both on CLI and GUI clients. * Thread tools * Optionally active thread data collection, activated remotely via GUI. * Display of various thread data. * Webservice * Storage provided as web interface. Experimental, not enabled by default. * Eclipse plugin * The beginnings of Eclipse integration. * Dolphin L&F * Support for some new components, including tables and toggle buttons. Some improvements might be of the most interest to developers: * Ongoing refinements to the use of OSGi. * Various components provided as services, rather than requiring the use of singletons/factories/otherfoobar. * Command-channel * Support for sending commands to the agent. * Remote actions can be added as part of a plugin by implementing an interface and registering as OSGi service. * Used already for triggering heap dumps and activating thread support. * Compatible with older (1.8 or earlier) mongodb versions. Other improvements worth highlighting: * Heap histogram is much nicer. * Storage layer * Most Pojo/DAO are now using annotations and ChunkAdapter to avoid creating as many short-term, garbage-collected objects. * At this point, I could start listing off GUI improvements, but this would delay the release by another 3 days. Because there are *that* *many* GUI improvements. If you would like to know the full details do feel free to read the commit history. Otherwise, start up the improved Thermostat gui and bask in its beautiful glory. Sizing, colors, consistency across views, tweaks to theming, all contribute to a great-looking result for this pre-release. The following people contributed during this release cycle: Severin Gehwolf Roman Kennke Omair Majid Mario Torre Jon VanAlten We would also like to thank the following people, who assisted with testing and providing feedback during this release cycle: Elliott Baron Deepak Bhole Danesh Dadachanji Adam Domurad Saad Mohammad Pavel Tisnovsky And probably others we have missed, but appreciate no less! Please see below for project information. If you have tried out Thermostat and have constructive feedback for us, if you are a Java developer and have specific use cases not handled yet by Thermostat, or if you would like to contribute, we would especially like to hear from you via mailing list or IRC. URL: http://icedtea.classpath.org/thermostat Mailing list: http://icedtea.classpath.org/mailman/listinfo/thermostat Repository: http://icedtea.classpath.org/hg/thermostat IRC: #thermostat on irc.freenode.com [*] Yes, we are keeping with the works of fiction theme, and this time are referencing real books again! The code name discussion for this round happened to correspond with the recent rover landing, and being rather inspired by the amazing science that is behind current Mars exploration efforts this one was a no-brainer. From ptisnovs at icedtea.classpath.org Thu Oct 11 02:59:07 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 11 Oct 2012 09:59:07 +0000 Subject: /hg/rhino-tests: Make this test compatible with JDK 7 and added ... Message-ID: changeset dc091793be64 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=dc091793be64 author: Pavel Tisnovsky date: Thu Oct 11 12:01:51 2012 +0200 Make this test compatible with JDK 7 and added new case: ssrc/org/RhinoTests/CompiledScriptClassTest.java. diffstat: ChangeLog | 5 + src/org/RhinoTests/CompiledScriptClassTest.java | 101 +++++++++++++++++++---- 2 files changed, 85 insertions(+), 21 deletions(-) diffs (185 lines): diff -r 6d02300b36fa -r dc091793be64 ChangeLog --- a/ChangeLog Wed Oct 10 12:45:08 2012 +0200 +++ b/ChangeLog Thu Oct 11 12:01:51 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-11 Pavel Tisnovsky + + * src/org/RhinoTests/CompiledScriptClassTest.java: + Make this test compatible with JDK 7 and added new cases. + 2012-10-10 Pavel Tisnovsky * src/org/RhinoTests/BindingsClassTest.java: diff -r 6d02300b36fa -r dc091793be64 src/org/RhinoTests/CompiledScriptClassTest.java --- a/src/org/RhinoTests/CompiledScriptClassTest.java Wed Oct 10 12:45:08 2012 +0200 +++ b/src/org/RhinoTests/CompiledScriptClassTest.java Thu Oct 11 12:01:51 2012 +0200 @@ -43,6 +43,8 @@ import java.util.Arrays; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.HashMap; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -144,7 +146,7 @@ /** * Test for method javax.script.CompiledScript.getClass().isInstance() */ - protected void testIsInstance() throws ScriptException { + protected void testIsInstance() throws javax.script.ScriptException { assertTrue(this.compiledScriptClass.isInstance(getCompiledScript("6*7")), "Method CompiledScript.getClass().isInstance() returns wrong value"); } @@ -325,32 +327,62 @@ * Test for method javax.script.CompiledScript.getClass().getConstructors() */ protected void testGetConstructors() { + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + testedConstructors_jdk6.put("public javax.script.CompiledScript()", "javax.script.CompiledScript"); + + testedConstructors_jdk7.put("public javax.script.CompiledScript()", "javax.script.CompiledScript"); + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all constructors for this class Constructor[] constructors = this.compiledScriptClass.getConstructors(); + + // basic check for a number of constructors assertEquals(constructors.length, 1, "only one constructor should be set"); - String constructorName; - String constructorString; - constructorName = constructors[0].getName(); - constructorString = constructors[0].toString(); - assertEquals(constructorName, "javax.script.CompiledScript", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.CompiledScript()", - "wrong constructor.toString() " + constructorName); + + // check if all constructors exists + for (Constructor constructor : constructors) { + String constructorName = constructor.getName(); + String constructorString = constructor.toString(); + assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); + assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); + } } /** * Test for method javax.script.CompiledScript.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - Constructor[] constructors = this.compiledScriptClass.getDeclaredConstructors(); - assertEquals(constructors.length, 1, "only one constructor should be set"); - String constructorName; - String constructorString; - constructorName = constructors[0].getName(); - constructorString = constructors[0].toString(); - assertEquals(constructorName, "javax.script.CompiledScript", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.CompiledScript()", - "wrong constructor.toString() " + constructorName); + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + testedConstructors_jdk6.put("public javax.script.CompiledScript()", "javax.script.CompiledScript"); + + testedConstructors_jdk7.put("public javax.script.CompiledScript()", "javax.script.CompiledScript"); + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all declared constructors for this class + Constructor[] declaredConstructors = this.compiledScriptClass.getDeclaredConstructors(); + + // basic check for a number of declared constructors + assertEquals(declaredConstructors.length, 1, "only one constructor should be set"); + + // check if all declared constructors exists + for (Constructor declaredConstructor : declaredConstructors) { + String constructorName = declaredConstructor.getName(); + String constructorString = declaredConstructor.toString(); + assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); + assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); + } } /** @@ -400,7 +432,7 @@ */ protected void testGetMethods() { // following methods should be inherited - final String[] methodsThatShouldExists = { + final String[] methodsThatShouldExists_jdk6 = { "public abstract java.lang.Object javax.script.CompiledScript.eval(javax.script.ScriptContext) throws javax.script.ScriptException", "public abstract javax.script.ScriptEngine javax.script.CompiledScript.getEngine()", "public boolean java.lang.Object.equals(java.lang.Object)", @@ -415,6 +447,23 @@ "public java.lang.String java.lang.Object.toString()", "public native int java.lang.Object.hashCode()", }; + + final String[] methodsThatShouldExists_jdk7 = { + "public abstract java.lang.Object javax.script.CompiledScript.eval(javax.script.ScriptContext) throws javax.script.ScriptException", + "public abstract javax.script.ScriptEngine javax.script.CompiledScript.getEngine()", + "public boolean java.lang.Object.equals(java.lang.Object)", + "public final native java.lang.Class java.lang.Object.getClass()", + "public final native void java.lang.Object.notify()", + "public final native void java.lang.Object.notifyAll()", + "public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException", + "public final void java.lang.Object.wait() throws java.lang.InterruptedException", + "public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException", + "public java.lang.Object javax.script.CompiledScript.eval() throws javax.script.ScriptException", + "public java.lang.Object javax.script.CompiledScript.eval(javax.script.Bindings) throws javax.script.ScriptException", + "public java.lang.String java.lang.Object.toString()", + "public native int java.lang.Object.hashCode()", + }; + // get all inherited methods Method[] methods = this.compiledScriptClass.getMethods(); // and transform the array into a list of method names @@ -422,6 +471,7 @@ for (Method method : methods) { methodsAsString.add(method.toString()); } + String[] methodsThatShouldExists = getJavaVersion() < 7 ? methodsThatShouldExists_jdk6 : methodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : methodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), @@ -434,12 +484,20 @@ */ protected void testGetDeclaredMethods() { // following methods should be declared - final String[] declaredMethodsThatShouldExists = { + final String[] declaredMethodsThatShouldExists_jdk6 = { "public abstract java.lang.Object javax.script.CompiledScript.eval(javax.script.ScriptContext) throws javax.script.ScriptException", "public abstract javax.script.ScriptEngine javax.script.CompiledScript.getEngine()", "public java.lang.Object javax.script.CompiledScript.eval() throws javax.script.ScriptException", "public java.lang.Object javax.script.CompiledScript.eval(javax.script.Bindings) throws javax.script.ScriptException", }; + + final String[] declaredMethodsThatShouldExists_jdk7 = { + "public abstract java.lang.Object javax.script.CompiledScript.eval(javax.script.ScriptContext) throws javax.script.ScriptException", + "public abstract javax.script.ScriptEngine javax.script.CompiledScript.getEngine()", + "public java.lang.Object javax.script.CompiledScript.eval() throws javax.script.ScriptException", + "public java.lang.Object javax.script.CompiledScript.eval(javax.script.Bindings) throws javax.script.ScriptException", + }; + // get all declared methods Method[] declaredMethods = this.compiledScriptClass.getDeclaredMethods(); // and transform the array into a list of method names @@ -447,6 +505,7 @@ for (Method method : declaredMethods) { methodsAsString.add(method.toString()); } + String[] declaredMethodsThatShouldExists = getJavaVersion() < 7 ? declaredMethodsThatShouldExists_jdk6 : declaredMethodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : declaredMethodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), From ptisnovs at icedtea.classpath.org Thu Oct 11 03:21:43 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 11 Oct 2012 10:21:43 +0000 Subject: /hg/gfx-test: Added 11 new tests to the test suite src/org/gfxte... Message-ID: changeset 3b531b10ce5c in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=3b531b10ce5c author: Pavel Tisnovsky date: Thu Oct 11 12:22:14 2012 +0200 Added 11 new tests to the test suite src/org/gfxtest/testsuites/PrintTestBitBlt.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/PrintTestBitBlt.java | 165 ++++++++++++++++++++++++ 2 files changed, 170 insertions(+), 0 deletions(-) diffs (187 lines): diff -r 496ca6dc09af -r 3b531b10ce5c ChangeLog --- a/ChangeLog Wed Oct 10 12:54:14 2012 +0200 +++ b/ChangeLog Thu Oct 11 12:22:14 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-11 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestBitBlt.java: + Added 11 new tests to this test suite. + 2012-10-10 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestTexturePaint.java: diff -r 496ca6dc09af -r 3b531b10ce5c src/org/gfxtest/testsuites/PrintTestBitBlt.java --- a/src/org/gfxtest/testsuites/PrintTestBitBlt.java Wed Oct 10 12:54:14 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestBitBlt.java Thu Oct 11 12:22:14 2012 +0200 @@ -454,6 +454,171 @@ } /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_INT_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_INT_BGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_BGR); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_INT_ARGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_INT_ARGB_PRE. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_4BYTE_ABGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_4BYTE_ABGR_PRE. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType4ByteABGR_PRE(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_BYTE_GRAY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_USHORT_GRAY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_USHORT_565_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_USHORT_555_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR); + } + + /** * Test basic BitBlt operation for grid buffered image with type TYPE_BYTE_BINARY. * * @param image From adomurad at redhat.com Thu Oct 11 06:39:44 2012 From: adomurad at redhat.com (Adam Domurad) Date: Thu, 11 Oct 2012 09:39:44 -0400 Subject: Backport fix for PR1161 to icedtea-web 1.3 In-Reply-To: <20121010211822.GR30465@redhat.com> References: <20121010211822.GR30465@redhat.com> Message-ID: <5076CC20.8050901@redhat.com> On 10/10/2012 05:18 PM, Deepak Bhole wrote: > Hi, > > I would like to backport the fix for PR1161 to icedtea-web 1.3 in order > to do a new release. The issue affects icedtea-web running on Java 7: > > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-September/020228.html > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1161 > > I am attaching the final approved version that went into head. It > applies to 1.3 with some fuzz. OK for 1.3? > > ChangeLog: > > PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 > * Makefile.am: If building with JDK 6, don't build > VariableX509TrustManagerJDK7. > * NEWS: Updated. > * acinclude.m4: In addition to setting VERSION_DEFS, also set HAVE_JAVA7 > if building with JDK7. > * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): Use new > getSSLSocketTrustManager() method to get the trust manager. > (getSSLSocketTrustManager): New method. Depending on runtime JRE version, > returns the appropriate trust manager. > * netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Removed > unused tm variable. > * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java: No > longer extends com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager. > (checkClientTrusted): Renamed to checkTrustClient and removed overloaded > implementations. > (checkServerTrusted): Renamed to checkTrustServer. Also, modified to > accept socket and engine (may be null). Assume that CN is mismatched by > default, rather than matched. If explicitly trusted, bypass other checks, > including CN mismatch. > (checkAllManagers): Modified to accept socket and engine. Modified to work > for both JDK6 and JDK7. > (getAcceptedIssuers): Make protected (called by others in package). > * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java: > New class -- X509TrustManager for JDK6. > * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java: > New class -- X509TrustManager for JDK7. > > > Thanks, > Deepak Haven't looked into it in detail but I don't see any reason it shouldn't go in. We'll catch anything in testing regardless. OK for 1.3 from me. - Adam From bugzilla-daemon at icedtea.classpath.org Thu Oct 11 11:56:04 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 11 Oct 2012 18:56:04 +0000 Subject: [Bug 1194] New: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1194 Priority: P3 Bug ID: 1194 CC: unassigned at icedtea.classpath.org Assignee: gnu.andrew at redhat.com Summary: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default Severity: normal Classification: Unclassified OS: Linux Reporter: gnu.andrew at redhat.com Hardware: x86_64 Status: NEW Version: 6-1.11.4 Component: IcedTea Product: IcedTea /usr/lib/jvm/java-openjdk is the first patch searched by IcedTea if --with-jdk-home is not specified and points to the default OpenJDK on Fedora. Now that this is 1.7 on F17+, it wrongly picks up a 1.7 VM and the build fails. This patch on HEAD: +2012-03-19 Andrew John Hughes + + * acinclude.m4: + (IT_CHECK_FOR_JDK): Update JDK home directory + check list, adding some missing 1.6 entries + and removing generic ones which may now pick + up an unwanted 1.7 installation. updates the list to: for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-1.6.0 \ /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ /usr/lib/jvm/java-1.6.0-openjdk /usr/lib/jvm/icedtea-6 ; do all of which specify the required version (6). This needs backporting to the 1.10 and 1.11 release branches. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121011/d305fa55/attachment.html From adomurad at redhat.com Thu Oct 11 12:03:53 2012 From: adomurad at redhat.com (Adam Domurad) Date: Thu, 11 Oct 2012 15:03:53 -0400 Subject: [icedtea-web][rfc] Update on Danesh's major rework of JarCertVerifier In-Reply-To: <5075BD24.6070706@redhat.com> References: <1348585163.17801.24.camel@adomurad-desktop> <1348842748.17801.29.camel@adomurad-desktop> <5074A257.5090009@redhat.com> <50757658.80603@redhat.com> <5075BD24.6070706@redhat.com> Message-ID: <50771819.1020607@redhat.com> On 10/10/2012 02:23 PM, Omair Majid wrote: > On 10/10/2012 09:21 AM, Adam Domurad wrote: >> On 10/09/2012 06:16 PM, Omair Majid wrote: >>> On 09/28/2012 10:32 AM, Adam Domurad wrote: >>>> diff -r cbf8e415c5bf >>>> tests/reproducers/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java >>>> >>>> --- >>>> a/tests/reproducers/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java >>>> Wed Sep 26 15:15:35 2012 -0400 >>>> +++ >>>> b/tests/reproducers/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java >>>> Thu Sep 27 16:10:12 2012 -0400 >>>> @@ -41,5 +41,6 @@ public class ReadPropertiesSigned { >>>> */ >>>> public static void main(String[] args) { >>>> System.out.println(System.getProperty(args[0])); >>>> + System.out.println("*** APPLET FINISHED ***"); >>>> } >>>> } >>> Is this always an applet? Or do we not care even if it's printed for >>> applications? >> Well, in hindsight this message choice may not been the best. It's a >> 'special' message for auto-closing of applets. Its simply more >> convenient if its always printed, but not strictly necessary. > Could we make the applet that calls this method print this line instead? > >> Any additional comments ? > Nope. Was there supposed to be an updated patch with the email? > > Cheers, > Omair > Updated reproducer attached. Cheers, - Adam -------------- next part -------------- A non-text attachment was scrubbed... Name: PR822repro2.patch Type: text/x-patch Size: 23552 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121011/99da59ac/PR822repro2.patch From adomurad at redhat.com Thu Oct 11 13:02:19 2012 From: adomurad at redhat.com (Adam Domurad) Date: Thu, 11 Oct 2012 16:02:19 -0400 Subject: [icedtea-web][rfc] Update on Danesh's major rework of JarCertVerifier In-Reply-To: <5075A1C7.1050402@redhat.com> References: <1348585163.17801.24.camel@adomurad-desktop> <5075A1C7.1050402@redhat.com> Message-ID: <507725CB.4030009@redhat.com> Thanks for the review! Attached is an updated patch to the base patch by Danesh (with your recommended changes + a change to JCV to use specific imports instead of full-package imports). Specific answers/changes included inline. On 10/10/2012 12:26 PM, Omair Majid wrote: > On 09/25/2012 10:59 AM, Adam Domurad wrote: >> + * @param bad >> + * 3 booleans to show if the KeyUsage, ExtendedKeyUsage, NetscapeCertType has codeSigning flag turned on. If null, the class field badKeyUsage, badExtendedKeyUsage, badNetscapeCertType will be set. Line wrapped now, as it was prior to the patch. > > Please consider line-wrapping this. > >> + public Map getJarSignableEntries() { >> + return jarSignableEntries; >> + } > If untrusted code were able to invoke this method, would that compromise > the security of the system? Should we be returning a mutable data > structure here? Changed to: + public Map getJarSignableEntries() { + return Collections.unmodifiableMap(jarSignableEntries); + } > >> +public class VerifyJarEntryCertsTest { > Could you rename this class to ${CLASS_IT_TESTS}Test? That would be > JarCertVerifierTest. Otherwise it will be harder to find this the next > time someone is updating JarCertVerifier. > >> + // This calls ReadPropertiesSigned with user.home, it is not easy to think of a pattern to match this >> + // Instead we make sure _something_ was printed >> + Assert.assertFalse("stdout should NOT be empty, but was", pr.stdout.isEmpty()); >> + Assert.assertFalse("stderr should NOT contains `" + accExcString + "`, but did", pr.stderr.contains(accExcString)); >> + } Done > Maybe you can you some other system property that's more predictable > (like, say "java.vm.specification.name") ? Not done (review to relevant patch in separate answer), as discussed, this property does not exercise signed privileges. > > Rest looks okay to me. OK for HEAD? > > Cheers, > Omair Cheers, - Adam -------------- next part -------------- A non-text attachment was scrubbed... Name: jcv3.patch Type: text/x-patch Size: 82979 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121011/0929dc6b/jcv3.patch From gnu.andrew at redhat.com Thu Oct 11 13:26:32 2012 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Thu, 11 Oct 2012 16:26:32 -0400 (EDT) Subject: [1.10 & 1.11 REVIEW] PR1194: IcedTea picks up OpenJDK7 VM on latest Fedora In-Reply-To: <728196796.11290313.1349987186716.JavaMail.root@redhat.com> Message-ID: <401968705.11290720.1349987192105.JavaMail.root@redhat.com> This change needs backporting to 1.10 & 1.11: +2012-03-19 Andrew John Hughes + + * acinclude.m4: + (IT_CHECK_FOR_JDK): Update JDK home directory + check list, adding some missing 1.6 entries + and removing generic ones which may now pick + up an unwanted 1.7 installation. It removes some old JDKs from the search path for IcedTea6 (which were aliases for 6, but are now aliases for 7) and adds some missing ones, all explicitly version 6: New path: for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-1.6.0 \ /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ /usr/lib/jvm/java-1.6.0-openjdk /usr/lib/jvm/icedtea-6 ; do Ok for 1.10 & 1.11? -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 -------------- next part -------------- A non-text attachment was scrubbed... Name: pr1194.patch Type: text/x-patch Size: 1552 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121011/aa5b383a/pr1194.patch From smohammad at redhat.com Thu Oct 11 13:47:10 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Thu, 11 Oct 2012 16:47:10 -0400 Subject: [RFC][icedtea-web]: DownloadService implementation In-Reply-To: <506F5304.9010606@redhat.com> References: <50411B4E.8080308@redhat.com> <50609F44.2040102@redhat.com> <1348857406.17801.92.camel@adomurad-desktop> <506F5304.9010606@redhat.com> Message-ID: <5077304E.2040102@redhat.com> Adam, A very minor change below with comments. [..snip...] > + /** > + * Manages DownloadService jars which are not mentioned in the JNLP file > + * @param ref Path to the resource. > + * @param version The version of resource. If null, no version is specified. > + * @param action The action to perform with the resource. Either DOWNLOADTOCACHE, REMOVEFROMCACHE, or CHECKCACHE. > + * @return true if CHECKCACHE and the resource is cached. > + */ > + boolean manageExternalJars(URL ref, String version, DownloadAction action) { > + boolean approved = false; > + JNLPClassLoader foundLoader = LocateJnlpClassLoader.getLoaderByResourceUrl(this, ref, version); > + Version resourceVersion = (version == null) ? null : new Version(version); > + > + if (foundLoader != null) > + approved = true; > + > + else if (ref.toString().startsWith(file.getCodeBase().toString())) > + approved = true; > + else if (SecurityDesc.ALL_PERMISSIONS.equals(security.getSecurityType())) > + approved = true; > + > + if (approved) { > + if (foundLoader == null) > + foundLoader = this; > + > + if (action == DownloadAction.DOWNLOAD_TO_CACHE) { > + JARDesc jarToCache = new JARDesc(ref, resourceVersion, null, false, true, false, true); > + if (JNLPRuntime.isDebug()) > + System.out.println("Downloading and initializing jar: " + ref.toString()); > + > + foundLoader.addNewJar(jarToCache); I didn't think there was a reason to repost the full patch for a one-line change. As I mentioned on IRC, I found a small bug in the code above. When we repeatedly load and unload external resources, the managed resource is not cached correctly. Therefore, the line above should be changed to: foundLoader.addNewJar(jarToCache, UpdatePolicy.FORCE); I added additional tests to the reproducer to test this behaviour. I assume this change is fine? > + > + } else if (action == DownloadAction.REMOVE_FROM_CACHE) { > + JARDesc[] jarToRemove = { new JARDesc(ref, resourceVersion, null, false, true, false, true) }; > + foundLoader.removeJars(jarToRemove); > + > + } else if (action == DownloadAction.CHECK_CACHE) { > + return CacheUtil.isCached(ref, resourceVersion); > + } > + } > + return false; > + } > + > + /** > * Decrements loader use count by 1 > * > * If count reaches 0, loader is removed from list of available loaders > @@ -2305,4 +2421,6 @@ > return null; > } > } > + > + > } [..snip..] Thanks for the reviews! -- Cheers, Saad Mohammad From omajid at redhat.com Thu Oct 11 13:48:29 2012 From: omajid at redhat.com (Omair Majid) Date: Thu, 11 Oct 2012 16:48:29 -0400 Subject: [1.10 & 1.11 REVIEW] PR1194: IcedTea picks up OpenJDK7 VM on latest Fedora In-Reply-To: <401968705.11290720.1349987192105.JavaMail.root@redhat.com> References: <401968705.11290720.1349987192105.JavaMail.root@redhat.com> Message-ID: <5077309D.70304@redhat.com> On 10/11/2012 04:26 PM, Andrew Hughes wrote: > Ok for 1.10 & 1.11? Looks fine to me. Cheers, Omair From smohammad at redhat.com Thu Oct 11 13:30:28 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Thu, 11 Oct 2012 16:30:28 -0400 Subject: [RFC][icedtea-web]: Reproducer for DownloadService In-Reply-To: <1349124118.17801.108.camel@adomurad-desktop> References: <50609FA3.8040701@redhat.com> <1349124118.17801.108.camel@adomurad-desktop> Message-ID: <50772C64.7060808@redhat.com> On 10/01/2012 04:41 PM, Adam Domurad wrote: > There's a few general concerns here (Mostly a result of this being hard to test): > > 1. this generally looks like a unit test > - As discussed on IRC, this is probably OK considering that its quite difficult to unit test DownloadService in isolation. > > 2. checking for 'true' or 'false' is a bit brittle, it'd be better if you could print all the cached resources and having the test check > - Also discussed on IRC, this would be difficult to do with the given API for handling cached resources > > 3. its all one interdependent test, ran as one process. I think a > slightly better approach would be to take an argument to > DownloadServiceRunner that determines the test run type, and run the > minimal commands needed to test that component. For example, > loadExternalResource could be tested in isolation from loadPart. Hi Adam, Thanks for the review. Updated patch is attached. As we discussed on IRC, satisfying #1 & #2 would be very difficult at the moment. However, I did make some changes for #3. What's new? * Runs three different instances of DownloadServiceRunner to avoid dependency of one process to output results. Checking cache, managing jnlp resources, and managing external jnlps are verified by the stdout of the three instances. * Added two test which checks repeated calls of unloading and loading a single resource ======================================================================== CHANGELOG ======================================================================== 2012-10-11 Saad Mohammad Added reproducer for DownloadService. * tests/reproducers/signed/DownloadService/resources/DownloadService.jnlp: Launching jnlp file that contains extension jnlp and jars marked with part names. * tests/reproducers/signed/DownloadService/resources/DownloadServiceExtension.jnlp: DownloadService extension jnlp file with jars marked with part names. * tests/reproducers/signed/DownloadService/srcs/DownloadServiceRunner.java: A simple class that uses DownloadService to complete tasks and outputs the results. * tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java: Testcase for DownloadService. -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: Changelog0-1.patch Type: text/x-patch Size: 900 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121011/fd7c2902/Changelog0-1.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: reproducers_ds1-0.patch Type: text/x-patch Size: 40595 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121011/fd7c2902/reproducers_ds1-0.patch From neugens at redhat.com Thu Oct 11 14:37:42 2012 From: neugens at redhat.com (Mario Torre) Date: Thu, 11 Oct 2012 23:37:42 +0200 Subject: [1.10 & 1.11 REVIEW] PR1194: IcedTea picks up OpenJDK7 VM on latest Fedora In-Reply-To: <401968705.11290720.1349987192105.JavaMail.root@redhat.com> References: <401968705.11290720.1349987192105.JavaMail.root@redhat.com> Message-ID: <1349991462.7839.7.camel@pegasus> Il giorno gio, 11/10/2012 alle 16.26 -0400, Andrew Hughes ha scritto: > This change needs backporting to 1.10 & 1.11: > > +2012-03-19 Andrew John Hughes > + > + * acinclude.m4: > + (IT_CHECK_FOR_JDK): Update JDK home directory > + check list, adding some missing 1.6 entries > + and removing generic ones which may now pick > + up an unwanted 1.7 installation. > > It removes some old JDKs from the search path for IcedTea6 > (which were aliases for 6, but are now aliases for 7) and > adds some missing ones, all explicitly version 6: > > New path: > > for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-1.6.0 \ > /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ > /usr/lib/jvm/java-1.6.0-openjdk /usr/lib/jvm/icedtea-6 ; do > > Ok for 1.10 & 1.11? Yes, this looks good. Cheers, Mario From andrew at icedtea.classpath.org Thu Oct 11 18:26:50 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 12 Oct 2012 01:26:50 +0000 Subject: /hg/release/icedtea6-1.10: PR1194: IcedTea tries to build with /... Message-ID: changeset 287ce812e84e in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=287ce812e84e author: Andrew John Hughes date: Fri Oct 12 02:26:29 2012 +0100 PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default 2012-03-19 Andrew John Hughes PR 1194: * acinclude.m4: (IT_CHECK_FOR_JDK): Update JDK home directory check list, adding some missing 1.6 entries and removing generic ones which may now pick up an unwanted 1.7 installation. * NEWS: Updated. diffstat: ChangeLog | 10 ++++++++++ NEWS | 3 +++ acinclude.m4 | 4 ++-- 3 files changed, 15 insertions(+), 2 deletions(-) diffs (45 lines): diff -r d64dd8e0811e -r 287ce812e84e ChangeLog --- a/ChangeLog Wed Sep 05 11:43:29 2012 +0200 +++ b/ChangeLog Fri Oct 12 02:26:29 2012 +0100 @@ -1,3 +1,13 @@ +2012-03-19 Andrew John Hughes + + PR 1194: + * acinclude.m4: + (IT_CHECK_FOR_JDK): Update JDK home directory + check list, adding some missing 1.6 entries + and removing generic ones which may now pick + up an unwanted 1.7 installation. + * NEWS: Updated. + 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diff -r d64dd8e0811e -r 287ce812e84e NEWS --- a/NEWS Wed Sep 05 11:43:29 2012 +0200 +++ b/NEWS Fri Oct 12 02:26:29 2012 +0100 @@ -11,6 +11,9 @@ New in release 1.10.10 (2012-XX-XX): +* Bug fixes + - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default + New in release 1.10.9 (2012-08-31): * Security fixes diff -r d64dd8e0811e -r 287ce812e84e acinclude.m4 --- a/acinclude.m4 Wed Sep 05 11:43:29 2012 +0200 +++ b/acinclude.m4 Fri Oct 12 02:26:29 2012 +0100 @@ -1140,9 +1140,9 @@ if test "x${enable_bootstrap}" = "xyes"; then BOOTSTRAP_VMS="/usr/lib/jvm/java-gcj /usr/lib/jvm/gcj-jdk /usr/lib/jvm/cacao"; fi - for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-openjdk \ + for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-1.6.0 \ /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ - /usr/lib/jvm/openjdk /usr/lib/jvm/java-icedtea ; do + /usr/lib/jvm/java-1.6.0-openjdk /usr/lib/jvm/icedtea-6 ; do if test -d $dir; then SYSTEM_JDK_DIR=$dir break From bugzilla-daemon at icedtea.classpath.org Thu Oct 11 18:26:58 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 12 Oct 2012 01:26:58 +0000 Subject: [Bug 1194] IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1194 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/release/icedtea6-1.10?cmd=changeset;node=287ce812e84e author: Andrew John Hughes date: Fri Oct 12 02:26:29 2012 +0100 PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default 2012-03-19 Andrew John Hughes PR 1194: * acinclude.m4: (IT_CHECK_FOR_JDK): Update JDK home directory check list, adding some missing 1.6 entries and removing generic ones which may now pick up an unwanted 1.7 installation. * NEWS: Updated. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/a1a2b307/attachment.html From andrew at icedtea.classpath.org Thu Oct 11 18:40:05 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 12 Oct 2012 01:40:05 +0000 Subject: /hg/release/icedtea6-1.11: PR1194: IcedTea tries to build with /... Message-ID: changeset b2abbe3ce55b in /hg/release/icedtea6-1.11 details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=b2abbe3ce55b author: andrew date: Fri Oct 12 02:39:24 2012 +0100 PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default 2012-03-19 Andrew John Hughes PR 1194: * acinclude.m4: (IT_CHECK_FOR_JDK): Update JDK home directory check list, adding some missing 1.6 entries and removing generic ones which may now pick up an unwanted 1.7 installation. * NEWS: Updated. diffstat: ChangeLog | 10 ++++++++++ NEWS | 3 +++ acinclude.m4 | 4 ++-- 3 files changed, 15 insertions(+), 2 deletions(-) diffs (45 lines): diff -r 7f603a40c817 -r b2abbe3ce55b ChangeLog --- a/ChangeLog Wed Sep 05 11:43:29 2012 +0200 +++ b/ChangeLog Fri Oct 12 02:39:24 2012 +0100 @@ -1,3 +1,13 @@ +2012-03-19 Andrew John Hughes + + PR 1194: + * acinclude.m4: + (IT_CHECK_FOR_JDK): Update JDK home directory + check list, adding some missing 1.6 entries + and removing generic ones which may now pick + up an unwanted 1.7 installation. + * NEWS: Updated. + 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diff -r 7f603a40c817 -r b2abbe3ce55b NEWS --- a/NEWS Wed Sep 05 11:43:29 2012 +0200 +++ b/NEWS Fri Oct 12 02:39:24 2012 +0100 @@ -12,6 +12,9 @@ New in release 1.11.5 (2012-XX-XX): +* Bug fixes + - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default + New in release 1.11.4 (2012-08-31): * Security fixes diff -r 7f603a40c817 -r b2abbe3ce55b acinclude.m4 --- a/acinclude.m4 Wed Sep 05 11:43:29 2012 +0200 +++ b/acinclude.m4 Fri Oct 12 02:39:24 2012 +0100 @@ -1147,9 +1147,9 @@ if test "x${enable_bootstrap}" = "xyes"; then BOOTSTRAP_VMS="/usr/lib/jvm/java-gcj /usr/lib/jvm/gcj-jdk /usr/lib/jvm/cacao"; fi - for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-openjdk \ + for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-1.6.0 \ /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ - /usr/lib/jvm/openjdk /usr/lib/jvm/java-icedtea ; do + /usr/lib/jvm/java-1.6.0-openjdk /usr/lib/jvm/icedtea-6 ; do if test -d $dir; then SYSTEM_JDK_DIR=$dir break From bugzilla-daemon at icedtea.classpath.org Thu Oct 11 18:40:13 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 12 Oct 2012 01:40:13 +0000 Subject: [Bug 1194] IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1194 --- Comment #2 from hg commits --- details: http://icedtea.classpath.org//hg/release/icedtea6-1.11?cmd=changeset;node=b2abbe3ce55b author: andrew date: Fri Oct 12 02:39:24 2012 +0100 PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default 2012-03-19 Andrew John Hughes PR 1194: * acinclude.m4: (IT_CHECK_FOR_JDK): Update JDK home directory check list, adding some missing 1.6 entries and removing generic ones which may now pick up an unwanted 1.7 installation. * NEWS: Updated. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/6482d34a/attachment.html From ptisnovs at icedtea.classpath.org Fri Oct 12 00:24:34 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 12 Oct 2012 07:24:34 +0000 Subject: /hg/rhino-tests: Added five new tests to the test suite src/org/... Message-ID: changeset abe703a3501c in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=abe703a3501c author: Pavel Tisnovsky date: Fri Oct 12 09:27:16 2012 +0200 Added five new tests to the test suite src/org/RhinoTests/InvocableClassTest.java. diffstat: ChangeLog | 5 ++ src/org/RhinoTests/InvocableClassTest.java | 54 ++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 0 deletions(-) diffs (76 lines): diff -r dc091793be64 -r abe703a3501c ChangeLog --- a/ChangeLog Thu Oct 11 12:01:51 2012 +0200 +++ b/ChangeLog Fri Oct 12 09:27:16 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-12 Pavel Tisnovsky + + * src/org/RhinoTests/InvocableClassTest.java: + Added five new tests to this test suite. + 2012-10-11 Pavel Tisnovsky * src/org/RhinoTests/CompiledScriptClassTest.java: diff -r dc091793be64 -r abe703a3501c src/org/RhinoTests/InvocableClassTest.java --- a/src/org/RhinoTests/InvocableClassTest.java Thu Oct 11 12:01:51 2012 +0200 +++ b/src/org/RhinoTests/InvocableClassTest.java Fri Oct 12 09:27:16 2012 +0200 @@ -137,6 +137,60 @@ } /** + * Test for method javax.script.Invocable.getClass().isAnnotation() + */ + protected void testIsAnnotation() { + assertFalse(this.invocableClass.isAnnotation(), + "Method Invocable.getClass().isAnnotation() returns wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().isAnnotationPresent() + */ + protected void testIsAnnotationPresent() { + assertFalse(this.invocableClass.isAnnotationPresent(java.lang.annotation.Annotation.class), + "Method Invocable.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value"); + assertFalse(this.invocableClass.isAnnotationPresent(java.lang.annotation.Documented.class), + "Method Invocable.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value"); + assertFalse(this.invocableClass.isAnnotationPresent(java.lang.annotation.Inherited.class), + "Method Invocable.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value"); + assertFalse(this.invocableClass.isAnnotationPresent(java.lang.annotation.Retention.class), + "Method Invocable.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value"); + assertFalse(this.invocableClass.isAnnotationPresent(java.lang.annotation.Target.class), + "Method Invocable.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value"); + assertFalse(this.invocableClass.isAnnotationPresent(java.lang.Deprecated.class), + "Method Invocable.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value"); + assertFalse(this.invocableClass.isAnnotationPresent(java.lang.Override.class), + "Method Invocable.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value"); + assertFalse(this.invocableClass.isAnnotationPresent(java.lang.SuppressWarnings.class), + "Method Invocable.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().isAnonymousClass() + */ + protected void testIsAnonymousClass() { + assertFalse(this.invocableClass.isAnonymousClass(), + "Method Invocable.getClass().isAnonymousClass() returns wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().isArray() + */ + protected void testIsArray() { + assertFalse(this.invocableClass.isArray(), + "Method Invocable.getClass().isArray() returns wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().isEnum() + */ + protected void testIsEnum() { + assertFalse(this.invocableClass.isEnum(), + "Method Invocable.getClass().isEnum() returns wrong value"); + } + + /** * Test for method javax.script.Invocable.getClass().getInterfaces() */ protected void testGetInterfaces() { From ptisnovs at icedtea.classpath.org Fri Oct 12 00:57:36 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 12 Oct 2012 07:57:36 +0000 Subject: /hg/gfx-test: Added five new tests to the test suite src/org/gfx... Message-ID: changeset 851bc51b042a in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=851bc51b042a author: Pavel Tisnovsky date: Fri Oct 12 10:00:21 2012 +0200 Added five new tests to the test suite src/org/gfxtest/testsuites/BitBltCropImage.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltCropImage.java | 83 +++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 0 deletions(-) diffs (105 lines): diff -r 3b531b10ce5c -r 851bc51b042a ChangeLog --- a/ChangeLog Thu Oct 11 12:22:14 2012 +0200 +++ b/ChangeLog Fri Oct 12 10:00:21 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-12 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltCropImage.java: + Added five new tests to this test suite. + 2012-10-11 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestBitBlt.java: diff -r 3b531b10ce5c -r 851bc51b042a src/org/gfxtest/testsuites/BitBltCropImage.java --- a/src/org/gfxtest/testsuites/BitBltCropImage.java Thu Oct 11 12:22:14 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltCropImage.java Fri Oct 12 10:00:21 2012 +0200 @@ -333,6 +333,89 @@ } /** + * Test basic BitBlt operation for checker buffered image with type TYPE_4BYTE_ABGR. + * No crop is performed to that image. + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGRNoCrop(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_4BYTE_ABGR. Image is cropped so only north-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGRCropNW(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, + BitmapCropRegions.CROP_REGION_NW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_4BYTE_ABGR. Image is cropped so only north-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGRCropNE(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, + BitmapCropRegions.CROP_REGION_NE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_4BYTE_ABGR. Image is cropped so only south-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGRCropSW(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, + BitmapCropRegions.CROP_REGION_SW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_4BYTE_ABGR. Image is cropped so only south-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGRCropSE(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, + BitmapCropRegions.CROP_REGION_SE); + } + + /** * Entry point to the test suite. * * @param args From bugzilla-daemon at icedtea.classpath.org Fri Oct 12 03:07:30 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 12 Oct 2012 10:07:30 +0000 Subject: [Bug 1013] Segmentation fault when loading Color Profile In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1013 --- Comment #13 from Mike --- We've tested it out on a few newer releases here and it does seem to be fixed - looks like we were testing with a bad release, which is unfortunate. For reference it's working for us on: java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.4) (6b24-1.11.4-3) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) java version "1.7.0_03" OpenJDK Runtime Environment (IcedTea7 2.1.2) (7u3-2.1.2-2) OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode) java version "1.7.0_07" OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-0ubuntu0.12.04.1) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode) -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/338a0e3c/attachment.html From bugzilla-daemon at icedtea.classpath.org Fri Oct 12 09:44:41 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 12 Oct 2012 16:44:41 +0000 Subject: [Bug 1013] Segmentation fault when loading Color Profile In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1013 --- Comment #14 from Andrew John Hughes --- Yeah, as Xerxes implies, we can't support random snapshots, only actual releases. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/5196b80b/attachment.html From adomurad at redhat.com Fri Oct 12 09:05:41 2012 From: adomurad at redhat.com (Adam Domurad) Date: Fri, 12 Oct 2012 12:05:41 -0400 Subject: [icedtea-web][rfc] Update to AppletTakesLastParam reproducer Message-ID: <50783FD5.10109@redhat.com> This is a minor update to AppletTakesLastParam (no bug report associated). This will cause the reproducer to finish more quickly (as well as having a bit of code cleanup). ChangeLog: 2012-10-12 Adam Domurad * tests/reproducers/simple/AppletTakesLastParam/srcs/AppletTakesLastParam.java: Add 'standard' applet closing message. * tests/reproducers/simple/AppletTakesLastParam/testcases/AppletTakesLastParamTests.java: Clean-up code and add automatic applet closing on finish. -------------- next part -------------- A non-text attachment was scrubbed... Name: applet-last-param-update.patch Type: text/x-patch Size: 4297 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/5138cf53/applet-last-param-update.patch From adomurad at redhat.com Fri Oct 12 10:31:13 2012 From: adomurad at redhat.com (Adam Domurad) Date: Fri, 12 Oct 2012 13:31:13 -0400 Subject: [icedtea-web][rfc] Fix to AppletBaseURL reproducer Message-ID: <507853E1.70905@redhat.com> This fixes random failures caused by the 'xception' matcher, as well as speeding up execution. The random failures were caused by an exception being printed when the applet was killed. ChangeLog: 2012-10-12 Adam Domurad * tests/reproducers/simple/AppletBaseURLTest/srcs/AppletBaseURL.java: Allow test to finish quickly. * tests/reproducers/simple/AppletBaseURLTest/testcases/AppletBaseURLTest.java: Small refactoring, remove deprecated ProcessResult usage, remove 'xception' test that was causing problems. -------------- next part -------------- A non-text attachment was scrubbed... Name: appletbaseurlfix.patch Type: text/x-patch Size: 4763 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/af82b5ed/appletbaseurlfix.patch From bugzilla-daemon at icedtea.classpath.org Fri Oct 12 10:36:05 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 12 Oct 2012 17:36:05 +0000 Subject: [Bug 896] libreoffice writer causes SIGSEGV In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=896 --- Comment #1 from Kenneth --- Created attachment 772 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=772&action=edit Log with thread and stack info One trace log showing the error information -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/6cb43404/attachment.html From bugzilla-daemon at icedtea.classpath.org Fri Oct 12 10:37:30 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 12 Oct 2012 17:37:30 +0000 Subject: [Bug 896] libreoffice writer causes SIGSEGV In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=896 --- Comment #2 from Kenneth --- Created attachment 773 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=773&action=edit Another thread and stack trace of the event -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/8e2f18af/attachment.html From bugzilla-daemon at icedtea.classpath.org Fri Oct 12 10:42:28 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 12 Oct 2012 17:42:28 +0000 Subject: [Bug 896] libreoffice writer causes SIGSEGV In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=896 Kenneth changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |classpath at i-pi.com --- Comment #3 from Kenneth --- This is happening to me in libreoffice-base-3.5.4.7-1.1.2.x86_64 impress (presentation) when editing in Outline mode and changing the outline level from slide to top-level on the slide. This is on OpenSuSE Tumbleweed. The terminal window where LibreOffice was started has this message: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fb3fbc14116, pid=3399, tid=140411580639424 # # JRE version: 6.0_24-b24 # Java VM: OpenJDK 64-Bit Server VM (20.0-b12 mixed mode linux-amd64 compressed oops) # Derivative: IcedTea6 1.11.3 # Distribution: Dummy Product (x86_64), package suse-9.1-x86_64 # Problematic frame: # C [libeditenglo.so+0xf2116] EFieldInfo::operator=(EFieldInfo const&)+0x388 # # An error report file with more information is saved as: # /home/ingham/Consulting/SkillBridge/Amazon/Crypto-issues/hs_err_pid3399.log # # If you would like to submit a bug report, please include # instructions how to reproduce the bug and visit: # http://icedtea.classpath.org/bugzilla # [error occurred during error reporting , id 0xb] -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/84d6fa1a/attachment.html From smohammad at redhat.com Fri Oct 12 11:28:53 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Fri, 12 Oct 2012 14:28:53 -0400 Subject: [RFC][icedtea-web]: Small fix for PR1189 w/ reproducer Message-ID: <50786165.3020400@redhat.com> Hi, The patches attached includes the reproducer and the fix for PR1189. CHANGELOG - BUG FIX ======================================================================== 2012-10-12 Saad Mohammad Fixes PR1189. * netx/net/sourceforge/jnlp/PluginBridge.java (PluginBridge): Overrides main-class name with the one specified in the jnlp file if applet tag contains a jnlp_href. * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java (parse): Removes null assigning to atts if code attribute is missing. CHANGELOG - REPRODUCER ======================================================================== 2012-10-12 Saad Mohammad Adds reproducer for PR1189. * tests/reproducers/simple/AppletTagWithMissingCodeAttribute/resources/AppletTagWithMissingCodeAttribute.html: Simple webpage which contains an applet tag with no code attribute. * tests/reproducers/simple/AppletTagWithMissingCodeAttribute/resources/AppletTagWithMissingCodeAttribute.jnlp: Jnlp file that is used by the webpages using jnlp_href. * tests/reproducers/simple/AppletTagWithMissingCodeAttribute/srcs/SimpleApplet.java: Simple applet class that outputs a string. * tests/reproducers/simple/AppletTagWithMissingCodeAttribute/testcases/AppletTagWithMissingCodeAttribute.java: Testcase that tests applets without code attribute in html pages. -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: Changelog-News0-1.patch Type: text/x-patch Size: 941 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/e083bc8c/Changelog-News0-1.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: ChangelogReproducer0-1.patch Type: text/x-patch Size: 893 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/e083bc8c/ChangelogReproducer0-1.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: fix0-1.patch Type: text/x-patch Size: 1606 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/e083bc8c/fix0-1.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: reproducer0-1.patch Type: text/x-patch Size: 10383 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/e083bc8c/reproducer0-1.patch From bugzilla-daemon at icedtea.classpath.org Fri Oct 12 12:43:59 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 12 Oct 2012 19:43:59 +0000 Subject: [Bug 1194] IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1194 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |6-1.10.10 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/88537ed0/attachment.html From bugzilla-daemon at icedtea.classpath.org Fri Oct 12 12:46:33 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 12 Oct 2012 19:46:33 +0000 Subject: [Bug 1193] JVM crash In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1193 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Component|IcedTea |Thumb2 JIT Version|unspecified |6-1.8.13 Resolution|--- |WONTFIX Assignee|gnu.andrew at redhat.com |aph at redhat.com Severity|blocker |normal --- Comment #4 from Andrew John Hughes --- 1.8 is no longer supported. Please try on a newer version and re-open if the problem still exists. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121012/0f9f9617/attachment.html From bugzilla-daemon at icedtea.classpath.org Sun Oct 14 12:22:30 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 14 Oct 2012 19:22:30 +0000 Subject: [Bug 896] libreoffice writer causes SIGSEGV In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=896 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |gnu.andrew at redhat.com Resolution|--- |INVALID --- Comment #4 from Andrew John Hughes --- This crash is occurring in LibreOffice native code. I suggest reporting the bug to them. -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121014/2ade57ff/attachment.html From bugzilla-daemon at icedtea.classpath.org Sun Oct 14 12:23:34 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 14 Oct 2012 19:23:34 +0000 Subject: [Bug 899] Internal Error (c1_Optimizer.cpp:271) In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=899 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gnu.andrew at redhat.com --- Comment #1 from Andrew John Hughes --- How can this be reproduced? -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121014/76a5601d/attachment.html From jfabriko at icedtea.classpath.org Mon Oct 15 01:35:21 2012 From: jfabriko at icedtea.classpath.org (jfabriko at icedtea.classpath.org) Date: Mon, 15 Oct 2012 08:35:21 +0000 Subject: /hg/icedtea-web: Modification of JSToJGet simple reproducer test... Message-ID: changeset c4dc3da913ab in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c4dc3da913ab author: Jana Fabrikova date: Mon Oct 15 10:36:56 2012 +0200 Modification of JSToJGet simple reproducer testcases for better readability. diffstat: ChangeLog | 5 + tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java | 81 ++++------ 2 files changed, 35 insertions(+), 51 deletions(-) diffs (269 lines): diff -r 5a473790c21d -r c4dc3da913ab ChangeLog --- a/ChangeLog Fri Oct 05 23:02:53 2012 -0400 +++ b/ChangeLog Mon Oct 15 10:36:56 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-15 Jana Fabrikova + + * tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java: + Modified the testcases - more readable method calls. + 2012-10-05 Omair Majid PR1145 diff -r 5a473790c21d -r c4dc3da913ab tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java --- a/tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java Fri Oct 05 23:02:53 2012 -0400 +++ b/tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java Mon Oct 15 10:36:56 2012 +0200 @@ -48,27 +48,6 @@ public class JSToJGetTest extends BrowserTest { - public String[] testNames = { "int", "double", "float", "long", "boolean", - "char", "byte", "intArrayElement", "intArrayBeyond", - "regularString", "specialCharsString", "null", "Integer", "Double", - "Float", "Long", "Boolean", "Character", "Byte", - "DoubleArrayElement", "DoubleFullArray" }; - - public String[] outputStrings = { "Test no. 1 - (int)", - "Test no. 2 - (double)", "Test no. 3 - (float)", - "Test no. 4 - (long)", "Test no. 5 - (boolean)", - "Test no. 6 - (char)", "Test no. 7 - (byte)", - "Test no. 8 - (int[] - element access)", - "Test no. 9 - (int[] - beyond length)", - "Test no.10 - (regular string)", - "Test no.11 - (string with special characters)", - "Test no.12 - (null)", "Test no.13 - (Integer)", - "Test no.14 - (Double)", "Test no.15 - (Float)", - "Test no.16 - (Long)", "Test no.17 - (Boolean)", - "Test no.18 - (Character)", "Test no.19 - (Byte)", - "Test no.20 - (Double[] - element access)", - "Test no.21 - (Double[] - full array)" }; - public String passStr = " - passed."; public String failValStr = " - failed, value mismatch."; public String failTypeStr = " - failed, type mismatch."; @@ -93,7 +72,7 @@ } } - private void evaluateStdoutContents(int index, ProcessResult pr) { + private void evaluateStdoutContents(String testStr, ProcessResult pr) { // Assert that the applet was initialized. Assert.assertTrue("JSToJGetTest stdout should contain \"" + initStr + "\" but it didn't.", pr.stdout.contains(initStr)); @@ -103,9 +82,9 @@ + "\" but it didn't.", pr.stdout.contains(setupStr)); // Assert that the tests have passed. - String s0 = outputStrings[index] + passStr; - String s1 = outputStrings[index] + failValStr; - String s2 = outputStrings[index] + failTypeStr; + String s0 = testStr + passStr; + String s1 = testStr + failValStr; + String s2 = testStr + failTypeStr; String s3 = "Error on Java side"; int ind0 = pr.stdout.indexOf(s0); @@ -119,7 +98,7 @@ indBegin = 0; } - String failStr = "JSToJGet " + outputStrings[index] + String failStr = "JSToJGet " + testStr + ": \"passed\" not found in the applet stdout, which is: " + pr.stdout.substring(indBegin, pr.stdout.length()); @@ -138,7 +117,7 @@ } if (ind3 != -1) { - failStr = "JSToJGet: " + outputStrings[index] + failStr = "JSToJGet: " + testStr + pr.stdout.substring(ind3, pr.stdout.length()); } @@ -149,13 +128,13 @@ } - private void genericJSToJavaGetTestMethod(int index) throws Exception { + private void jsToJavaGetTest(String urlEnd, String testStr) throws Exception { - String strURL = "/JSToJGet.html?" + testNames[index]; + String strURL = "/JSToJGet.html?" + urlEnd; ProcessResult pr = server.executeBrowser(strURL, new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); - evaluateStdoutContents(index, pr); + evaluateStdoutContents(testStr, pr); } @@ -163,147 +142,147 @@ @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_int_Test() throws Exception { - genericJSToJavaGetTestMethod(0); + jsToJavaGetTest("int", "Test no. 1 - (int)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_double_Test() throws Exception { - genericJSToJavaGetTestMethod(1); + jsToJavaGetTest("double", "Test no. 2 - (double)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_float_Test() throws Exception { - genericJSToJavaGetTestMethod(2); + jsToJavaGetTest("float", "Test no. 3 - (float)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_long_Test() throws Exception { - genericJSToJavaGetTestMethod(3); + jsToJavaGetTest("long", "Test no. 4 - (long)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_boolean_Test() throws Exception { - genericJSToJavaGetTestMethod(4); + jsToJavaGetTest("boolean", "Test no. 5 - (boolean)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_char_Test() throws Exception { - genericJSToJavaGetTestMethod(5); + jsToJavaGetTest("char", "Test no. 6 - (char)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_byte_Test() throws Exception { - genericJSToJavaGetTestMethod(6); + jsToJavaGetTest("byte", "Test no. 7 - (byte)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_intArrayElement_Test() throws Exception { - genericJSToJavaGetTestMethod(7); + jsToJavaGetTest("intArrayElement", "Test no. 8 - (int[] - element access)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_intArrayBeyond_Test() throws Exception { - genericJSToJavaGetTestMethod(8); + jsToJavaGetTest("intArrayBeyond", "Test no. 9 - (int[] - beyond length)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_regularString_Test() throws Exception { - genericJSToJavaGetTestMethod(9); + jsToJavaGetTest("regularString", "Test no.10 - (regular string)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_specialCharsString_Test() throws Exception { - genericJSToJavaGetTestMethod(10); + jsToJavaGetTest("specialCharsString", "Test no.11 - (string with special characters)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_null_Test() throws Exception { - genericJSToJavaGetTestMethod(11); + jsToJavaGetTest("null", "Test no.12 - (null)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_Integer_Test() throws Exception { - genericJSToJavaGetTestMethod(12); + jsToJavaGetTest("Integer", "Test no.13 - (Integer)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_Double_Test() throws Exception { - genericJSToJavaGetTestMethod(13); + jsToJavaGetTest("Double", "Test no.14 - (Double)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_Float_Test() throws Exception { - genericJSToJavaGetTestMethod(14); + jsToJavaGetTest("Float", "Test no.15 - (Float)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_Long_Test() throws Exception { - genericJSToJavaGetTestMethod(15); + jsToJavaGetTest("Long", "Test no.16 - (Long)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_Boolean_Test() throws Exception { - genericJSToJavaGetTestMethod(16); + jsToJavaGetTest("Boolean", "Test no.17 - (Boolean)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_Character_Test() throws Exception { - genericJSToJavaGetTestMethod(17); + jsToJavaGetTest("Character", "Test no.18 - (Character)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_Byte_Test() throws Exception { - genericJSToJavaGetTestMethod(18); + jsToJavaGetTest("Byte", "Test no.19 - (Byte)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_DoubleArrayElement_Test() throws Exception { - genericJSToJavaGetTestMethod(19); + jsToJavaGetTest("DoubleArrayElement", "Test no.20 - (Double[] - element access)"); } @Test @TestInBrowsers(testIn = { Browsers.all }) @NeedsDisplay public void AppletJSToJGet_DoubleFullArray_Test() throws Exception { - genericJSToJavaGetTestMethod(20); + jsToJavaGetTest("DoubleFullArray", "Test no.21 - (Double[] - full array)"); } } From ptisnovs at icedtea.classpath.org Mon Oct 15 05:42:16 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 15 Oct 2012 12:42:16 +0000 Subject: /hg/rhino-tests: Make the test src/org/RhinoTests/InvocableClass... Message-ID: changeset a34c578cc02b in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=a34c578cc02b author: Pavel Tisnovsky date: Mon Oct 15 14:44:52 2012 +0200 Make the test src/org/RhinoTests/InvocableClassTest.java compatible with JDK 7. diffstat: ChangeLog | 5 ++ src/org/RhinoTests/InvocableClassTest.java | 63 ++++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 8 deletions(-) diffs (165 lines): diff -r abe703a3501c -r a34c578cc02b ChangeLog --- a/ChangeLog Fri Oct 12 09:27:16 2012 +0200 +++ b/ChangeLog Mon Oct 15 14:44:52 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-15 Pavel Tisnovsky + + * src/org/RhinoTests/InvocableClassTest.java: + Make this test compatible with JDK 7. + 2012-10-12 Pavel Tisnovsky * src/org/RhinoTests/InvocableClassTest.java: diff -r abe703a3501c -r a34c578cc02b src/org/RhinoTests/InvocableClassTest.java --- a/src/org/RhinoTests/InvocableClassTest.java Fri Oct 12 09:27:16 2012 +0200 +++ b/src/org/RhinoTests/InvocableClassTest.java Mon Oct 15 14:44:52 2012 +0200 @@ -43,6 +43,8 @@ import java.util.Arrays; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.HashMap; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -66,7 +68,7 @@ /** * Object that represents the type of Invocable. */ - Class invocableClass = null; + Class invocableClass = null; @Override protected void setUp(String[] args) { @@ -194,7 +196,7 @@ * Test for method javax.script.Invocable.getClass().getInterfaces() */ protected void testGetInterfaces() { - List interfaces = Arrays.asList(this.invocableClass.getInterfaces()); + List> interfaces = Arrays.asList(this.invocableClass.getInterfaces()); assertTrue(interfaces.isEmpty(), "list of implemented interfaces should be empty"); } @@ -262,7 +264,7 @@ * Test for method javax.script.Invocable.getClass().getSuperclass() */ protected void testGetSuperclass() { - Class superClass = this.invocableClass.getSuperclass(); + Class superClass = this.invocableClass.getSuperclass(); assertNull(superClass, "Method Invocable.getClass().getSuperclass() does not return null"); } @@ -271,16 +273,42 @@ * Test for method javax.script.Invocable.getClass().getConstructors() */ protected void testGetConstructors() { - Constructor[] constructors = this.invocableClass.getConstructors(); + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all constructors for this class + Constructor[] constructors = this.invocableClass.getConstructors(); + + // basic check for a number of constructors assertEquals(constructors.length, 0, "no constructors should be set"); + } /** * Test for method javax.script.Invocable.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - Constructor[] constructors = this.invocableClass.getDeclaredConstructors(); - assertEquals(constructors.length, 0, "no constructors should be set"); + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all declared constructors for this class + Constructor[] declaredConstructors = this.invocableClass.getDeclaredConstructors(); + + // basic check for a number of declared constructors + assertEquals(declaredConstructors.length, 0, "no constructors should be set"); + } /** @@ -330,12 +358,20 @@ */ protected void testGetMethods() { // following methods should be inherited - final String[] methodsThatShouldExists = { + final String[] methodsThatShouldExists_jdk6 = { "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)", "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)", "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", }; + + final String[] methodsThatShouldExists_jdk7 = { + "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)", + "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)", + "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", + "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", + }; + // get all inherited methods Method[] methods = this.invocableClass.getMethods(); // and transform the array into a list of method names @@ -343,6 +379,7 @@ for (Method method : methods) { methodsAsString.add(method.toString()); } + String[] methodsThatShouldExists = getJavaVersion() < 7 ? methodsThatShouldExists_jdk6 : methodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : methodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), @@ -355,12 +392,20 @@ */ protected void testGetDeclaredMethods() { // following methods should be declared - final String[] declaredMethodsThatShouldExists = { + final String[] declaredMethodsThatShouldExists_jdk6 = { "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)", "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)", "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", }; + + final String[] declaredMethodsThatShouldExists_jdk7 = { + "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)", + "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)", + "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", + "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", + }; + // get all declared methods Method[] declaredMethods = this.invocableClass.getDeclaredMethods(); // and transform the array into a list of method names @@ -368,6 +413,7 @@ for (Method method : declaredMethods) { methodsAsString.add(method.toString()); } + String[] declaredMethodsThatShouldExists = getJavaVersion() < 7 ? declaredMethodsThatShouldExists_jdk6 : declaredMethodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : declaredMethodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), @@ -378,6 +424,7 @@ /** * Test for instanceof operator applied to a class javax.script.Invocable */ + @SuppressWarnings("cast") protected void testInstanceOf() { // tested object Object o = (Invocable)(new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript)); From jfabriko at redhat.com Mon Oct 15 06:03:42 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Mon, 15 Oct 2012 15:03:42 +0200 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "overloaded function resolution" tests Message-ID: <507C09AE.1020706@redhat.com> 2012-10-15 Jana Fabrikova * /tests/reproducers/simple/JSToJFuncResol: adding a new reproducer for the fifth LiveConnect test (Tests for overloaded function resolution when calling Java functions from JS.) I would like to ask for review of the attached patch, thank you, Jana -------------- next part -------------- A non-text attachment was scrubbed... Name: adding_JSToJFuncResol_reproducer.patch Type: text/x-patch Size: 31940 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121015/ca7fb5d8/adding_JSToJFuncResol_reproducer.patch From gnu.andrew at redhat.com Mon Oct 15 06:17:00 2012 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Mon, 15 Oct 2012 09:17:00 -0400 (EDT) Subject: [1.10, 1.11, 2.1 & 2.2 APPROVAL] jar uf support broken with 7143606 security fix Message-ID: <1952139586.103859.1350307020257.JavaMail.root@redhat.com> See http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-June/010712.html which applied the fix to 8 and 7u6 (thus the fix is in 2.3). The jar bug rears its head in OpenJDK builds as HotSpot updates sa-jdi.jar with a service META-INF file, changing its permissions to 600. It's pretty simple to replicate with any old jar file: $ jar cf crap.jar crap $ ll crap.jar -rw-r--r-- 1 andrew staff 924 Oct 15 14:03 crap.jar $ /mnt/builder/jdk6/j2sdk-image/bin/jar uf crap.jar -C /mnt/builder/icedtea6-1.11/openjdk/hotspot/agent/src/share/classes META-INF/services/com.sun.jdi.connect.Connector $ ll crap.jar -rw------- 1 andrew staff 1.2K Oct 15 14:04 crap.jar Whoops! For 1.10 & 1.11, we can "fix" this by simply dropping the native2ascii & jar parts of that security fix. For 6-HEAD, 2.1 & 2.2, those parts of the patch actually need to be reverted. I'll also push the 6 fix upstream to OpenJDK6. Ok for 1.10, 1.11, 2.1 & 2.2? -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From ptisnovs at icedtea.classpath.org Mon Oct 15 06:28:20 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 15 Oct 2012 13:28:20 +0000 Subject: /hg/gfx-test: 12 new tests added to the test suite Message-ID: changeset f41d0e01c82e in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=f41d0e01c82e author: Pavel Tisnovsky date: Mon Oct 15 15:31:06 2012 +0200 12 new tests added to the test suite src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java | 189 ++++++++++++- 2 files changed, 193 insertions(+), 1 deletions(-) diffs (219 lines): diff -r 851bc51b042a -r f41d0e01c82e ChangeLog --- a/ChangeLog Fri Oct 12 10:00:21 2012 +0200 +++ b/ChangeLog Mon Oct 15 15:31:06 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-15 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java: + 12 new tests added to this test suite. + 2012-10-12 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltCropImage.java: diff -r 851bc51b042a -r f41d0e01c82e src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java --- a/src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java Fri Oct 12 10:00:21 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java Mon Oct 15 15:31:06 2012 +0200 @@ -40,7 +40,15 @@ package org.gfxtest.testsuites; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + + + +import org.gfxtest.framework.CommonBitmapOperations; import org.gfxtest.framework.PrintTest; +import org.gfxtest.framework.TestImage; +import org.gfxtest.framework.TestResult; import org.gfxtest.framework.annotations.BitBltOperation; import org.gfxtest.framework.annotations.BitBltOperations; import org.gfxtest.framework.annotations.GraphicsPrimitive; @@ -69,7 +77,186 @@ @Zoom(1) public class PrintTestBitBltMirrorImage extends PrintTest { - + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_BYTE_BINARY. + * No flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryNoFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, false, false); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_BYTE_BINARY. + * Horizontal flip is performed on that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryHorizontalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, true, false); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_BYTE_BINARY. + * Vertical flip is performed on that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, false, true); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_BYTE_BINARY. + * Horizontal and vertical flips are performed on that image.. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryHorizontalAndVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, true, true); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_RGB. + * No flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBNoFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, false, false); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_RGB. + * Horizontal flip is performed on that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBHorizontalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, true, false); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_RGB. + * Vertical flip is performed on that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, false, true); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_RGB. + * Horizontal and vertical flips are performed on that image.. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBHorizontalAndVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, true, true); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_BGR. + * No flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntBGRNoFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_BGR, false, false); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_BGR. + * Horizontal flip is performed on that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntBGRHorizontalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_BGR, true, false); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_BGR. + * Vertical flip is performed on that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntBGRVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_BGR, false, true); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_BGR. + * Horizontal and vertical flips are performed on that image.. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntBGRHorizontalAndVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_BGR, true, true); + } + /** * Entry point to the test suite. * From ahughes at redhat.com Mon Oct 15 06:36:59 2012 From: ahughes at redhat.com (Andrew Hughes) Date: Mon, 15 Oct 2012 09:36:59 -0400 (EDT) Subject: [1.10, 1.11, 2.1 & 2.2 APPROVAL] jar uf support broken with 7143606 security fix In-Reply-To: <1952139586.103859.1350307020257.JavaMail.root@redhat.com> Message-ID: <1401479617.122151.1350308219633.JavaMail.root@redhat.com> ----- Original Message ----- > See > http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-June/010712.html > which applied the fix to 8 and 7u6 (thus the fix is in 2.3). > > The jar bug rears its head in OpenJDK builds as HotSpot updates > sa-jdi.jar with > a service META-INF file, changing its permissions to 600. It's > pretty simple > to replicate with any old jar file: > > $ jar cf crap.jar crap > $ ll crap.jar > -rw-r--r-- 1 andrew staff 924 Oct 15 14:03 crap.jar > $ /mnt/builder/jdk6/j2sdk-image/bin/jar uf crap.jar -C > /mnt/builder/icedtea6-1.11/openjdk/hotspot/agent/src/share/classes > META-INF/services/com.sun.jdi.connect.Connector > $ ll crap.jar > -rw------- 1 andrew staff 1.2K Oct 15 14:04 crap.jar > > Whoops! > > For 1.10 & 1.11, we can "fix" this by simply dropping the > native2ascii & jar parts > of that security fix. For 6-HEAD, 2.1 & 2.2, those parts of the > patch actually need > to be reverted. I'll also push the 6 fix upstream to OpenJDK6. > > Ok for 1.10, 1.11, 2.1 & 2.2? > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > PGP Key: 248BDC07 (https://keys.indymedia.org/) > Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 > > Even better, they are already in 6 too: http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/2366192c7fcb http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/0e34d4326386 So we just need these changesets in 1.10 & 1.11. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From bugzilla-daemon at icedtea.classpath.org Mon Oct 15 09:29:13 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Oct 2012 16:29:13 +0000 Subject: [Bug 1195] New: Fatal Error JRE SIGSEGV (0xb) at pc=0x00007f5c685a8733, pid=5741, tid=140034866603776 JRE version: 7.0_06 Java VM: OpenJDK 64-Bit Server VM (23.2-b09 mixed mode linux-amd64 compressed oops) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1195 Priority: P3 Bug ID: 1195 CC: unassigned at icedtea.classpath.org Assignee: gnu.andrew at redhat.com Summary: Fatal Error JRE SIGSEGV (0xb) at pc=0x00007f5c685a8733, pid=5741, tid=140034866603776 JRE version: 7.0_06 Java VM: OpenJDK 64-Bit Server VM (23.2-b09 mixed mode linux-amd64 compressed oops) Severity: blocker Classification: Unclassified OS: Linux Reporter: ignace.bienville at gmail.com Hardware: x86_64 Status: NEW Version: 7-1.7 Component: IcedTea Product: IcedTea Created attachment 774 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=774&action=edit Core Error Dump # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f5c685a8733, pid=5741, tid=140034866603776 # # JRE version: 7.0_06 # Java VM: OpenJDK 64-Bit Server VM (23.2-b09 mixed mode linux-amd64 compressed oops) # Problematic frame: # C [librxtxSerial.so+0x7733] Java_gnu_io_RXTXPort_nativeDrain+0xc3 # # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /home/ignace/WorkSpace/Eclipse/Envoi SMS via Commande AT/hs_err_pid5741.log # # If you would like to submit a bug report, please include # instructions on how to reproduce the bug and visit: # http://icedtea.classpath.org/bugzilla # ./EnvoiSMSAT.sh : ligne 2 : 5741 Abandon (core dumped)java -Djava.library.path=./lib/ -jar EnvoiSMSAT.jar -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121015/2046588a/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Oct 15 09:32:11 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Oct 2012 16:32:11 +0000 Subject: [Bug 1195] Fatal Error JRE SIGSEGV (0xb) at pc=0x00007f5c685a8733, pid=5741, tid=140034866603776 JRE version: 7.0_06 Java VM: OpenJDK 64-Bit Server VM (23.2-b09 mixed mode linux-amd64 compressed oops) In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1195 --- Comment #1 from Ignace BIENVILLE --- Created attachment 775 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=775&action=edit Executable JAR file launcher : java -Djava.library.path=./lib/ -jar EnvoiSMSAT.jar -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121015/fc2447c9/attachment.html From omajid at redhat.com Mon Oct 15 10:39:20 2012 From: omajid at redhat.com (Omair Majid) Date: Mon, 15 Oct 2012 13:39:20 -0400 Subject: Icedtea-web splashscreen implementation In-Reply-To: <50291A05.1080606@redhat.com> References: <501928CB.4090002@redhat.com> <5019354B.3020100@redhat.com> <501983CD.4080405@redhat.com> <5020D6D8.6050302@redhat.com> <5021400A.1050804@redhat.com> <50291A05.1080606@redhat.com> Message-ID: <507C4A48.2020404@redhat.com> Hi Jiri, Sorry for the long delay in reviewing this. On 08/13/2012 11:15 AM, Jiri Vanek wrote: > Attached is patch with integration "adapted for head" Comments in-line below. > + synchronized (mutex) { Please consider renaming 'mutex' to indicate what code it is making mutually exclusive. > + try { > + SwingUtilities.invokeAndWait(new Runnable() { > > - splashScreen.setSplashImageURL(splashImageURL); > + @Override > + public void run() { > + splashScreen = new JNLPSplashScreen(resourceTracker, file); > + } > + }); > + } catch (InterruptedException ie) { > + // Wait till splash screen is created > + while (splashScreen == null); > + } catch (InvocationTargetException ite) { > + ite.printStackTrace(); > } > + try { > + SwingUtilities.invokeAndWait(new Runnable() { > + > + @Override > + public void run() { > + splashScreen.setSplashImageURL(splashImageURL); > + } > + }); > + } catch (InterruptedException ie) { > + // Wait till splash screen is created > + while (splashScreen == null); This doesn't make sense to me. The variable would have bee initialized in the previous try block. If it didn't (say an invocation exception was thrown in the previous try block and this try block throws an interrupted exception), than this will cause an infinite loop. > + // Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); > + // setLocation((screenSize.width - minimumWidth) / 2, > + // (screenSize.height - minimumHeight) / 2); > + //Above works always, but center only to middle of all monitors > + //below works on 1.4 and higher, and center to middle of primary monmtor Please remove the commented out code. The comment by itself should be enough: // center to middle of primary monitor > + setLocationRelativeTo(null); > } Also, is it possible to center to monitor where the application was started (as opposed to the primary monitor)? > + AppletInstance applet = null; > try { > - AppletInstance applet = createApplet(file, enableCodeBase, cont); > + applet = createApplet(file, enableCodeBase, cont); > applet.initialize(); > > applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance > return applet; > } catch (LaunchException lex) { > + SplashUtils.showErrorCaught(lex, applet); Please consider letting LaunchHander (or some new interface) handle this without invoking SplashUtils directly. It just adds extra code everywhere we want to handle exceptions. It's easy for a programmer to miss it. > - protected AppletInstance createApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException { > + protected synchronized AppletInstance createApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException { > + // appletInstance is needed by ServiceManager when looking up > + // services. This could potentially be done in applet constructor > + // so initialize appletInstance before creating applet. I dont know if it's supported. The docs state that methods like getAppletContext may not work before init() is invoked. I would expect services to be unavailable too: http://docs.oracle.com/javase/6/docs/api/java/applet/Applet.html#Applet() > + AppletInstance appletInstance = null; > + ThreadGroup group = Thread.currentThread().getThreadGroup(); > try { > JNLPClassLoader loader = JNLPClassLoader.getInstance(file, updatePolicy); > > if (enableCodeBase) { > loader.enableCodeBase(); > } else if (file.getResources().getJARs().length == 0) { > - throw new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later"); > + Exception ex = new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later"); > + try { > + SplashUtils.showError(ex, new AppletEnvironment(file, new AppletInstance(file, group, new ClassLoader() { > + }, null))); > + } catch (Exception exx) { > + if (JNLPRuntime.isDebug()) { > + exx.printStackTrace(); > + } > + } > + throw ex; > } > > - ThreadGroup group = Thread.currentThread().getThreadGroup(); > - > - // appletInstance is needed by ServiceManager when looking up > - // services. This could potentially be done in applet constructor > - // so initialize appletInstance before creating applet. > - AppletInstance appletInstance; Ah, you just moved this code to the beginning of the function. Never mind the comment above. > diff -r a86af88a8ecd plugin/icedteanp/java/sun/applet/PluginAppletViewer.java > --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Mon Aug 13 15:52:03 2012 +0200 > +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Mon Aug 13 16:52:21 2012 +0200 I am not very familiar with this code. Another set of eyes will be appreciated! > appletFrame.appletEventListener = new AppletEventListener(appletFrame, appletFrame); > panel.addAppletListener(appletFrame.appletEventListener); > + // Clear bindings, if any "Bindings" ? > + if (applets.containsKey(identifier)) { > + PluginAppletViewer oldFrame = applets.get(identifier); > + oldFrame.remove(panel); > + panel.removeAppletListener(oldFrame.appletEventListener); > + } > @@ -383,9 +401,107 @@ > }; > > addWindowListener(windowEventListener); > + final AppletPanel fPanel = panel; > + try { > + SwingUtilities.invokeAndWait(new Runnable() { > + > + public void run() { > + add("Center", fPanel); > + fPanel.setVisible(false); > + > + splashPanel = SplashUtils.getSplashScreen(fPanel.getWidth(), fPanel.getHeight()); > + if (splashPanel != null) { > + splashPanel.startAnimation(); > + PluginDebug.debug("Added splash " + splashPanel); > + add("Center", splashPanel.getSplashComponent()); > + } > + pack(); > + } > + }); > + } catch (Exception e) { > + e.printStackTrace(); // Not much we can do other and print s/and/than > + } > > } > > + public void replaceSplash(final SplashPanel newSplash) { > + // Loading done. Remove splash screen. > + if (splashPanel == null) { > + return; > + } > + if (newSplash == null) { > + removeSplash(); > + return; > + } > + splashPanel.stopAnimation(); stopAnimation is called here. > + try { > + SwingUtilities.invokeAndWait(new Runnable() { > + > + public void run() { > + splashPanel.getSplashComponent().setVisible(false); > + splashPanel.stopAnimation(); And here. What gives? > + remove(splashPanel.getSplashComponent()); > + newSplash.setPercentage(splashPanel.getPercentage()); > + newSplash.setSplashWidth(splashPanel.getSplashWidth()); > + newSplash.setSplashHeight(splashPanel.getSplashHeight()); > + newSplash.adjustForSize(); > + splashPanel = newSplash; > + add("Center", splashPanel.getSplashComponent()); > + pack(); > + } > + }); > + } catch (Exception e) { > + e.printStackTrace(); // Not much we can do other and print s/and/than > + } > + } > + > + @Override > + public void removeSplash() { > + > + // Loading done. Remove splash screen. > + if (splashPanel == null) { > + return; > + } > + splashPanel.stopAnimation(); > + try { > + SwingUtilities.invokeAndWait(new Runnable() { > + > + public void run() { > + splashPanel.getSplashComponent().setVisible(false); > + splashPanel.stopAnimation(); stopAnimation is called twice here too. > * the parent class's update() just does a couple of checks (both of > * which are accounted for) and then calls paint anyway. > */ > - public void update(Graphics g) { > + public void paint(Graphics g) { > > // If the image or the graphics don't exist, create new ones > if (bufFrameImg == null || bufFrameImgGraphics == null) { > @@ -2112,11 +2248,18 @@ > } > > // Paint off-screen > - paint(bufFrameImgGraphics); > + for (Component c: this.getComponents()) { > + c.update(bufFrameImgGraphics); This should be c.paint(), no? But perhaps a better approach would be to only override paintComponent() method in this class, and not paint()/update(). Cheers, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From bugzilla-daemon at icedtea.classpath.org Mon Oct 15 13:42:04 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Oct 2012 20:42:04 +0000 Subject: [Bug 1186] System.getProperty("deployment.user.security.trusted.cacerts") is null In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1186 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|dbhole at redhat.com |adomurad at redhat.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121015/c8a6cab5/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Oct 15 13:58:11 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 15 Oct 2012 20:58:11 +0000 Subject: [Bug 1186] System.getProperty("deployment.user.security.trusted.cacerts") is null In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1186 Omair Majid changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |omajid at redhat.com --- Comment #1 from Omair Majid --- Patch and tests in this thread: http://thread.gmane.org/gmane.comp.java.openjdk.distro-packaging.devel/20348/focus=20427 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121015/714b47e8/attachment.html From omajid at redhat.com Mon Oct 15 14:24:14 2012 From: omajid at redhat.com (Omair Majid) Date: Mon, 15 Oct 2012 17:24:14 -0400 Subject: [1.10, 1.11, 2.1 & 2.2 APPROVAL] jar uf support broken with 7143606 security fix In-Reply-To: <1401479617.122151.1350308219633.JavaMail.root@redhat.com> References: <1401479617.122151.1350308219633.JavaMail.root@redhat.com> Message-ID: <507C7EFE.5040800@redhat.com> On 10/15/2012 09:36 AM, Andrew Hughes wrote: > Even better, they are already in 6 too: > > http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/2366192c7fcb > http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/0e34d4326386 > > So we just need these changesets in 1.10 & 1.11. > If the original jar had locked down permissions, will the 'updated' jar now have more relaxed permissions? But I suppose this is how the jar command has always behaved. We don't know how much testing has been done on this, do we? Looking at the test case, it wont even compile: it uses PosixFilePermission (added in 1.7) and try-with-resources. Cheers, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at redhat.com Mon Oct 15 14:30:55 2012 From: omajid at redhat.com (Omair Majid) Date: Mon, 15 Oct 2012 17:30:55 -0400 Subject: [1.10, 1.11, 2.1 & 2.2 APPROVAL] jar uf support broken with 7143606 security fix In-Reply-To: <1952139586.103859.1350307020257.JavaMail.root@redhat.com> References: <1952139586.103859.1350307020257.JavaMail.root@redhat.com> Message-ID: <507C808F.1090001@redhat.com> On 10/15/2012 09:17 AM, Andrew Hughes wrote: For 6-HEAD, 2.1 & 2.2, those parts of the patch actually need > to be reverted. When you say reverted, do you intend to pull this changeset [1] or actually revert the original patch? Either way, the fix looks okay to me - it's just reverting to the old behaviour. Cheers, Omair [1] http://hg.openjdk.java.net/jdk8/tl/jdk/rev/819258b5002e -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From adomurad at redhat.com Mon Oct 15 14:32:35 2012 From: adomurad at redhat.com (Adam Domurad) Date: Mon, 15 Oct 2012 17:32:35 -0400 Subject: [icedtea-web] Potential ClosingListener bug? Message-ID: <507C80F3.1080704@redhat.com> (For Jiri primarily, but posted on list for potential discussion's sake.) Hi Jiri. I am running into strange troubles with the attached patch. The troubles is with the new patch I get: FAILED: launchInternalClassloaderWithDownloadedResourceAsHtmlAppletHack - firefox(InternalClassloaderWithDownloadedResourceTest) Stdout should contain `Good simple javaws exapmle` but didn't The problem goes away when I remove the ClosingListener on launchInternalClassloaderWithDownloadedResourceAsHtmlAppletHack. With the closinglistener: Closing listener matches 'Good simple javaws exapmle' as it should, however the output log prints before this message. The output is cut off before this match. Increasing the 'assassin process' delay a lot didnt seem to help. Without: Acts as intended. I'm not sure why this could be happening, could you tell me if you have all tests pass with the applied patch ? (this was with Fedora16+java7+firefox). Thanks, - Adam -------------- next part -------------- A non-text attachment was scrubbed... Name: possible-bug.patch Type: text/x-patch Size: 6656 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121015/c09735ba/possible-bug.patch From gnu.andrew at redhat.com Mon Oct 15 16:28:23 2012 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Mon, 15 Oct 2012 19:28:23 -0400 (EDT) Subject: [1.10, 1.11, 2.1 & 2.2 APPROVAL] jar uf support broken with 7143606 security fix In-Reply-To: <507C7EFE.5040800@redhat.com> Message-ID: <971062064.596884.1350343703045.JavaMail.root@redhat.com> ----- Original Message ----- > On 10/15/2012 09:36 AM, Andrew Hughes wrote: > > Even better, they are already in 6 too: > > > > http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/2366192c7fcb > > http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/0e34d4326386 > > > > So we just need these changesets in 1.10 & 1.11. > > > > If the original jar had locked down permissions, will the 'updated' > jar > now have more relaxed permissions? But I suppose this is how the jar > command has always behaved. > It's already in 2.3. The updated jar has the permissions the original jar had. They don't suddenly change behind the user's back. > We don't know how much testing has been done on this, do we? Looking > at > the test case, it wont even compile: it uses PosixFilePermission > (added > in 1.7) and try-with-resources. I'll look into this. The changesets are from 6 so this is Oracle's screw-up. > > Cheers, > Omair > > -- > PGP Key: 66484681 (http://pgp.mit.edu/) > Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From gnu.andrew at redhat.com Mon Oct 15 16:34:31 2012 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Mon, 15 Oct 2012 19:34:31 -0400 (EDT) Subject: [1.10, 1.11, 2.1 & 2.2 APPROVAL] jar uf support broken with 7143606 security fix In-Reply-To: <971062064.596884.1350343703045.JavaMail.root@redhat.com> Message-ID: <1769471410.597267.1350344071570.JavaMail.root@redhat.com> ----- Original Message ----- > > > ----- Original Message ----- > > On 10/15/2012 09:36 AM, Andrew Hughes wrote: > > > Even better, they are already in 6 too: > > > > > > http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/2366192c7fcb > > > http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/0e34d4326386 > > > > > > So we just need these changesets in 1.10 & 1.11. > > > > > > > If the original jar had locked down permissions, will the 'updated' > > jar > > now have more relaxed permissions? But I suppose this is how the > > jar > > command has always behaved. > > > > It's already in 2.3. > > The updated jar has the permissions the original jar had. They don't > suddenly change behind the user's back. > > > We don't know how much testing has been done on this, do we? > > Looking > > at > > the test case, it wont even compile: it uses PosixFilePermission > > (added > > in 1.7) and try-with-resources. > > I'll look into this. The changesets are from 6 so this is Oracle's > screw-up. > Yeah, as I thought I remembered, they spotted the screw-up in rolling b26: http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/0abac47de6d1 I'll add that too. > > > > Cheers, > > Omair > > > > -- > > PGP Key: 66484681 (http://pgp.mit.edu/) > > Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 > > > > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > PGP Key: 248BDC07 (https://keys.indymedia.org/) > Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 > > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From bugzilla-daemon at icedtea.classpath.org Tue Oct 16 00:25:39 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 16 Oct 2012 07:25:39 +0000 Subject: [Bug 899] Internal Error (c1_Optimizer.cpp:271) In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=899 --- Comment #2 from earias at idecnet.com --- I upgraded both, Tomcat an Project.net and now I do not get this error. Maybe it is better to close the report? -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121016/618ee7e6/attachment.html From jfabriko at redhat.com Tue Oct 16 03:53:40 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Tue, 16 Oct 2012 12:53:40 +0200 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "type conversion" tests Message-ID: <507D3CB4.6070605@redhat.com> 2012-10-16 Jana Fabrikova * /tests/reproducers/simple/JSToJTypeConv: adding a new reproducer for the sixth LiveConnect test (Tests for data type conversion from JS to Java variables.) I would like to ask for review of the attached patch, thank you, Jana -------------- next part -------------- A non-text attachment was scrubbed... Name: adding_JSToJTypeConv_reproducer.patch Type: text/x-patch Size: 63240 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121016/5f100041/adding_JSToJTypeConv_reproducer.patch From ptisnovs at icedtea.classpath.org Tue Oct 16 04:10:29 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 16 Oct 2012 11:10:29 +0000 Subject: /hg/rhino-tests: Added five new tests to the test suite Message-ID: changeset 0a793f171324 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=0a793f171324 author: Pavel Tisnovsky date: Tue Oct 16 13:13:13 2012 +0200 Added five new tests to the test suite src/org/RhinoTests/ScriptContextClassTest.java. diffstat: ChangeLog | 5 ++ src/org/RhinoTests/ScriptContextClassTest.java | 54 ++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 0 deletions(-) diffs (76 lines): diff -r a34c578cc02b -r 0a793f171324 ChangeLog --- a/ChangeLog Mon Oct 15 14:44:52 2012 +0200 +++ b/ChangeLog Tue Oct 16 13:13:13 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-16 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptContextClassTest.java: + Added five new tests to this test suite. + 2012-10-15 Pavel Tisnovsky * src/org/RhinoTests/InvocableClassTest.java: diff -r a34c578cc02b -r 0a793f171324 src/org/RhinoTests/ScriptContextClassTest.java --- a/src/org/RhinoTests/ScriptContextClassTest.java Mon Oct 15 14:44:52 2012 +0200 +++ b/src/org/RhinoTests/ScriptContextClassTest.java Tue Oct 16 13:13:13 2012 +0200 @@ -136,6 +136,60 @@ } /** + * Test for method javax.script.ScriptContext.getClass().isAnnotation() + */ + protected void testIsAnnotation() { + assertFalse(this.scriptContextClass.isAnnotation(), + "Method ScriptContext.getClass().isAnnotation() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptContext.getClass().isAnnotationPresent() + */ + protected void testIsAnnotationPresent() { + assertFalse(this.scriptContextClass.isAnnotationPresent(java.lang.annotation.Annotation.class), + "Method ScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value"); + assertFalse(this.scriptContextClass.isAnnotationPresent(java.lang.annotation.Documented.class), + "Method ScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value"); + assertFalse(this.scriptContextClass.isAnnotationPresent(java.lang.annotation.Inherited.class), + "Method ScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value"); + assertFalse(this.scriptContextClass.isAnnotationPresent(java.lang.annotation.Retention.class), + "Method ScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value"); + assertFalse(this.scriptContextClass.isAnnotationPresent(java.lang.annotation.Target.class), + "Method ScriptContext.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value"); + assertFalse(this.scriptContextClass.isAnnotationPresent(java.lang.Deprecated.class), + "Method ScriptContext.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value"); + assertFalse(this.scriptContextClass.isAnnotationPresent(java.lang.Override.class), + "Method ScriptContext.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value"); + assertFalse(this.scriptContextClass.isAnnotationPresent(java.lang.SuppressWarnings.class), + "Method ScriptContext.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value"); + } + + /** + * Test for method javax.script.ScriptContext.getClass().isAnonymousClass() + */ + protected void testIsAnonymousClass() { + assertFalse(this.scriptContextClass.isAnonymousClass(), + "Method ScriptContext.getClass().isAnonymousClass() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptContext.getClass().isArray() + */ + protected void testIsArray() { + assertFalse(this.scriptContextClass.isArray(), + "Method ScriptContext.getClass().isArray() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptContext.getClass().isEnum() + */ + protected void testIsEnum() { + assertFalse(this.scriptContextClass.isEnum(), + "Method ScriptContext.getClass().isEnum() returns wrong value"); + } + + /** * Test for method javax.script.ScriptContext.getClass().getInterfaces() */ protected void testGetInterfaces() { From helpcrypto at gmail.com Tue Oct 16 04:24:59 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Tue, 16 Oct 2012 13:24:59 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: <5075BE35.5050502@redhat.com> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <5075BE35.5050502@redhat.com> Message-ID: Hello again. Considering the bug resolved (I havent downloaded source+patch), I have continued with testing. Now, I have detected an error? (not a crash) when using JSObject, that differs from 'official' oracle jre behaviour. public abstract class MyApplet extends Applet { public static Applet applet = null; @Override public void init() { applet = this; } public JSObject testFunction() { return AccessController.doPrivileged(new PrivilegedAction() { @Override public JSObject run() { JSObject win = JSObject.getWindow(applet); JSObject js = (JSObject) win.eval("new Object();"); //... js.setMember("code", 0); return js; } }); } } } On javascript side, invoking this way: var obj=applet.testFunction(); alert(obj.code); Doesn't work, and says undefined. obj is [object] and I cant enumerate properties using: var txt=''; for(var a in cert){ txt+='obj['+a+']='+obj[a]+'\n'; } alert(txt); The same code works on Oracle and obj.code==0 :) According to http://icedtea.classpath.org/wiki/IcedTea-Web, as Im using netscape.javascript.JSObject, I should add plugin.jar to my classpath when building, but it should work/run properly on pages. Any ideas? Should I add plugin.jar somewhere? Should I file another bug report? Thanks a lot for your help! From thomas at m3y3r.de Tue Oct 16 04:52:10 2012 From: thomas at m3y3r.de (Thomas Meyer) Date: Tue, 16 Oct 2012 13:52:10 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <5075BE35.5050502@redhat.com> Message-ID: <1350388330.1327.3.camel@localhost.localdomain> Am Dienstag, den 16.10.2012, 13:24 +0200 schrieb helpcrypto helpcrypto: > Hello again. > > Considering the bug resolved (I havent downloaded source+patch), I > have continued with testing. > Now, I have detected an error? (not a crash) when using JSObject, that > differs from 'official' oracle jre behaviour. > > public abstract class MyApplet extends Applet { > public static Applet applet = null; > @Override > public void init() { > applet = this; > } > public JSObject testFunction() { > return AccessController.doPrivileged(new PrivilegedAction() { > @Override > public JSObject run() { > JSObject win = JSObject.getWindow(applet); > JSObject js = (JSObject) win.eval("new Object();"); > //... > js.setMember("code", 0); > return js; > } > }); > } > } > } It is not possible to instantiate an abstract class! > > On javascript side, invoking this way: > var obj=applet.testFunction(); > alert(obj.code); > Doesn't work, and says undefined. obj is [object] and I cant enumerate > properties using: > var txt=''; > for(var a in cert){ > txt+='obj['+a+']='+obj[a]+'\n'; > } > alert(txt); > The same code works on Oracle and obj.code==0 :) > > According to http://icedtea.classpath.org/wiki/IcedTea-Web, as Im > using netscape.javascript.JSObject, I should add plugin.jar to my > classpath when building, but it should work/run properly on pages. > > Any ideas? Should I add plugin.jar somewhere? Should I file another bug report? > > Thanks a lot for your help! From helpcrypto at gmail.com Tue Oct 16 04:59:10 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Tue, 16 Oct 2012 13:59:10 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: <1350388330.1327.3.camel@localhost.localdomain> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <5075BE35.5050502@redhat.com> <1350388330.1327.3.camel@localhost.localdomain> Message-ID: It's a typo due to copy-paste, ignore that. Sorry! :S On Tue, Oct 16, 2012 at 1:52 PM, Thomas Meyer wrote: > Am Dienstag, den 16.10.2012, 13:24 +0200 schrieb helpcrypto helpcrypto: >> Hello again. >> >> Considering the bug resolved (I havent downloaded source+patch), I >> have continued with testing. >> Now, I have detected an error? (not a crash) when using JSObject, that >> differs from 'official' oracle jre behaviour. >> >> public abstract class MyApplet extends Applet { >> public static Applet applet = null; >> @Override >> public void init() { >> applet = this; >> } >> public JSObject testFunction() { >> return AccessController.doPrivileged(new PrivilegedAction() { >> @Override >> public JSObject run() { >> JSObject win = JSObject.getWindow(applet); >> JSObject js = (JSObject) win.eval("new Object();"); >> //... >> js.setMember("code", 0); >> return js; >> } >> }); >> } >> } >> } > > It is not possible to instantiate an abstract class! > >> >> On javascript side, invoking this way: >> var obj=applet.testFunction(); >> alert(obj.code); >> Doesn't work, and says undefined. obj is [object] and I cant enumerate >> properties using: >> var txt=''; >> for(var a in cert){ >> txt+='obj['+a+']='+obj[a]+'\n'; >> } >> alert(txt); >> The same code works on Oracle and obj.code==0 :) >> >> According to http://icedtea.classpath.org/wiki/IcedTea-Web, as Im >> using netscape.javascript.JSObject, I should add plugin.jar to my >> classpath when building, but it should work/run properly on pages. >> >> Any ideas? Should I add plugin.jar somewhere? Should I file another bug report? >> >> Thanks a lot for your help! > > > From helpcrypto at gmail.com Tue Oct 16 05:05:29 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Tue, 16 Oct 2012 14:05:29 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <5075BE35.5050502@redhat.com> <1350388330.1327.3.camel@localhost.localdomain> Message-ID: The problem, indeed, seems to be returning an [object] without ".code" attribute. ie: icedtea is not crashing but returning a bad-format object? From ptisnovs at icedtea.classpath.org Tue Oct 16 06:05:52 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 16 Oct 2012 13:05:52 +0000 Subject: /hg/gfx-test: New tests added to the test suite Message-ID: changeset 4b537533c9fe in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=4b537533c9fe author: Pavel Tisnovsky date: Tue Oct 16 15:08:28 2012 +0200 New tests added to the test suite src/org/gfxtest/testsuites/BitBltBasicTests.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltBasicTests.java | 165 +++++++++++++++++++++++ 2 files changed, 170 insertions(+), 0 deletions(-) diffs (187 lines): diff -r f41d0e01c82e -r 4b537533c9fe ChangeLog --- a/ChangeLog Mon Oct 15 15:31:06 2012 +0200 +++ b/ChangeLog Tue Oct 16 15:08:28 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-16 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltBasicTests.java: + New tests added to this test suite. + 2012-10-15 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java: diff -r f41d0e01c82e -r 4b537533c9fe src/org/gfxtest/testsuites/BitBltBasicTests.java --- a/src/org/gfxtest/testsuites/BitBltBasicTests.java Mon Oct 15 15:31:06 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltBasicTests.java Tue Oct 16 15:08:28 2012 +0200 @@ -1176,6 +1176,171 @@ } /** + * Test basic BitBlt operation for vertical stripes buffered image with type TYPE_INT_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageTypeIntRGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); + } + + /** + * Test basic BitBlt operation for vertical stripes buffered image with type TYPE_INT_BGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageTypeIntBGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_BGR); + } + + /** + * Test basic BitBlt operation for vertical stripes buffered image with type TYPE_INT_ARGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageTypeIntARGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); + } + + /** + * Test basic BitBlt operation for vertical stripes buffered image with type TYPE_INT_ARGB_PRE. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE); + } + + /** + * Test basic BitBlt operation for vertical stripes buffered image with type TYPE_4BYTE_ABGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR); + } + + /** + * Test basic BitBlt operation for vertical stripes buffered image with type TYPE_4BYTE_ABGR_PRE. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageType4ByteABGR_PRE(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE); + } + + /** + * Test basic BitBlt operation for vertical stripes buffered image with type TYPE_BYTE_GRAY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageTypeByteGray(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY); + } + + /** + * Test basic BitBlt operation for vertical stripes buffered image with type TYPE_USHORT_GRAY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageTypeUshortGray(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY); + } + + /** + * Test basic BitBlt operation for vertical stripes buffered image with type TYPE_USHORT_565_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageTypeUshort565RGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB); + } + + /** + * Test basic BitBlt operation for vertical stripes buffered image with type TYPE_USHORT_555_RGB. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageTypeUshort555RGB(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB); + } + + /** + * Test basic BitBlt operation for vertical stripes buffered image with type TYPE_3BYTE_BGR. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform basic BitBlt test. + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR); + } + + /** * Test basic BitBlt operation for diagonal stripes buffered image with type * TYPE_BYTE_BINARY. * From bugzilla-daemon at icedtea.classpath.org Tue Oct 16 06:33:02 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 16 Oct 2012 13:33:02 +0000 Subject: [Bug 1186] System.getProperty("deployment.user.security.trusted.cacerts") is null In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1186 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dbhole at redhat.com Assignee|adomurad at redhat.com |omajid at redhat.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121016/ecf85f93/attachment.html From danesh.d90 at gmail.com Tue Oct 16 07:51:58 2012 From: danesh.d90 at gmail.com (Danesh Dadachanji) Date: Tue, 16 Oct 2012 10:51:58 -0400 Subject: [icedtea-web][rfc] Update on Danesh's major rework of JarCertVerifier In-Reply-To: <507725CB.4030009@redhat.com> References: <1348585163.17801.24.camel@adomurad-desktop> <5075A1C7.1050402@redhat.com> <507725CB.4030009@redhat.com> Message-ID: On Thu, Oct 11, 2012 at 4:02 PM, Adam Domurad redhat.com > wrote: > Thanks for the review! > > Attached is an updated patch to the base patch by Danesh (with your > recommended changes + a change to JCV to use specific imports instead of > full-package imports). > >>> + public Map getJarSignableEntries() { >>> + return jarSignableEntries; >>> + } >> >> If untrusted code were able to invoke this method, would that compromise >> the security of the system? Should we be returning a mutable data >> structure here? > > > Changed to: > > + public Map getJarSignableEntries() { > + return Collections.unmodifiableMap(jarSignableEntries); > + } > Oh yeah that should definitely be immutable. Very good catch, sorry that slipped through! > > >> >>> +public class VerifyJarEntryCertsTest { >> >> Could you rename this class to ${CLASS_IT_TESTS}Test? That would be >> JarCertVerifierTest. Otherwise it will be harder to find this the next >> time someone is updating JarCertVerifier. >> Heh that was my doing. I was following the Parser unit tests' formats for multiple classes per functionality. I recall you mentioning that to me too now, just slipped through the cracks though. :S > > OK for HEAD? > I've gone over all of the above patches, all the changes make sense to me too. I just one nitpick for your third patch, the FixForEmptySignedReproducer: + if (numSignableEntriesInJar == 0) { + // Allow jars with no signable entries to simply be considered signed. + // There should be no security risk in doing so. + result = VerifyResult.SIGNED_OK; + } + Could you merge that if-statement with the ones above? I would even start with this one and change the if(allEntriesSignedBySingleCert) to an else if. I can't quite okay this for HEAD because I have a lot of bias in this review. =) Thanks for picking this up Adam! Regards, Danesh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121016/0296c818/attachment.html From bugzilla-daemon at icedtea.classpath.org Tue Oct 16 08:16:05 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 16 Oct 2012 15:16:05 +0000 Subject: [Bug 1196] New: Internal Error (os_linux_zero.cpp:270) fatal error: caught unhandled signal 7 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1196 Priority: P3 Bug ID: 1196 CC: unassigned at icedtea.classpath.org Assignee: chphilli at redhat.com Summary: Internal Error (os_linux_zero.cpp:270) fatal error: caught unhandled signal 7 Severity: normal Classification: Unclassified OS: Other Reporter: kblake at sentec.co.uk Hardware: arm Status: NEW Version: unspecified Component: Zero Product: IcedTea Hello, My apologies if this bug report is entered against the wrong category. I am seeing the following: # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (os_linux_zero.cpp:270), pid=6438, tid=1091224688 # fatal error: caught unhandled signal 7 # # JRE version: 6.0_24-b24 # Java VM: OpenJDK Zero VM (20.0-b12 mixed mode linux-arm ) # Derivative: IcedTea6 1.12pre # Distribution: Built for angstrom # If you would like to submit a bug report, please include # instructions how to reproduce the bug and visit: # http://icedtea.classpath.org/bugzilla # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # --------------- T H R E A D --------------- Current thread (0x01c84c80): JavaThread "main" [_thread_in_native, id=6439, stack(0x40f2e000,0x410ad000)] Stack: [0x40f2e000,0x410ad000], sp=0x40feebd4, free space=770k Java frames: 0x410ab6b0: istate->_thread = 0x01c84c80 0x410ab6b4: istate->_bcp = 0x00000000 0x410ab6b8: istate->_locals = 0x410ab704 0x410ab6bc: istate->_constants = 0x52a57e58 0x410ab6c0: istate->_method = SQLite.Database._exec(Ljava/lang/String;LSQLite/Callback;)V 0x410ab6c4: istate->_mdx = 0x00000002 0x410ab6c8: istate->_stack = 0x00000000 0x410ab6cc: istate->_msg = 0x00000000 0x410ab6d0: istate->_result = 0x410ab67c 0x410ab6d4: (istate->_result) = 0x410ab698 0x410ab6d8: (istate->_result) = 0x410ab698 0x410ab6dc: istate->_prev_link = 0x00000002 0x410ab6e0: istate->_oop_temp = 0x00000000 0x410ab6e4: istate->_stack_base = 0x410ab6b0 0x410ab6e8: istate->_stack_limit = 0x410ab6ac 0x410ab6ec: istate->_monitor_base = 0x410ab6b0 0x410ab6f0: istate->_self_link = 0x410ab6b0 0x410ab6f4: frame_type = INTERPRETER_FRAME 0x410ab6f8: next_frame = 0x410ab758 0x410ab6fc: local[2] = 0x00000000 0x410ab700: local[1] = 0x52a58d48 0x410ab704: local[0] = 0x432922e8 0x410ab708: monitor[0]->_lock = 0x00000001 0x410ab70c: monitor[0]->_obj = 0x432922e8 0x410ab710: istate->_thread = 0x01c84c80 0x410ab714: istate->_bcp = 0x52a3100f (bci 7) 0x410ab718: istate->_locals = 0x410ab76c 0x410ab71c: istate->_constants = 0x52a57e58 0x410ab720: istate->_method = SQLite.Database.exec(Ljava/lang/String;LSQLite/Callback;)V 0x410ab724: istate->_mdx = 0x52a57e58 0x410ab728: istate->_stack = 0x410ab6f8 0x410ab72c: istate->_msg = 0x00000000 0x410ab730: istate->_result = 0x00000000 0x410ab734: (istate->_result) = 0x4115d174 0x410ab738: (istate->_result) = 0x410ab6fc 0x410ab73c: istate->_prev_link = 0x410ab700 0x410ab740: istate->_oop_temp = 0x00000000 0x410ab744: istate->_stack_base = 0x410ab708 0x410ab748: istate->_stack_limit = 0x410ab6f8 0x410ab74c: istate->_monitor_base = 0x410ab710 0x410ab750: istate->_self_link = 0x410ab710 0x410ab754: frame_type = INTERPRETER_FRAME 0x410ab758: next_frame = 0x410ab7b8 0x410ab75c: local[4] = 0x00000000 0x410ab760: local[3] = 0x432922e8 0x410ab764: local[2] = 0x00000000 0x410ab768: local[1] = 0x52a58d48 0x410ab76c: local[0] = 0x432922e8 0x410ab770: istate->_thread = 0x01c84c80 0x410ab774: istate->_bcp = 0x52a34e8b (bci 3) 0x410ab778: istate->_locals = 0x410ab7cc 0x410ab77c: istate->_constants = 0x52a58310 0x410ab780: istate->_method = SQLite.JDBC2z.DatabaseX.exec(Ljava/lang/String;LSQLite/Callback;)V 0x410ab784: istate->_mdx = 0x52a32af8 0x410ab788: istate->_stack = 0x410ab760 0x410ab78c: istate->_msg = 0x00000000 0x410ab790: istate->_result = 0x00000000 0x410ab794: (istate->_result) = 0x4115d140 0x410ab798: (istate->_result) = 0x4115d174 0x410ab79c: istate->_prev_link = 0x410ab760 0x410ab7a0: istate->_oop_temp = 0x00000000 0x410ab7a4: istate->_stack_base = 0x410ab770 0x410ab7a8: istate->_stack_limit = 0x410ab760 0x410ab7ac: istate->_monitor_base = 0x410ab770 0x410ab7b0: istate->_self_link = 0x410ab770 0x410ab7b4: frame_type = INTERPRETER_FRAME 0x410ab7b8: next_frame = 0x410ab818 0x410ab7bc: local[4] = 0x00000000 0x410ab7c0: local[3] = 0x00000000 0x410ab7c4: local[2] = 0x00000000 0x410ab7c8: local[1] = 0x52a58d48 0x410ab7cc: local[0] = 0x432922e8 0x410ab7d0: istate->_thread = 0x01c84c80 0x410ab7d4: istate->_bcp = 0x52a28f03 (bci 59) 0x410ab7d8: istate->_locals = 0x410ab830 0x410ab7dc: istate->_constants = 0x52a42170 0x410ab7e0: istate->_method = SQLite.JDBC2z.JDBCConnection.open(Z)LSQLite/JDBC2z/DatabaseX; 0x410ab7e4: istate->_mdx = 0x527ed2ee 0x410ab7e8: istate->_stack = 0x410ab7c0 0x410ab7ec: istate->_msg = 0x00000000 0x410ab7f0: istate->_result = 0x527ed318 0x410ab7f4: (istate->_result) = 0x4115d140 0x410ab7f8: (istate->_result) = 0x410ab7d0 0x410ab7fc: istate->_prev_link = 0x00000000 0x410ab800: istate->_oop_temp = 0x00000000 0x410ab804: istate->_stack_base = 0x410ab7d0 0x410ab808: istate->_stack_limit = 0x410ab7bc 0x410ab80c: istate->_monitor_base = 0x410ab7d0 0x410ab810: istate->_self_link = 0x410ab7d0 0x410ab814: frame_type = INTERPRETER_FRAME 0x410ab818: next_frame = 0x410ab880 0x410ab81c: local[6] = 0x00000000 0x410ab820: local[5] = 0x00000000 0x410ab824: local[4] = 0x00000000 0x410ab828: local[3] = 0x432922e8 0x410ab82c: local[2] = 0x00000000 0x410ab830: local[1] = 0x4328e8a8 0x410ab834: local[0] = 0x4328e8a8 0x410ab838: istate->_thread = 0x01c84c80 0x410ab83c: istate->_bcp = 0x52a2913a (bci 122) 0x410ab840: istate->_locals = 0x410ab8a0 0x410ab844: istate->_constants = 0x52a42170 0x410ab848: istate->_method = SQLite.JDBC2z.JDBCConnection.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V 0x410ab84c: istate->_mdx = 0x4328e898 0x410ab850: istate->_stack = 0x410ab828 0x410ab854: istate->_msg = 0x00000000 0x410ab858: istate->_result = 0x410ab8a0 0x410ab85c: (istate->_result) = 0x4115d140 0x410ab860: (istate->_result) = 0x5296de10 0x410ab864: istate->_prev_link = 0x528313c0 0x410ab868: istate->_oop_temp = 0x00000000 0x410ab86c: istate->_stack_base = 0x410ab838 0x410ab870: istate->_stack_limit = 0x410ab824 0x410ab874: istate->_monitor_base = 0x410ab838 0x410ab878: istate->_self_link = 0x410ab838 0x410ab87c: frame_type = INTERPRETER_FRAME 0x410ab880: next_frame = 0x410ab8ac 0x410ab884: local[7] = 0x00000000 0x410ab888: local[6] = 0x00000000 0x410ab88c: local[5] = 0x00000000 0x410ab890: local[4] = 0x00000000 0x410ab894: local[3] = 0x00000000 0x410ab898: local[2] = 0x00000000 0x410ab89c: local[1] = 0x52a57758 0x410ab8a0: local[0] = 0x4328e8a8 0x410ab8a4: call_wrapper = 0x40fef368 0x410ab8a8: frame_type = ENTRY_FRAME 0x410ab8ac: next_frame = 0x410ab8f8 0x410ab8b0: istate->_thread = 0x01c84c80 0x410ab8b4: istate->_bcp = 0x00000000 0x410ab8b8: istate->_locals = 0x410ab900 0x410ab8bc: istate->_constants = 0x5296d9f8 0x410ab8c0: istate->_method = sun.reflect.NativeConstructorAccessorImpl.newInstance0(Ljava/lang/reflect/Constructor;[Ljava/lang/Object;)Ljava/lang/Object; 0x410ab8c4: istate->_mdx = 0x52892960 0x410ab8c8: istate->_stack = 0x4115d140 0x410ab8cc: istate->_msg = 0x00000000 0x410ab8d0: istate->_result = 0x00000000 0x410ab8d4: (istate->_result) = 0x00000000 0x410ab8d8: (istate->_result) = 0x00000000 0x410ab8dc: istate->_prev_link = 0x410ab8a8 0x410ab8e0: istate->_oop_temp = 0x5296d930 0x410ab8e4: istate->_stack_base = 0x410ab8b0 0x410ab8e8: istate->_stack_limit = 0x410ab8ac 0x410ab8ec: istate->_monitor_base = 0x410ab8b0 0x410ab8f0: istate->_self_link = 0x410ab8b0 0x410ab8f4: frame_type = INTERPRETER_FRAME 0x410ab8f8: next_frame = 0x410ab94c 0x410ab8fc: local[1] = 0x4328e5a0 0x410ab900: local[0] = 0x43270db0 0x410ab904: istate->_thread = 0x01c84c80 0x410ab908: istate->_bcp = 0x5296d5f8 (bci 72) 0x410ab90c: istate->_locals = 0x410ab958 0x410ab910: istate->_constants = 0x5296d9f8 0x410ab914: istate->_method = sun.reflect.NativeConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object; 0x410ab918: istate->_mdx = 0x5282fbf8 0x410ab91c: istate->_stack = 0x410ab8f8 0x410ab920: istate->_msg = 0x00000000 0x410ab924: istate->_result = 0x00000000 0x410ab928: (istate->_result) = 0x4115d174 0x410ab92c: (istate->_result) = 0x4115d140 0x410ab930: istate->_prev_link = 0x410ab8fc 0x410ab934: istate->_oop_temp = 0x00000000 0x410ab938: istate->_stack_base = 0x410ab904 0x410ab93c: istate->_stack_limit = 0x410ab8ec 0x410ab940: istate->_monitor_base = 0x410ab904 0x410ab944: istate->_self_link = 0x410ab904 0x410ab948: frame_type = INTERPRETER_FRAME 0x410ab94c: next_frame = 0x410ab9a4 0x410ab950: local[2] = 0x00000000 0x410ab954: local[1] = 0x4328e5a0 0x410ab958: local[0] = 0x4328e880 0x410ab95c: istate->_thread = 0x01c84c80 0x410ab960: istate->_bcp = 0x5296dd3d (bci 5) 0x410ab964: istate->_locals = 0x410ab9ac 0x410ab968: istate->_constants = 0x5296e030 0x410ab96c: istate->_method = sun.reflect.DelegatingConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object; 0x410ab970: istate->_mdx = 0x527f6448 0x410ab974: istate->_stack = 0x410ab950 0x410ab978: istate->_msg = 0x00000000 0x410ab97c: istate->_result = 0x00000000 0x410ab980: (istate->_result) = 0x4115d140 0x410ab984: (istate->_result) = 0x00000000 0x410ab988: istate->_prev_link = 0x01c84c80 0x410ab98c: istate->_oop_temp = 0x00000000 0x410ab990: istate->_stack_base = 0x410ab95c 0x410ab994: istate->_stack_limit = 0x410ab950 0x410ab998: istate->_monitor_base = 0x410ab95c 0x410ab99c: istate->_self_link = 0x410ab95c 0x410ab9a0: frame_type = INTERPRETER_FRAME 0x410ab9a4: next_frame = 0x410ab9f8 0x410ab9a8: local[1] = 0x4328e5a0 0x410ab9ac: local[0] = 0x4328e898 0x410ab9b0: istate->_thread = 0x01c84c80 0x410ab9b4: istate->_bcp = 0x5282f84c (bci 92) 0x410ab9b8: istate->_locals = 0x410aba04 0x410ab9bc: istate->_constants = 0x5296c038 0x410ab9c0: istate->_method = java.lang.reflect.Constructor.newInstance([Ljava/lang/Object;)Ljava/lang/Object; 0x410ab9c4: istate->_mdx = 0x410ab988 0x410ab9c8: istate->_stack = 0x410ab9a4 0x410ab9cc: istate->_msg = 0x00000000 0x410ab9d0: istate->_result = 0x410ab9f4 0x410ab9d4: (istate->_result) = 0x4115d140 0x410ab9d8: (istate->_result) = 0x00000000 0x410ab9dc: istate->_prev_link = 0x00000000 0x410ab9e0: istate->_oop_temp = 0x00000000 0x410ab9e4: istate->_stack_base = 0x410ab9b0 0x410ab9e8: istate->_stack_limit = 0x410ab99c 0x410ab9ec: istate->_monitor_base = 0x410ab9b0 0x410ab9f0: istate->_self_link = 0x410ab9b0 0x410ab9f4: frame_type = INTERPRETER_FRAME 0x410ab9f8: next_frame = 0x410aba50 0x410ab9fc: local[2] = 0x00000000 0x410aba00: local[1] = 0x4328e5a0 0x410aba04: local[0] = 0x43270db0 0x410aba08: istate->_thread = 0x01c84c80 0x410aba0c: istate->_bcp = 0x52a23991 (bci 89) 0x410aba10: istate->_locals = 0x410aba64 0x410aba14: istate->_constants = 0x52a248c0 0x410aba18: istate->_method = SQLite.JDBC.connect(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection; 0x410aba1c: istate->_mdx = 0x52a44cb8 0x410aba20: istate->_stack = 0x410ab9fc 0x410aba24: istate->_msg = 0x00000000 0x410aba28: istate->_result = 0x410aba00 0x410aba2c: (istate->_result) = 0x4115d140 0x410aba30: (istate->_result) = 0x410aba00 0x410aba34: istate->_prev_link = 0x00000000 0x410aba38: istate->_oop_temp = 0x00000000 0x410aba3c: istate->_stack_base = 0x410aba08 0x410aba40: istate->_stack_limit = 0x410ab9f4 0x410aba44: istate->_monitor_base = 0x410aba08 0x410aba48: istate->_self_link = 0x410aba08 0x410aba4c: frame_type = INTERPRETER_FRAME 0x410aba50: next_frame = 0x410abab8 0x410aba54: local[4] = 0x00000000 0x410aba58: local[3] = 0x4328e5a0 0x410aba5c: local[2] = 0x4328de98 0x410aba60: local[1] = 0x52a57758 0x410aba64: local[0] = 0x43270df0 0x410aba68: monitor[0]->_lock = 0x00000001 0x410aba6c: monitor[0]->_obj = 0x00000000 0x410aba70: istate->_thread = 0x01c84c80 0x410aba74: istate->_bcp = 0x52a446ba (bci 210) 0x410aba78: istate->_locals = 0x410abad8 0x410aba7c: istate->_constants = 0x52a44cb8 0x410aba80: istate->_method = java.sql.DriverManager.getConnection(Ljava/lang/String;Ljava/util/Properties;Ljava/lang/ClassLoader;)Ljava/sql/Connection; 0x410aba84: istate->_mdx = 0x4328de98 0x410aba88: istate->_stack = 0x410aba58 0x410aba8c: istate->_msg = 0x00000000 0x410aba90: istate->_result = 0x01c84c80 0x410aba94: (istate->_result) = 0x4115d140 0x410aba98: (istate->_result) = 0x410abad8 0x410aba9c: istate->_prev_link = 0x52a44cb8 0x410abaa0: istate->_oop_temp = 0x00000000 0x410abaa4: istate->_stack_base = 0x410aba68 0x410abaa8: istate->_stack_limit = 0x410aba54 0x410abaac: istate->_monitor_base = 0x410aba70 0x410abab0: istate->_self_link = 0x410aba70 0x410abab4: frame_type = INTERPRETER_FRAME 0x410abab8: next_frame = 0x410abb24 0x410ababc: local[7] = 0x00000000 0x410abac0: local[6] = 0x4328d918 0x410abac4: local[5] = 0x00000000 0x410abac8: local[4] = 0x00000000 0x410abacc: local[3] = 0x4328de10 0x410abad0: local[2] = 0x43206390 0x410abad4: local[1] = 0x4328de98 0x410abad8: local[0] = 0x52a57758 0x410abadc: istate->_thread = 0x01c84c80 0x410abae0: istate->_bcp = 0x52a438af (bci 15) 0x410abae4: istate->_locals = 0x410abb30 0x410abae8: istate->_constants = 0x52a44cb8 0x410abaec: istate->_method = java.sql.DriverManager.getConnection(Ljava/lang/String;)Ljava/sql/Connection; 0x410abaf0: istate->_mdx = 0x410abac8 0x410abaf4: istate->_stack = 0x410abacc 0x410abaf8: istate->_msg = 0x00000000 0x410abafc: istate->_result = 0x4115d140 0x410abb00: (istate->_result) = 0x4115d140 0x410abb04: (istate->_result) = 0x00000000 0x410abb08: istate->_prev_link = 0x00000000 0x410abb0c: istate->_oop_temp = 0x00000000 0x410abb10: istate->_stack_base = 0x410abadc 0x410abb14: istate->_stack_limit = 0x410abacc 0x410abb18: istate->_monitor_base = 0x410abadc 0x410abb1c: istate->_self_link = 0x410abadc 0x410abb20: frame_type = INTERPRETER_FRAME 0x410abb24: next_frame = 0x410abb7c 0x410abb28: local[2] = 0x43206390 0x410abb2c: local[1] = 0x4328de98 0x410abb30: local[0] = 0x52a57758 0x410abb34: istate->_thread = 0x01c84c80 0x410abb38: istate->_bcp = 0x52a20858 (bci 40) 0x410abb3c: istate->_locals = 0x410abb94 0x410abb40: istate->_constants = 0x52a22020 0x410abb44: istate->_method = com.sentec.milbank.testing.DataBaseTest.main([Ljava/lang/String;)V 0x410abb48: istate->_mdx = 0x01c86730 0x410abb4c: istate->_stack = 0x410abb2c 0x410abb50: istate->_msg = 0x00000000 0x410abb54: istate->_result = 0x01c84c80 0x410abb58: (istate->_result) = 0x4115d140 0x410abb5c: (istate->_result) = 0x410abb28 0x410abb60: istate->_prev_link = 0x410abb20 0x410abb64: istate->_oop_temp = 0x00000000 0x410abb68: istate->_stack_base = 0x410abb34 0x410abb6c: istate->_stack_limit = 0x410abb20 0x410abb70: istate->_monitor_base = 0x410abb34 0x410abb74: istate->_self_link = 0x410abb34 0x410abb78: frame_type = INTERPRETER_FRAME 0x410abb7c: next_frame = 0x410abba0 0x410abb80: local[5] = 0x00000000 0x410abb84: local[4] = 0x00000000 0x410abb88: local[3] = 0x00000000 0x410abb8c: local[2] = 0x00000000 0x410abb90: local[1] = 0x00000000 0x410abb94: local[0] = 0x43253870 0x410abb98: call_wrapper = 0x410abbf0 0x410abb9c: frame_type = ENTRY_FRAME 0x410abba0: next_frame = 0x00000000 --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x01cef040 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=6445, stack(0x570fe000,0x5727e000)] 0x01ceda88 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6444, stack(0x56f0b000,0x5708b000)] 0x01cdb4d8 JavaThread "Finalizer" daemon [_thread_blocked, id=6442, stack(0x56d8b000,0x56f0b000)] 0x01cda1b8 JavaThread "Reference Handler" daemon [_thread_blocked, id=6441, stack(0x56c09000,0x56d89000)] =>0x01c84c80 JavaThread "main" [_thread_in_native, id=6439, stack(0x40f2e000,0x410ad000)] Other Threads: 0x01cd6228 VMThread [stack: 0x56b6e000,0x56bed000] [id=6440] 0x01cf0d30 WatcherThread [stack: 0x5727f000,0x572fe000] [id=6446] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 2304K, used 713K [0x431e0000, 0x43460000, 0x483e0000) eden space 2048K, 34% used [0x431e0000, 0x432924f8, 0x433e0000) from space 256K, 0% used [0x433e0000, 0x433e0000, 0x43420000) to space 256K, 0% used [0x43420000, 0x43420000, 0x43460000) tenured generation total 5376K, used 0K [0x483e0000, 0x48920000, 0x527e0000) the space 5376K, 0% used [0x483e0000, 0x483e0000, 0x483e0200, 0x48920000) compacting perm gen total 4096K, used 2531K [0x527e0000, 0x52be0000, 0x567e0000) the space 4096K, 61% used [0x527e0000, 0x52a58db0, 0x52a58e00, 0x52be0000) No shared spaces configured. Code Cache [0x4115d000, 0x41185000, 0x4315d000) total_blobs=74 nmethods=0 adapters=60 free_code_cache=33483136 largest_free_block=0 Dynamic libraries: 00008000-00011000 r-xp 00000000 b3:02 188563 /usr/lib/jvm/java-6-openjdk/jre/bin/java 00018000-00019000 rw-p 00008000 b3:02 188563 /usr/lib/jvm/java-6-openjdk/jre/bin/java 01c80000-01d48000 rw-p 00000000 00:00 0 [heap] 40011000-40012000 rw-p 00000000 00:00 0 40012000-40025000 r-xp 00000000 b3:02 142022 /usr/lib/libz.so.1.2.6 40025000-4002c000 ---p 00013000 b3:02 142022 /usr/lib/libz.so.1.2.6 4002c000-4002d000 rw-p 00012000 b3:02 142022 /usr/lib/libz.so.1.2.6 4002d000-40033000 r-xp 00000000 b3:02 141995 /usr/lib/libffi.so.5.0.10 40033000-4003a000 ---p 00006000 b3:02 141995 /usr/lib/libffi.so.5.0.10 4003a000-4003b000 rw-p 00005000 b3:02 141995 /usr/lib/libffi.so.5.0.10 4003e000-40041000 r-xp 00000000 b3:02 180258 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/jli/libjli.so 40041000-40048000 ---p 00003000 b3:02 180258 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/jli/libjli.so 40048000-40049000 rw-p 00002000 b3:02 180258 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/jli/libjli.so 40057000-40073000 r-xp 00000000 b3:02 295795 /lib/ld-2.12.2.so 40073000-40074000 rw-p 00000000 00:00 0 4007b000-4007c000 r--p 0001c000 b3:02 295795 /lib/ld-2.12.2.so 4007c000-4007d000 rw-p 0001d000 b3:02 295795 /lib/ld-2.12.2.so 4007d000-4007f000 r-xp 00000000 b3:02 295797 /lib/libdl-2.12.2.so 4007f000-40086000 ---p 00002000 b3:02 295797 /lib/libdl-2.12.2.so 40086000-40087000 r--p 00001000 b3:02 295797 /lib/libdl-2.12.2.so 40087000-40088000 rw-p 00002000 b3:02 295797 /lib/libdl-2.12.2.so 40093000-4009c000 r-xp 00000000 b3:02 295803 /lib/libgcc_s.so.1 4009c000-400a3000 ---p 00009000 b3:02 295803 /lib/libgcc_s.so.1 400a3000-400a4000 rw-p 00008000 b3:02 295803 /lib/libgcc_s.so.1 400a4000-400ae000 r-xp 00000000 b3:02 180243 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libverify.so 400ae000-400b5000 ---p 0000a000 b3:02 180243 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libverify.so 400b5000-400b6000 rw-p 00009000 b3:02 180243 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libverify.so 400b6000-400b7000 r--p 00000000 00:00 0 400c1000-400c2000 rw-p 00000000 00:00 0 400c9000-400de000 r-xp 00000000 b3:02 295696 /lib/libpthread-2.12.2.so 400de000-400e5000 ---p 00015000 b3:02 295696 /lib/libpthread-2.12.2.so 400e5000-400e6000 r--p 00014000 b3:02 295696 /lib/libpthread-2.12.2.so 400e6000-400e7000 rw-p 00015000 b3:02 295696 /lib/libpthread-2.12.2.so 400e7000-400e9000 rw-p 00000000 00:00 0 400e9000-40206000 r-xp 00000000 b3:02 295800 /lib/libc-2.12.2.so 40206000-4020e000 ---p 0011d000 b3:02 295800 /lib/libc-2.12.2.so 4020e000-40210000 r--p 0011d000 b3:02 295800 /lib/libc-2.12.2.so 40210000-40211000 rw-p 0011f000 b3:02 295800 /lib/libc-2.12.2.so 40211000-40214000 rw-p 00000000 00:00 0 40214000-40590000 r-xp 00000000 b3:02 180282 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/server/libjvm.so 40590000-40598000 ---p 0037c000 b3:02 180282 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/server/libjvm.so 40598000-405b5000 rw-p 0037c000 b3:02 180282 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/server/libjvm.so 405b5000-4060f000 rw-p 00000000 00:00 0 4060f000-406a9000 r-xp 00000000 b3:02 141965 /usr/lib/libstdc++.so.6.0.14 406a9000-406b1000 ---p 0009a000 b3:02 141965 /usr/lib/libstdc++.so.6.0.14 406b1000-406b4000 r--p 0009a000 b3:02 141965 /usr/lib/libstdc++.so.6.0.14 406b4000-406b6000 rw-p 0009d000 b3:02 141965 /usr/lib/libstdc++.so.6.0.14 406b6000-406bc000 rw-p 00000000 00:00 0 406bc000-40724000 r-xp 00000000 b3:02 295784 /lib/libm-2.12.2.so 40724000-4072b000 ---p 00068000 b3:02 295784 /lib/libm-2.12.2.so 4072b000-4072c000 r--p 00067000 b3:02 295784 /lib/libm-2.12.2.so 4072c000-4072d000 rw-p 00068000 b3:02 295784 /lib/libm-2.12.2.so 4072d000-40f2d000 rwxp 00000000 00:00 0 40f2d000-40f31000 ---p 00000000 00:00 0 40f31000-410ae000 rw-p 00000000 00:00 0 410ae000-410b4000 r-xp 00000000 b3:02 295802 /lib/libnss_compat-2.12.2.so 410b4000-410bb000 ---p 00006000 b3:02 295802 /lib/libnss_compat-2.12.2.so 410bb000-410bc000 r--p 00005000 b3:02 295802 /lib/libnss_compat-2.12.2.so 410bc000-410bd000 rw-p 00006000 b3:02 295802 /lib/libnss_compat-2.12.2.so 410bd000-410c0000 r--s 0007d000 b3:02 174064 /usr/lib/jvm/java-6-openjdk/jre/lib/jsse.jar 410c1000-410c7000 r-xp 00000000 b3:02 295794 /lib/librt-2.12.2.so 410c7000-410ce000 ---p 00006000 b3:02 295794 /lib/librt-2.12.2.so 410ce000-410cf000 r--p 00005000 b3:02 295794 /lib/librt-2.12.2.so 410cf000-410d0000 rw-p 00006000 b3:02 295794 /lib/librt-2.12.2.so 410d0000-410f3000 r-xp 00000000 b3:02 180259 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libjava.so 410f3000-410fa000 ---p 00023000 b3:02 180259 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libjava.so 410fa000-410fc000 rw-p 00022000 b3:02 180259 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libjava.so 410fc000-4110d000 r-xp 00000000 b3:02 295754 /lib/libnsl-2.12.2.so 4110d000-41114000 ---p 00011000 b3:02 295754 /lib/libnsl-2.12.2.so 41114000-41115000 r--p 00010000 b3:02 295754 /lib/libnsl-2.12.2.so 41115000-41116000 rw-p 00011000 b3:02 295754 /lib/libnsl-2.12.2.so 41116000-41118000 rw-p 00000000 00:00 0 41118000-41120000 rw-s 00000000 00:10 73152 /var/volatile/tmp/hsperfdata_root/6438 41123000-4112d000 r-xp 00000000 b3:02 295801 /lib/libnss_files-2.12.2.so 4112d000-41134000 ---p 0000a000 b3:02 295801 /lib/libnss_files-2.12.2.so 41134000-41135000 r--p 00009000 b3:02 295801 /lib/libnss_files-2.12.2.so 41135000-41136000 rw-p 0000a000 b3:02 295801 /lib/libnss_files-2.12.2.so 4113d000-41146000 r-xp 00000000 b3:02 295788 /lib/libnss_nis-2.9.so 41146000-4114d000 ---p 00009000 b3:02 295788 /lib/libnss_nis-2.9.so 4114d000-4114e000 r--p 00008000 b3:02 295788 /lib/libnss_nis-2.9.so 4114e000-4114f000 rw-p 00009000 b3:02 295788 /lib/libnss_nis-2.9.so 4114f000-41155000 r-xp 00000000 b3:02 180232 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libzip.so 41155000-4115c000 ---p 00006000 b3:02 180232 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libzip.so 4115c000-4115d000 rw-p 00005000 b3:02 180232 /usr/lib/jvm/java-6-openjdk/jre/lib/arm/libzip.so 4115d000-41185000 rwxp 00000000 00:00 0 41185000-4315d000 rw-p 00000000 00:00 0 4315d000-4315e000 rw-p 00000000 00:00 0 4315e000-431dd000 rw-p 00000000 00:00 0 431e0000-43460000 rw-p 00000000 00:00 0 43460000-483e0000 rw-p 00000000 00:00 0 483e0000-48920000 rw-p 00000000 00:00 0 48920000-527e0000 rw-p 00000000 00:00 0 527e0000-52be0000 rw-p 00000000 00:00 0 52be0000-567e0000 rw-p 00000000 00:00 0 567e0000-567e2000 rw-p 00000000 00:00 0 567e2000-56809000 rw-p 00000000 00:00 0 56809000-5680c000 rw-p 00000000 00:00 0 5680c000-5685b000 rw-p 00000000 00:00 0 5685b000-5685d000 rw-p 00000000 00:00 0 5685d000-5687b000 rw-p 00000000 00:00 0 5687b000-5687f000 rw-p 00000000 00:00 0 5687f000-568cf000 rw-p 00000000 00:00 0 568cf000-568d2000 rw-p 00000000 00:00 0 568d2000-568f0000 rw-p 00000000 00:00 0 568f0000-56a80000 r--s 037ba000 b3:02 174058 /usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar 56a80000-56a95000 r--s 0013b000 b3:02 409748 /var/code/CodeToRun/DBTest.jar 56a95000-56aa2000 r-xp 00000000 b3:02 190539 /usr/lib/jni/libsqlite_jni.so 56aa2000-56aa9000 ---p 0000d000 b3:02 190539 /usr/lib/jni/libsqlite_jni.so 56aa9000-56aaa000 rw-p 0000c000 b3:02 190539 /usr/lib/jni/libsqlite_jni.so 56ac4000-56af7000 rw-p 00000000 00:00 0 56b41000-56b56000 r--s 0013b000 b3:02 409748 /var/code/CodeToRun/DBTest.jar 56b6d000-56b6e000 ---p 00000000 00:00 0 56b6e000-56bed000 rw-p 00000000 00:00 0 56c09000-56c0c000 ---p 00000000 00:00 0 56c0c000-56d89000 rw-p 00000000 00:00 0 56d8b000-56d8e000 ---p 00000000 00:00 0 56d8e000-56f0b000 rw-p 00000000 00:00 0 56f0b000-56f0e000 ---p 00000000 00:00 0 56f0e000-5708b000 rw-p 00000000 00:00 0 5708b000-570f4000 r-xp 00000000 b3:02 142160 /usr/lib/libsqlite3.so.0.8.6 570f4000-570fc000 ---p 00069000 b3:02 142160 /usr/lib/libsqlite3.so.0.8.6 570fc000-570fe000 rw-p 00069000 b3:02 142160 /usr/lib/libsqlite3.so.0.8.6 570fe000-57101000 ---p 00000000 00:00 0 57101000-5727e000 rw-p 00000000 00:00 0 5727e000-5727f000 ---p 00000000 00:00 0 5727f000-572fe000 rw-p 00000000 00:00 0 572fe000-5736f000 r-xp 00000000 b3:02 141738 /usr/lib/libsqlite.so.0.8.6 5736f000-57377000 ---p 00071000 b3:02 141738 /usr/lib/libsqlite.so.0.8.6 57377000-5737b000 rw-p 00071000 b3:02 141738 /usr/lib/libsqlite.so.0.8.6 5737b000-5737c000 ---p 00000000 00:00 0 5737c000-57b7b000 rw-p 00000000 00:00 0 beae0000-beb14000 rw-p 00000000 00:00 0 [stack] ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors] VM Arguments: java_command: DBTest.jar Launcher Type: SUN_STANDARD Environment Variables: PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin LD_LIBRARY_PATH=/usr/lib/jvm/java-6-openjdk/jre/lib/arm/server:/usr/lib/jvm/java-6-openjdk/jre/lib/arm:/usr/lib/jvm/java-6-openjdk/jre/../lib/arm:/usr/lib/jni SHELL=/bin/sh Signal Handlers: SIGSEGV: [libjvm.so+0x32402c], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGBUS: [libjvm.so+0x32402c], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGFPE: [libjvm.so+0x276974], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGPIPE: [libjvm.so+0x276974], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGXFSZ: [libjvm.so+0x276974], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGILL: [libjvm.so+0x276974], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGUSR2: [libjvm.so+0x276b44], sa_mask[0]=0x00000000, sa_flags=0x10000004 SIGHUP: [libjvm.so+0x27913c], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGINT: [libjvm.so+0x27913c], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGTERM: [libjvm.so+0x27913c], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGQUIT: [libjvm.so+0x27913c], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 --------------- S Y S T E M --------------- OS:Angstrom 2011.03 Built from branch: overo-2011.03 Revision: 575c331 Target system: arm-angstrom-linux-gnueabi uname:Linux 2.6.39 #1 Mon Aug 15 19:04:09 PDT 2011 armv7l libc:glibc 2.12.2 NPTL 2.12.2 rlimit: STACK 8192k, CORE 0k, NPROC 3915, NOFILE 1024, AS infinity load average:0.16 0.05 0.06 /proc/meminfo: MemTotal: 501400 kB MemFree: 358388 kB Buffers: 11956 kB Cached: 88852 kB SwapCached: 0 kB Active: 57924 kB Inactive: 69416 kB Active(anon): 27608 kB Inactive(anon): 560 kB Active(file): 30316 kB Inactive(file): 68856 kB Unevictable: 16 kB Mlocked: 16 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 100 kB Writeback: 0 kB AnonPages: 26592 kB Mapped: 26636 kB Shmem: 1596 kB Slab: 9876 kB SReclaimable: 5224 kB SUnreclaim: 4652 kB KernelStack: 1336 kB PageTables: 1240 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 250700 kB Committed_AS: 136204 kB VmallocTotal: 385024 kB VmallocUsed: 2532 kB VmallocChunk: 378556 kB CPU:total 1 Memory: 4k page, physical 501400k(358388k free), swap 0k(0k free) vm_info: OpenJDK Zero VM (20.0-b12) for linux-arm JRE (1.6.0_24-b24), built on Mar 7 2012 11:32:56 by "koen" with gcc 4.5.4 20111126 (prerelease) time: Tue Oct 16 14:45:27 2012 elapsed time: 3 seconds -------------------------------------------------------------------------------- This is a consistent error. In this case I am trying to run a simple Java process to connect to an SQLite DB via native libraries. ( This is a stripped down case, and was run to ensure that the issues I see with my application code are not specific to anything more complex!) I am not sure what has changed on my system, this seems suspicious as I have been successfully running DB code on this platform for the last year. Advice and suggestions very much appreciated. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121016/507edb5e/attachment.html From adomurad at redhat.com Tue Oct 16 08:38:40 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 16 Oct 2012 11:38:40 -0400 Subject: [icedtea-web][rfc] Update on Danesh's major rework of JarCertVerifier In-Reply-To: References: <1348585163.17801.24.camel@adomurad-desktop> <5075A1C7.1050402@redhat.com> <507725CB.4030009@redhat.com> Message-ID: <507D7F80.1060503@redhat.com> Hey Danesh, thanks very much for the look-over. On 10/16/2012 10:51 AM, Danesh Dadachanji wrote: > > On Thu, Oct 11, 2012 at 4:02 PM, Adam Domurad redhat.com > > wrote: > > Thanks for the review! > > > > Attached is an updated patch to the base patch by Danesh (with your > > recommended changes + a change to JCV to use specific imports instead of > > full-package imports). > > > >>> + public Map getJarSignableEntries() { > >>> + return jarSignableEntries; > >>> + } > >> > >> If untrusted code were able to invoke this method, would that > compromise > >> the security of the system? Should we be returning a mutable data > >> structure here? > > > > > > Changed to: > > > > + public Map getJarSignableEntries() { > > + return Collections.unmodifiableMap(jarSignableEntries); > > + } > > > > Oh yeah that should definitely be immutable. Very good catch, sorry > that slipped through! > > > > > > >> > >>> +public class VerifyJarEntryCertsTest { > >> > >> Could you rename this class to ${CLASS_IT_TESTS}Test? That would be > >> JarCertVerifierTest. Otherwise it will be harder to find this the next > >> time someone is updating JarCertVerifier. > >> > > Heh that was my doing. I was following the Parser unit tests' formats > for multiple classes per functionality. I recall you mentioning that > to me too now, just slipped through the cracks though. :S > > > > > OK for HEAD? > > > > I've gone over all of the above patches, all the changes make sense to > me too. I just one nitpick for your third patch, the > FixForEmptySignedReproducer: > > + if (numSignableEntriesInJar == 0) { > + // Allow jars with no signable entries to simply be > considered signed. > + // There should be no security risk in doing so. > + result = VerifyResult.SIGNED_OK; > + } > + > > Could you merge that if-statement with the ones above? I would even > start with this one and change the if(allEntriesSignedBySingleCert) to > an else if. > Yes, this is probably a bit better. Updated patch attached. > I can't quite okay this for HEAD because I have a lot of bias in this > review. =) Thanks for picking this up Adam! > Yet you're the most qualified to :) Thanks for the extra set of eyes! > Regards, > Danesh > Cheers, - Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121016/ff83eecd/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: FixForEmptySigned2.patch Type: text/x-patch Size: 2861 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121016/ff83eecd/FixForEmptySigned2.patch From adomurad at redhat.com Tue Oct 16 12:36:11 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 16 Oct 2012 15:36:11 -0400 Subject: [RFC][icedtea-web]: Small fix for PR1189 w/ reproducer In-Reply-To: <50786165.3020400@redhat.com> References: <50786165.3020400@redhat.com> Message-ID: <507DB72B.9040108@redhat.com> On 10/12/2012 02:28 PM, Saad Mohammad wrote: > Hi, > > The patches attached includes the reproducer and the fix for PR1189. > > > CHANGELOG - BUG FIX > ======================================================================== > 2012-10-12 Saad Mohammad > > Fixes PR1189. > * netx/net/sourceforge/jnlp/PluginBridge.java (PluginBridge): Nitpick, (PluginBridge) should be on new-line. > Overrides main-class name with the one specified in the jnlp > file if applet tag contains a jnlp_href. > * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java (parse): > Removes null assigning to atts if code attribute is missing. > > CHANGELOG - REPRODUCER > ======================================================================== > 2012-10-12 Saad Mohammad > > Adds reproducer for PR1189. > * > tests/reproducers/simple/AppletTagWithMissingCodeAttribute/resources/AppletTagWithMissingCodeAttribute.html: > Simple webpage which contains an applet tag with no code attribute. > * > tests/reproducers/simple/AppletTagWithMissingCodeAttribute/resources/AppletTagWithMissingCodeAttribute.jnlp: > Jnlp file that is used by the webpages using jnlp_href. > * > tests/reproducers/simple/AppletTagWithMissingCodeAttribute/srcs/SimpleApplet.java: > Simple applet class that outputs a string. > * > tests/reproducers/simple/AppletTagWithMissingCodeAttribute/testcases/AppletTagWithMissingCodeAttribute.java: > Testcase that tests applets without code attribute in html pages. > Reproducer review first, comments inline: > diff --git > a/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/resources/AppletTagWithMissingCodeAttribute.html > b/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/resources/AppletTagWithMissingCodeAttribute.html > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/resources/AppletTagWithMissingCodeAttribute.html > @@ -0,0 +1,44 @@ > + > + > +

> + > + value="AppletTagWithMissingCodeAttribute.jnlp"> > + > +

> + > + > diff --git > a/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/resources/AppletTagWithMissingCodeAttribute.jnlp > b/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/resources/AppletTagWithMissingCodeAttribute.jnlp > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/resources/AppletTagWithMissingCodeAttribute.jnlp > @@ -0,0 +1,57 @@ > + > + > + > + > + AppletTagWithMissingCodeAttribute > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web "/> > + AppletTagWithMissingCodeAttribute > + > + > + > + > + > + > + + documentBase="." > + name="SimpleApplet" > + main-class="SimpleApplet" > + width="100" > + height="100"> > + > + > diff --git > a/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/srcs/SimpleApplet.java > b/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/srcs/SimpleApplet.java > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/srcs/SimpleApplet.java > @@ -0,0 +1,47 @@ > +/* SimpleApplet.java > +Copyright (C) 2011 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import java.applet.Applet; > + > + at SuppressWarnings("serial") > +public class SimpleApplet extends Applet { > + > + @Override > + public void start() { > + System.out.println("*** APPLET FINISHED ***"); > + } > +} > Neither here nor there, but it would be nice if there was a standard 'simple applet' that just did this, instead of each test that needs an applet like this having their own. > diff --git > a/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/testcases/AppletTagWithMissingCodeAttribute.java > b/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/testcases/AppletTagWithMissingCodeAttribute.java > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/simple/AppletTagWithMissingCodeAttribute/testcases/AppletTagWithMissingCodeAttribute.java > @@ -0,0 +1,58 @@ > +/* AppletTagWithMissingCodeAttribute.java > + Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > +*/ > + > +import junit.framework.Assert; > +import net.sourceforge.jnlp.ProcessResult; > +import net.sourceforge.jnlp.ServerAccess.AutoClose; > +import net.sourceforge.jnlp.browsertesting.BrowserTest; > +import net.sourceforge.jnlp.browsertesting.Browsers; > +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; > +import net.sourceforge.jnlp.annotations.TestInBrowsers; > +import org.junit.Test; > + > +public class AppletTagWithMissingCodeAttribute extends BrowserTest { > + > + final static String s = > AutoOkClosingListener.MAGICAL_OK_CLOSING_STRING; > + > + @Test > + @TestInBrowsers(testIn = { Browsers.one }) > + public void EmbeddedAppletWithMissingCodeAttribute() throws > Exception { > + ProcessResult pr = > server.executeBrowser("/AppletTagWithMissingCodeAttribute.html", > AutoClose.CLOSE_ON_CORRECT_END); > + Assert.assertTrue("SimpleApplet.class did not correctly > launched in I would prefer if it was simply a message that said "APPLET FINISHED" or so was not found. The fact that it incorrectly launched can be inferred. > AppletTagWithMissingCodeAttribute.html: " + pr.stdout + pr.stderr, > + pr.stdout.contains(s)); > + } > +} Otherwise looks good. Implementation next: > diff --git a/netx/net/sourceforge/jnlp/PluginBridge.java > b/netx/net/sourceforge/jnlp/PluginBridge.java > --- a/netx/net/sourceforge/jnlp/PluginBridge.java > +++ b/netx/net/sourceforge/jnlp/PluginBridge.java > @@ -109,6 +109,10 @@ > String fileName = > jarDesc.getLocation().toExternalForm(); > this.jars.add(fileName); > } > + > + if (jnlpFile.isApplet()) > + main = jnlpFile.getApplet().getMainClass(); > + I would rather consolidate all the logic regarding the main-class-name as close together as possible. > } catch (MalformedURLException e) { > // Don't fail because we cannot get the jnlp file. > Parameters are optional not required. > // it is the site developer who should ensure that > file exist. > @@ -168,6 +172,9 @@ > else > name = name + " applet"; Probably can move the 'main' logic above here, so its easier to see among the other main-class-name handling (Just have to check 'useJNLPHref') > > + if (main == null) > + throw new NullPointerException("Main-class could not be > determined."); > + Manually throwing a NPE seems to me less useful than other types of exceptions, because NPE usually signifies an accidental de-reference. Shouldn't this be a launch exception or something ? > if (main.endsWith(".class")) > main = main.substring(0, main.length() - 6); > > diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java > b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java > --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java > +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java > @@ -2060,7 +2060,6 @@ > > if (atts.get("code") == null && > atts.get("object") == null) { > statusMsgStream.println(embedRequiresCodeWarning); > - atts = null; > } > > if (atts.get("width") == null || > !isInt(atts.get("width"))) { Overall looks good, Thanks, - Adam From omajid at redhat.com Tue Oct 16 12:56:26 2012 From: omajid at redhat.com (Omair Majid) Date: Tue, 16 Oct 2012 15:56:26 -0400 Subject: [icedtea-web][rfc] Fix to AppletBaseURL reproducer In-Reply-To: <507853E1.70905@redhat.com> References: <507853E1.70905@redhat.com> Message-ID: <507DBBEA.4030507@redhat.com> On 10/12/2012 01:31 PM, Adam Domurad wrote: > This fixes random failures caused by the 'xception' matcher, as well as > speeding up execution. I suspect it's a SecurityException thrown because applet's are not allowed to invoke System.exit(). Maybe you should wrap it up in a try-catch (-and-ignore) block. That would avoid changes to the xception matcher. Could you update the comment on the System.exit line to be more accurate too? The changes to sleep/timeout look fine. Cheers, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From adomurad at redhat.com Tue Oct 16 13:24:18 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 16 Oct 2012 16:24:18 -0400 Subject: [icedtea-web][rfc] Fix to AppletBaseURL reproducer In-Reply-To: <507DBBEA.4030507@redhat.com> References: <507853E1.70905@redhat.com> <507DBBEA.4030507@redhat.com> Message-ID: <507DC272.1010405@redhat.com> On 10/16/2012 03:56 PM, Omair Majid wrote: > On 10/12/2012 01:31 PM, Adam Domurad wrote: >> This fixes random failures caused by the 'xception' matcher, as well as >> speeding up execution. > I suspect it's a SecurityException thrown because applet's are not > allowed to invoke System.exit(). Maybe you should wrap it up in a > try-catch (-and-ignore) block. That would avoid changes to the xception > matcher. > > Could you update the comment on the System.exit line to be more accurate > too? > > The changes to sleep/timeout look fine. > > Cheers, > Omair > I would argue that the 'xception' matcher is overly broad and a test weakness. Currently there is a NPE while looking up the security context - which I think is caused by this exit() call. However, there's a lot of things that can cause exceptions on shutdown, I think (Jiri may know better here.) This is why I'm in favour of changing 'xception' to the appropriate exception, or getting rid of it if its just a catch-all. Updated patch attached, with 'xception' matcher still removed. -------------- next part -------------- A non-text attachment was scrubbed... Name: appletbaseurlfix2.patch Type: text/x-patch Size: 8982 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121016/03099069/appletbaseurlfix2.patch From andrew at icedtea.classpath.org Tue Oct 16 13:25:00 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:25:00 +0000 Subject: /hg/release/icedtea6-1.10: 7 new changesets Message-ID: changeset 6df81d93af9c in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=6df81d93af9c author: Andrew John Hughes date: Fri Oct 12 02:18:24 2012 +0100 Add 2012/10/16 security updates. 2012-10-11 Andrew John Hughes * Makefile.am: (SECURITY_PATCHES): Add new patches. * patches/ecj/override.patch: Add new cases in P11Key and RMIConnectionImpl introduced by security patches. * patches/ssl.patch: Removed old unneeded patch which breaks with this update. * patches/security/20111018/7092186.patch: Backport of patch added to OpenJDK6 by Oracle as part of the last security update but not included in the bundle delivered ahead of time. * patches/security/20121016/6631398.patch, * patches/security/20121016/7093490.patch, * patches/security/20121016/7143535.patch, * patches/security/20121016/7158801.patch, * patches/security/20121016/7167656.patch, * patches/security/20121016/7169884.patch, * patches/security/20121016/7169888.patch, * patches/security/20121016/7172522.patch, * patches/security/20121016/7176337.patch, * patches/security/20121016/7186286.patch, * patches/security/20121016/7189103.patch, * patches/security/20121016/7189490.patch, * patches/security/20121016/7189567.patch, * patches/security/20121016/7192975.patch, * patches/security/20121016/7195194.patch, * patches/security/20121016/7195917.patch, * patches/security/20121016/7195919.patch, * patches/security/20121016/7198296.patch, * patches/security/20121016/7198606.patch, * patches/security/20121016/hs20/7158800.patch, * patches/security/20121016/hs20/7158804.patch, * patches/security/20121016/original/7158800.patch, * patches/security/20121016/original/7158804.patch: New patches. changeset bab6ae8c1c86 in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=bab6ae8c1c86 author: Andrew John Hughes date: Fri Oct 12 02:20:06 2012 +0100 Update with latest security fixes. 2012-10-11 Andrew John Hughes * NEWS: Update with latest security fixes. changeset 1fc1f8fb1d66 in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=1fc1f8fb1d66 author: Andrew John Hughes date: Fri Oct 12 03:03:03 2012 +0100 Merge changeset 1277ee79b37c in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=1277ee79b37c author: Andrew John Hughes date: Fri Oct 12 19:33:48 2012 +0100 Prepare for 1.10.10. 2012-10-12 Andrew John Hughes * NEWS: Set release date for 1.10.10. * configure.ac: Bump to 1.10.10. changeset f51056fa74b0 in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=f51056fa74b0 author: Andrew John Hughes date: Mon Oct 15 19:45:41 2012 +0100 S7175845: "jar uf" changes file permissions unexpectedly S7177216: native2ascii changes file permissions of input file changeset fdde7e12b1e5 in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=fdde7e12b1e5 author: Andrew John Hughes date: Tue Oct 16 16:13:14 2012 +0100 S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo 2012-10-15 Andrew John Hughes * Makefile.am: (ICEDTEA_PATCHES): Add new patch. * NEWS: Mention S7199153. * patches/openjdk/7199153-try_with_resources_pushed_to_6.patch: Added to fix tests from previous commit. changeset 9e76bb826728 in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=9e76bb826728 author: Andrew John Hughes date: Tue Oct 16 21:24:35 2012 +0100 Added tag icedtea6-1.10.10 for changeset fdde7e12b1e5 diffstat: .hgtags | 1 + ChangeLog | 78 + Makefile.am | 30 +- NEWS | 32 +- acinclude.m4 | 4 +- configure.ac | 2 +- patches/ecj/override.patch | 22 + patches/openjdk/7175845-jar_uf_changes_file_permissions.patch | 113 + patches/openjdk/7177216-native2ascii_changes_file_permissions.patch | 110 + patches/openjdk/7199153-try_with_resources_pushed_to_6.patch | 194 + patches/security/20111018/7092186.patch | 32 + patches/security/20121016/6631398.patch | 20 + patches/security/20121016/7093490.patch | 28 + patches/security/20121016/7143535.patch | 31 + patches/security/20121016/7158801.patch | 30 + patches/security/20121016/7167656.patch | 75 + patches/security/20121016/7169884.patch | 349 ++ patches/security/20121016/7169888.patch | 125 + patches/security/20121016/7172522.patch | 36 + patches/security/20121016/7176337.patch | 29 + patches/security/20121016/7186286.patch | 552 +++ patches/security/20121016/7189103.patch | 39 + patches/security/20121016/7189490.patch | 55 + patches/security/20121016/7189567.patch | 95 + patches/security/20121016/7192975.patch | 35 + patches/security/20121016/7195194.patch | 29 + patches/security/20121016/7195917.patch | 88 + patches/security/20121016/7195919.patch | 63 + patches/security/20121016/7198296.patch | 114 + patches/security/20121016/7198606.patch | 28 + patches/security/20121016/hs20/7158800.patch | 1413 ++++++++++ patches/security/20121016/hs20/7158804.patch | 28 + patches/security/20121016/original/7158800.patch | 1389 +++++++++ patches/security/20121016/original/7158804.patch | 19 + patches/ssl.patch | 43 - 35 files changed, 5281 insertions(+), 50 deletions(-) diffs (truncated from 5523 to 500 lines): diff -r d64dd8e0811e -r 9e76bb826728 .hgtags --- a/.hgtags Wed Sep 05 11:43:29 2012 +0200 +++ b/.hgtags Tue Oct 16 21:24:35 2012 +0100 @@ -34,3 +34,4 @@ 78c05cb3e3c770ebf53babfb4bc825cd059d3b57 icedtea6-1.10.7 b69d3219265a08e9eea4c47d7acfb32465be6070 icedtea6-1.10.8 27cee12e2bc9cd27d97d68ea53e1bb005416d4e9 icedtea6-1.10.9 +fdde7e12b1e503d84a6bab57d8a0c29cfb2b0f21 icedtea6-1.10.10 diff -r d64dd8e0811e -r 9e76bb826728 ChangeLog --- a/ChangeLog Wed Sep 05 11:43:29 2012 +0200 +++ b/ChangeLog Tue Oct 16 21:24:35 2012 +0100 @@ -1,3 +1,81 @@ +2012-10-15 Andrew John Hughes + + * Makefile.am: + (ICEDTEA_PATCHES): Add new patch. + * NEWS: Mention S7199153. + * patches/openjdk/7199153-try_with_resources_pushed_to_6.patch: + Added to fix tests from previous commit. + +2012-10-15 Andrew John Hughes + + * Makefile.am: + (ICEDTEA_PATCHES): Add new patches. + * NEWS: + Mention S7175845 and S7177216. + * patches/openjdk/7175845-jar_uf_changes_file_permissions.patch, + * patches/openjdk/7177216-native2ascii_changes_file_permissions.patch: + New backports to fix regressions caused by + S7143606. + +2012-10-12 Andrew John Hughes + + * NEWS: Set release date for 1.10.10. + * configure.ac: Bump to 1.10.10. + +2012-10-11 Andrew John Hughes + + * NEWS: + Update with latest security fixes. + +2012-10-11 Andrew John Hughes + + * Makefile.am: + (SECURITY_PATCHES): Add new patches. + * patches/ecj/override.patch: + Add new cases in P11Key and RMIConnectionImpl + introduced by security patches. + * patches/ssl.patch: + Removed old unneeded patch which breaks with + this update. + * patches/security/20111018/7092186.patch: + Backport of patch added to OpenJDK6 by Oracle + as part of the last security update but not + included in the bundle delivered ahead of time. + * patches/security/20121016/6631398.patch, + * patches/security/20121016/7093490.patch, + * patches/security/20121016/7143535.patch, + * patches/security/20121016/7158801.patch, + * patches/security/20121016/7167656.patch, + * patches/security/20121016/7169884.patch, + * patches/security/20121016/7169888.patch, + * patches/security/20121016/7172522.patch, + * patches/security/20121016/7176337.patch, + * patches/security/20121016/7186286.patch, + * patches/security/20121016/7189103.patch, + * patches/security/20121016/7189490.patch, + * patches/security/20121016/7189567.patch, + * patches/security/20121016/7192975.patch, + * patches/security/20121016/7195194.patch, + * patches/security/20121016/7195917.patch, + * patches/security/20121016/7195919.patch, + * patches/security/20121016/7198296.patch, + * patches/security/20121016/7198606.patch, + * patches/security/20121016/hs20/7158800.patch, + * patches/security/20121016/hs20/7158804.patch, + * patches/security/20121016/original/7158800.patch, + * patches/security/20121016/original/7158804.patch: + New patches. + +2012-03-19 Andrew John Hughes + + PR 1194: + * acinclude.m4: + (IT_CHECK_FOR_JDK): Update JDK home directory + check list, adding some missing 1.6 entries + and removing generic ones which may now pick + up an unwanted 1.7 installation. + * NEWS: Updated. + 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diff -r d64dd8e0811e -r 9e76bb826728 Makefile.am --- a/Makefile.am Wed Sep 05 11:43:29 2012 +0200 +++ b/Makefile.am Tue Oct 16 21:24:35 2012 +0100 @@ -207,6 +207,7 @@ patches/security/20111018/7096936.patch \ patches/security/20111018/7046794.patch \ patches/security/20111018/7077466.patch \ + patches/security/20111018/7092186.patch \ patches/security/20120214/7082299.patch \ patches/security/20120214/7088367.patch \ patches/security/20120214/7110683.patch \ @@ -229,7 +230,28 @@ patches/security/20120612/7160757.patch \ patches/security/20120830/7162476-xmldecoder_via_classfinder.patch \ patches/security/20120830/7163201-simplify_toolkit_internal_references.patch \ - patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch + patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch \ + patches/security/20121016/6631398.patch \ + patches/security/20121016/7093490.patch \ + patches/security/20121016/7143535.patch \ + patches/security/20121016/${HSBUILD}/7158800.patch \ + patches/security/20121016/7158801.patch \ + patches/security/20121016/${HSBUILD}/7158804.patch \ + patches/security/20121016/7167656.patch \ + patches/security/20121016/7169884.patch \ + patches/security/20121016/7169888.patch \ + patches/security/20121016/7172522.patch \ + patches/security/20121016/7176337.patch \ + patches/security/20121016/7186286.patch \ + patches/security/20121016/7189103.patch \ + patches/security/20121016/7189490.patch \ + patches/security/20121016/7189567.patch \ + patches/security/20121016/7192975.patch \ + patches/security/20121016/7195194.patch \ + patches/security/20121016/7195917.patch \ + patches/security/20121016/7195919.patch \ + patches/security/20121016/7198296.patch \ + patches/security/20121016/7198606.patch SPECIAL_SECURITY_PATCH = patches/security/20120214/7112642.patch @@ -266,7 +288,6 @@ patches/version.patch \ patches/hotspot/$(HSBUILD)/version-hotspot.patch \ patches/hotspot/$(HSBUILD)/text-relocations.patch \ - patches/ssl.patch \ patches/rmi_amd64.patch \ patches/tools.patch \ patches/use-system-tzdata.patch \ @@ -403,7 +424,10 @@ patches/openjdk/7185678-xmenuitem_peer_npe.patch \ patches/openjdk/6815182-gssapi_spnego_does_not_work_with_server.patch \ patches/openjdk/6979329-ccacheinput_stream_fails_to_read_ticket_cache.patch \ - patches/openjdk/7110373-krb5_test_infrastructure.patch + patches/openjdk/7110373-krb5_test_infrastructure.patch \ + patches/openjdk/7175845-jar_uf_changes_file_permissions.patch \ + patches/openjdk/7177216-native2ascii_changes_file_permissions.patch \ + patches/openjdk/7199153-try_with_resources_pushed_to_6.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r d64dd8e0811e -r 9e76bb826728 NEWS --- a/NEWS Wed Sep 05 11:43:29 2012 +0200 +++ b/NEWS Tue Oct 16 21:24:35 2012 +0100 @@ -9,7 +9,37 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.10.10 (2012-XX-XX): +New in release 1.10.10 (2012-10-16): + +* Security fixes + - S6631398, CVE-2012-3216: FilePermission improved path checking + - S7093490: adjust package access in rmiregistry + - S7143535, CVE-2012-5068: ScriptEngine corrected permissions + - S7167656, CVE-2012-5077: Multiple Seeders are being created + - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types + - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector + - S7172522, CVE-2012-5072: Improve DomainCombiner checking + - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC + - S7189103, CVE-2012-5069: Executors needs to maintain state + - S7189490: More improvements to DomainCombiner checking + - S7189567, CVE-2012-5085: java net obselete protocol + - S7192975, CVE-2012-5071: Conditional usage check is wrong + - S7195194, CVE-2012-5084: Better data validation for Swing + - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved + - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance + - S7198296, CVE-2012-5089: Refactor classloader usage + - S7158800: Improve storage of symbol tables + - S7158801: Improve VM CompileOnly option + - S7158804: Improve config file parsing + - S7176337: Additional changes needed for 7158801 fix + - S7198606, CVE-2012-4416: Improve VM optimization +* Backports + - S7092186: adjust package access in rmiregistry +* Bug fixes + - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default + - S7175845: "jar uf" changes file permissions unexpectedly + - S7177216: native2ascii changes file permissions of input file + - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo New in release 1.10.9 (2012-08-31): diff -r d64dd8e0811e -r 9e76bb826728 acinclude.m4 --- a/acinclude.m4 Wed Sep 05 11:43:29 2012 +0200 +++ b/acinclude.m4 Tue Oct 16 21:24:35 2012 +0100 @@ -1140,9 +1140,9 @@ if test "x${enable_bootstrap}" = "xyes"; then BOOTSTRAP_VMS="/usr/lib/jvm/java-gcj /usr/lib/jvm/gcj-jdk /usr/lib/jvm/cacao"; fi - for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-openjdk \ + for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-1.6.0 \ /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ - /usr/lib/jvm/openjdk /usr/lib/jvm/java-icedtea ; do + /usr/lib/jvm/java-1.6.0-openjdk /usr/lib/jvm/icedtea-6 ; do if test -d $dir; then SYSTEM_JDK_DIR=$dir break diff -r d64dd8e0811e -r 9e76bb826728 configure.ac --- a/configure.ac Wed Sep 05 11:43:29 2012 +0200 +++ b/configure.ac Tue Oct 16 21:24:35 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea6],[1.10.10pre],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.10.10],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r d64dd8e0811e -r 9e76bb826728 patches/ecj/override.patch --- a/patches/ecj/override.patch Wed Sep 05 11:43:29 2012 +0200 +++ b/patches/ecj/override.patch Tue Oct 16 21:24:35 2012 +0100 @@ -229,3 +229,25 @@ public int compareTo(X509IssuerSerial another) { int cissuer = issuer.toString() .compareTo(another.issuer.toString()); +diff -Nru openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java +--- openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:58:37.130814619 +0100 ++++ openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:59:39.699829277 +0100 +@@ -168,7 +168,6 @@ + this.defaultContextClassLoader = + AccessController.doPrivileged( + new PrivilegedAction() { +- @Override + public ClassLoader run() { + return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), + dcl); +diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java +--- openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:18:07.340676704 +0100 ++++ openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:17:40.092039288 +0100 +@@ -216,7 +216,6 @@ + /** + * Return bit length of the key. + */ +- @Override + public int length() { + return keyLength; + } diff -r d64dd8e0811e -r 9e76bb826728 patches/openjdk/7175845-jar_uf_changes_file_permissions.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/7175845-jar_uf_changes_file_permissions.patch Tue Oct 16 21:24:35 2012 +0100 @@ -0,0 +1,113 @@ +# HG changeset patch +# User mbankal +# Date 1342460916 25200 +# Node ID 2366192c7fcb928a2adec2bdf08138688dac0423 +# Parent 0e34d43263864db83322f337262fbb2be3be5d17 +7175845: "jar uf" changes file permissions unexpectedly +Reviewed-by: ohair +Contributed-by: mala.bankal at oracle.com + +diff --git a/src/share/classes/sun/tools/jar/Main.java b/src/share/classes/sun/tools/jar/Main.java +--- openjdk/jdk/src/share/classes/sun/tools/jar/Main.java ++++ openjdk/jdk/src/share/classes/sun/tools/jar/Main.java +@@ -134,7 +134,7 @@ + File dir = file.getParentFile(); + if (dir == null) + dir = new File("."); +- return sun.misc.IOUtils.createTempFile("jartmp", null, dir); ++ return File.createTempFile("jartmp", null, dir); + } + + private boolean ok; +diff --git a/test/tools/jar/UpdateJar.java b/test/tools/jar/UpdateJar.java +new file mode 100644 +--- /dev/null ++++ openjdk/jdk/test/tools/jar/UpdateJar.java +@@ -0,0 +1,87 @@ ++/* ++ * Copyright (c) 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/** ++ * @test ++ * @bug 7175845 ++ * @summary jar -uf should not change file permission ++ */ ++ ++import java.io.*; ++import java.nio.file.*; ++import java.nio.file.attribute.*; ++import java.util.Set; ++import sun.tools.jar.Main; ++ ++public class UpdateJar { ++ ++ private static void cleanup(String... fnames) throws Throwable { ++ for (String fname : fnames) { ++ Files.deleteIfExists(Paths.get(fname)); ++ } ++ } ++ ++ public static void realMain(String[] args) throws Throwable { ++ if (!System.getProperty("os.name").startsWith("Windows")) { ++ String jar = "testUpdateJar.jar"; ++ String e0 = "testUpdateJar_entry0.txt"; ++ String e1 = "testUpdateJar_entry1.txt"; ++ cleanup(jar, e0, e1); ++ try { ++ try (FileOutputStream fos0 = new FileOutputStream(e0); ++ FileOutputStream fos1 = new FileOutputStream(e1)) { ++ fos0.write(0); ++ fos1.write(0); ++ } ++ String[] jarArgs = new String[] {"cfM0", jar, e0}; ++ if (!new Main(System.out, System.err, "jar").run(jarArgs)) { ++ fail("Could not create jar file."); ++ } ++ Set pm = Files.getPosixFilePermissions(Paths.get(jar)); ++ jarArgs = new String[] {"uf", jar, e1}; ++ if (!new Main(System.out, System.err, "jar").run(jarArgs)) { ++ fail("Could not create jar file."); ++ } ++ equal(pm, Files.getPosixFilePermissions(Paths.get(jar))); ++ } finally { ++ cleanup(jar, e0, e1); ++ } ++ } ++ } ++ ++ //--------------------- Infrastructure --------------------------- ++ static volatile int passed = 0, failed = 0; ++ static void pass() {passed++;} ++ static void fail() {failed++; Thread.dumpStack();} ++ static void fail(String msg) {System.out.println(msg); fail();} ++ static void unexpected(Throwable t) {failed++; t.printStackTrace();} ++ static void check(boolean cond) {if (cond) pass(); else fail();} ++ static void equal(Object x, Object y) { ++ if (x == null ? y == null : x.equals(y)) pass(); ++ else fail(x + " not equal to " + y);} ++ public static void main(String[] args) throws Throwable { ++ try {realMain(args);} catch (Throwable t) {unexpected(t);} ++ System.out.println("\nPassed = " + passed + " failed = " + failed); ++ if (failed > 0) throw new AssertionError("Some tests failed");} ++} ++ diff -r d64dd8e0811e -r 9e76bb826728 patches/openjdk/7177216-native2ascii_changes_file_permissions.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/7177216-native2ascii_changes_file_permissions.patch Tue Oct 16 21:24:35 2012 +0100 @@ -0,0 +1,110 @@ +# HG changeset patch +# User mbankal +# Date 1342030130 25200 +# Node ID 0e34d43263864db83322f337262fbb2be3be5d17 +# Parent 99b43838c5d0a55a92bccbb62e6df5ee685978b6 +7177216: native2ascii changes file permissions of input file +Reviewed-by: ohair + +diff --git a/src/share/classes/sun/tools/native2ascii/Main.java b/src/share/classes/sun/tools/native2ascii/Main.java +--- openjdk/jdk/src/share/classes/sun/tools/native2ascii/Main.java ++++ openjdk/jdk/src/share/classes/sun/tools/native2ascii/Main.java +@@ -237,7 +237,7 @@ + if (tempDir == null) + tempDir = new File(System.getProperty("user.dir")); + +- tempFile = sun.misc.IOUtils.createTempFile("_N2A", ".TMP", tempDir); ++ tempFile = File.createTempFile("_N2A", ".TMP", tempDir); + tempFile.deleteOnExit(); + + try { +diff --git a/test/sun/tools/native2ascii/Permission.java b/test/sun/tools/native2ascii/Permission.java +new file mode 100644 +--- /dev/null ++++ openjdk/jdk/test/sun/tools/native2ascii/Permission.java +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/** ++ * @test ++ * @bug 7177216 ++ * @summary resulting file of native2ascii should have normal permission ++ */ ++ ++import java.io.*; ++import java.nio.file.*; ++import java.nio.file.attribute.*; ++import sun.tools.native2ascii.Main; ++ ++public class Permission { ++ ++ private static void cleanup(String... fnames) throws Throwable { ++ for (String fname : fnames) { ++ Files.deleteIfExists(Paths.get(fname)); ++ } ++ } ++ ++ public static void realMain(String[] args) throws Throwable { ++ if (!System.getProperty("os.name").startsWith("Windows")) { ++ String src = "native2ascii_permtest_src"; ++ String dst = "native2ascii_permtest_dst"; ++ ++ cleanup(src, dst); ++ try { ++ try (FileOutputStream fos = new FileOutputStream(src)) { ++ fos.write('a'); fos.write('b'); fos.write('c'); ++ } ++ String[] n2aArgs = new String[] {"-encoding", "utf8", src, dst}; ++ if (!new Main().convert(n2aArgs)) { ++ fail("n2a failed."); ++ } ++ equal(Files.getPosixFilePermissions(Paths.get(src)), ++ Files.getPosixFilePermissions(Paths.get(dst))); ++ String[] a2nArgs = new String[] {"-reverse", "-encoding", "utf8", dst, src}; ++ if (!new Main().convert(a2nArgs)) { ++ fail("a2n failed."); ++ } ++ equal(Files.getPosixFilePermissions(Paths.get(src)), ++ Files.getPosixFilePermissions(Paths.get(dst))); ++ } finally { ++ cleanup(src, dst); ++ } ++ } ++ } ++ ++ //--------------------- Infrastructure --------------------------- ++ static volatile int passed = 0, failed = 0; ++ static void pass() {passed++;} ++ static void fail() {failed++; Thread.dumpStack();} ++ static void fail(String msg) {System.out.println(msg); fail();} ++ static void unexpected(Throwable t) {failed++; t.printStackTrace();} ++ static void check(boolean cond) {if (cond) pass(); else fail();} ++ static void equal(Object x, Object y) { ++ if (x == null ? y == null : x.equals(y)) pass(); ++ else fail(x + " not equal to " + y);} ++ public static void main(String[] args) throws Throwable { ++ try {realMain(args);} catch (Throwable t) {unexpected(t);} ++ System.out.println("\nPassed = " + passed + " failed = " + failed); ++ if (failed > 0) throw new AssertionError("Some tests failed");} ++} diff -r d64dd8e0811e -r 9e76bb826728 patches/openjdk/7199153-try_with_resources_pushed_to_6.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/7199153-try_with_resources_pushed_to_6.patch Tue Oct 16 21:24:35 2012 +0100 @@ -0,0 +1,194 @@ +# HG changeset patch +# User coffeys +# Date 1348007758 -3600 +# Node ID 0abac47de6d12023982e35effe00ea028d613b5e +# Parent 5998d43cb08ce2477ad9ba7970a26ef5be1f175c +7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo +Reviewed-by: ohair + +diff --git a/test/sun/tools/native2ascii/Permission.java b/test/sun/tools/native2ascii/Permission.java +--- openjdk/jdk/test/sun/tools/native2ascii/Permission.java ++++ openjdk/jdk/test/sun/tools/native2ascii/Permission.java +@@ -21,25 +21,43 @@ + * questions. + */ + +-/** From andrew at icedtea.classpath.org Tue Oct 16 13:31:29 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:31:29 +0000 Subject: /hg/release/icedtea7-forest-2.2: Added tag icedtea-2.2.3 for cha... Message-ID: changeset 32574ae3c2be in /hg/release/icedtea7-forest-2.2 details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2?cmd=changeset;node=32574ae3c2be author: andrew date: Tue Oct 16 21:31:05 2012 +0100 Added tag icedtea-2.2.3 for changeset 0fd1b10097bd diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 0fd1b10097bd -r 32574ae3c2be .hgtags --- a/.hgtags Fri Aug 31 20:57:19 2012 +0100 +++ b/.hgtags Tue Oct 16 21:31:05 2012 +0100 @@ -176,3 +176,4 @@ 8beaec91886d1288117df129aad19d9690c0c852 icedtea-2.2 49a6fc8f712f3f04d4e49e379cfc3d111b21182e icedtea-2.2.1 0b776ef594741d3c316eb6b7b4e2b53a23f5b942 icedtea-2.2.2 +0fd1b10097bd083b99466e104e2eecbfa1f24f1a icedtea-2.2.3 From andrew at icedtea.classpath.org Tue Oct 16 13:31:35 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:31:35 +0000 Subject: /hg/release/icedtea7-forest-2.2/corba: Added tag icedtea-2.2.3 f... Message-ID: changeset 12fee4f9ac22 in /hg/release/icedtea7-forest-2.2/corba details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/corba?cmd=changeset;node=12fee4f9ac22 author: andrew date: Tue Oct 16 21:31:06 2012 +0100 Added tag icedtea-2.2.3 for changeset 64c5506f4a4b diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 64c5506f4a4b -r 12fee4f9ac22 .hgtags --- a/.hgtags Fri Aug 31 20:57:19 2012 +0100 +++ b/.hgtags Tue Oct 16 21:31:06 2012 +0100 @@ -176,3 +176,4 @@ b165245a9c918925d624b79c216425a1c601082e icedtea-2.2 22e1e47a3e4f5cac81e0a8b4b635752fb1fdb571 icedtea-2.2.1 38deb372c569b4c824bd3913567c0ea5844e34a9 icedtea-2.2.2 +64c5506f4a4b50657ce32a68dbf4c6aecd07e4bf icedtea-2.2.3 From andrew at icedtea.classpath.org Tue Oct 16 13:31:41 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:31:41 +0000 Subject: /hg/release/icedtea7-forest-2.2/jaxp: Added tag icedtea-2.2.3 fo... Message-ID: changeset dc64245ac19d in /hg/release/icedtea7-forest-2.2/jaxp details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jaxp?cmd=changeset;node=dc64245ac19d author: andrew date: Tue Oct 16 21:31:06 2012 +0100 Added tag icedtea-2.2.3 for changeset d7e1594436a6 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r d7e1594436a6 -r dc64245ac19d .hgtags --- a/.hgtags Fri Aug 31 20:57:20 2012 +0100 +++ b/.hgtags Tue Oct 16 21:31:06 2012 +0100 @@ -176,3 +176,4 @@ a98d6a2f14a13957841d9836711d5b35ca3146af icedtea-2.2 c456e7c89da80da5786dd630145c707fc676f06e icedtea-2.2.1 335fb0b059b720dc8d066592f6296d086bb40e9e icedtea-2.2.2 +d7e1594436a685ddae0a15bd3cb93be4e3cbe405 icedtea-2.2.3 From andrew at icedtea.classpath.org Tue Oct 16 13:31:46 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:31:46 +0000 Subject: /hg/release/icedtea7-forest-2.2/jaxws: Added tag icedtea-2.2.3 f... Message-ID: changeset b41293d57940 in /hg/release/icedtea7-forest-2.2/jaxws details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jaxws?cmd=changeset;node=b41293d57940 author: andrew date: Tue Oct 16 21:31:08 2012 +0100 Added tag icedtea-2.2.3 for changeset e029fce63568 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r e029fce63568 -r b41293d57940 .hgtags --- a/.hgtags Fri Aug 31 20:57:21 2012 +0100 +++ b/.hgtags Tue Oct 16 21:31:08 2012 +0100 @@ -176,3 +176,4 @@ 78ae35b1ed35a192b1bb15974aab9551c44bf713 icedtea-2.2 abfb890c262a221b1cec76e43cf2a550ea166d84 icedtea-2.2.1 5471e01ef43b25d1546afaad51dad25b2b5e0aeb icedtea-2.2.2 +e029fce63568e22c93d7d2943dcc0d0a26302425 icedtea-2.2.3 From andrew at icedtea.classpath.org Tue Oct 16 13:31:53 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:31:53 +0000 Subject: /hg/release/icedtea7-forest-2.2/langtools: Added tag icedtea-2.2... Message-ID: changeset e96efe42e3d5 in /hg/release/icedtea7-forest-2.2/langtools details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/langtools?cmd=changeset;node=e96efe42e3d5 author: andrew date: Tue Oct 16 21:31:09 2012 +0100 Added tag icedtea-2.2.3 for changeset f5e3d40e7849 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r f5e3d40e7849 -r e96efe42e3d5 .hgtags --- a/.hgtags Fri Aug 31 20:57:22 2012 +0100 +++ b/.hgtags Tue Oct 16 21:31:09 2012 +0100 @@ -177,3 +177,4 @@ 2176128e2f5733e233aa6502bca1843eaaff7ac5 icedtea-2.2 f855bdb3753765a59b638693137cde16ce1267c3 icedtea-2.2.1 beea46c7086b21ae604bfaec7f6ffb615f652e88 icedtea-2.2.2 +f5e3d40e7849fb0b52d0d2ac2238f072c86fd2cc icedtea-2.2.3 From andrew at icedtea.classpath.org Tue Oct 16 13:32:00 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:32:00 +0000 Subject: /hg/release/icedtea7-forest-2.2/hotspot: 5 new changesets Message-ID: changeset bf008614846d in /hg/release/icedtea7-forest-2.2/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/hotspot?cmd=changeset;node=bf008614846d author: kvn date: Wed May 23 12:11:25 2012 -0700 7158801: Improve VM CompileOnly option Summary: Fixed buffer overflow during parsing flags -XX:CompileCommand=, -XX:CompileOnly= and command lines in .hotspot_compiler file. Reviewed-by: never changeset 90113e624cb5 in /hg/release/icedtea7-forest-2.2/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/hotspot?cmd=changeset;node=90113e624cb5 author: kamg date: Fri Jun 08 12:49:52 2012 -0400 7158804: Improve config file parsing Summary: Check buffer length when reading Reviewed-by: dholmes, dcubed changeset b86d003a0ed6 in /hg/release/icedtea7-forest-2.2/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/hotspot?cmd=changeset;node=b86d003a0ed6 author: kvn date: Mon Jun 18 09:50:43 2012 -0700 7158807: Revise stack management with volatile call sites Summary: Add missing stack banging into method handle assebly code and throw a StackOverflowError. Reviewed-by: jrose, twisti changeset 043ccbc6b82c in /hg/release/icedtea7-forest-2.2/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/hotspot?cmd=changeset;node=043ccbc6b82c author: kvn date: Wed Sep 19 21:14:10 2012 -0700 7198606: Improve VM optimization Reviewed-by: roland, twisti changeset 864418cd5667 in /hg/release/icedtea7-forest-2.2/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/hotspot?cmd=changeset;node=864418cd5667 author: andrew date: Tue Oct 16 21:31:10 2012 +0100 Added tag icedtea-2.2.3 for changeset 043ccbc6b82c diffstat: .hgtags | 1 + src/cpu/sparc/vm/methodHandles_sparc.cpp | 31 ++++++++++++++++++++++++++ src/cpu/x86/vm/methodHandles_x86.cpp | 38 +++++++++++++++++++++++++++++-- src/share/vm/compiler/compilerOracle.cpp | 4 +- src/share/vm/opto/loopTransform.cpp | 3 ++ src/share/vm/runtime/arguments.cpp | 2 +- 6 files changed, 73 insertions(+), 6 deletions(-) diffs (194 lines): diff -r f36619598d31 -r 864418cd5667 .hgtags --- a/.hgtags Fri Aug 31 20:57:22 2012 +0100 +++ b/.hgtags Tue Oct 16 21:31:10 2012 +0100 @@ -283,3 +283,4 @@ b11130d646c2949fce6b32485209e6c17b0a7863 icedtea-2.2 158d5b869cf10d5817f236d3b68985990b0d4040 icedtea-2.2.1 7943ec1a82248f5f7ad998eac5168e0c0223827a icedtea-2.2.2 +043ccbc6b82c6f5f9cc8e216cd41ea204d877a4a icedtea-2.2.3 diff -r f36619598d31 -r 864418cd5667 src/cpu/sparc/vm/methodHandles_sparc.cpp --- a/src/cpu/sparc/vm/methodHandles_sparc.cpp Fri Aug 31 20:57:22 2012 +0100 +++ b/src/cpu/sparc/vm/methodHandles_sparc.cpp Tue Oct 16 21:31:10 2012 +0100 @@ -698,6 +698,17 @@ if (arg_slots.is_constant() && arg_slots.as_constant() == 0) return; + // We have to insert at least one word, so bang the stack. + if (UseStackBanging) { + // Save G3_method_handle since bang_stack_with_offset uses it as a temp register + __ mov(G3_method_handle, temp_reg); + int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0); + if (frame_size <= 0) + frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size); + __ mov(temp_reg, G3_method_handle); + } + assert_different_registers(argslot_reg, temp_reg, temp2_reg, temp3_reg, (!arg_slots.is_register() ? Gargs : arg_slots.as_register())); @@ -1702,6 +1713,14 @@ "copied argument(s) must fall within current frame"); } + if (UseStackBanging) { + // Save G3_method_handle since bang_stack_with_offset uses it as a temp register + __ mov(G3_method_handle, O3_scratch); + // Bang the stack before pushing args. + int frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + __ mov(O3_scratch, G3_method_handle); + } // insert location is always the bottom of the argument list: __ neg(O1_stack_move); push_arg_slots(_masm, O0_argslot, O1_stack_move, O2_scratch, O3_scratch); @@ -2118,6 +2137,18 @@ // The return handler will further cut back the stack when it takes // down the RF. Perhaps there is a way to streamline this further. + if (UseStackBanging) { + // Save G3_method_handle since bang_stack_with_offset uses it as a temp register + __ mov(G3_method_handle, O4_scratch); + // Bang the stack before recursive call. + // Even if slots == 0, we are inside a RicochetFrame. + int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1; + if (frame_size < 0) { + frame_size = 256 * Interpreter::stackElementSize; // conservative + } + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + __ mov(O4_scratch, G3_method_handle); + } // State during recursive call: // ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc | __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); diff -r f36619598d31 -r 864418cd5667 src/cpu/x86/vm/methodHandles_x86.cpp --- a/src/cpu/x86/vm/methodHandles_x86.cpp Fri Aug 31 20:57:22 2012 +0100 +++ b/src/cpu/x86/vm/methodHandles_x86.cpp Tue Oct 16 21:31:10 2012 +0100 @@ -691,6 +691,14 @@ if (VerifyMethodHandles) verify_stack_move(_masm, arg_slots, -1); + // We have to insert at least one word, so bang the stack. + if (UseStackBanging) { + int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0); + if (frame_size <= 0) + frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size); + } + // Make space on the stack for the inserted argument(s). // Then pull down everything shallower than rax_argslot. // The stacked return address gets pulled down with everything else. @@ -1769,6 +1777,11 @@ "copied argument(s) must fall within current frame"); } + if (UseStackBanging) { + // Bang the stack before pushing args. + int frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + } // insert location is always the bottom of the argument list: Address insert_location = __ argument_address(constant(0)); int pre_arg_words = insert_location.disp() / wordSize; // return PC is pushed @@ -2206,6 +2219,15 @@ // The return handler will further cut back the stack when it takes // down the RF. Perhaps there is a way to streamline this further. + if (UseStackBanging) { + // Bang the stack before recursive call. + // Even if slots == 0, we are inside a RicochetFrame. + int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1; + if (frame_size < 0) { + frame_size = 256 * Interpreter::stackElementSize; // conservative + } + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + } // State during recursive call: // ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc | __ jump_to_method_handle_entry(rcx_recv, rdx_temp); @@ -2366,10 +2388,15 @@ // case in a 32-bit version of the VM) we have to save 'rsi' // on the stack because later on (at 'L_array_is_empty') 'rsi' // will be overwritten. - { if (rsi_temp == saved_last_sp) __ push(saved_last_sp); } + if (rsi_temp == saved_last_sp) { + __ push(saved_last_sp); + // Need to re-push return PC to keep it on stack top. + __ lea(saved_last_sp, ExternalAddress(SharedRuntime::ricochet_blob()->bounce_addr()).addr()); + __ push(saved_last_sp); + } // Also prepare a handy macro which restores 'rsi' if required. #define UNPUSH_RSI \ - { if (rsi_temp == saved_last_sp) __ pop(saved_last_sp); } + { if (rsi_temp == saved_last_sp) { __ pop(saved_last_sp); __ pop(saved_last_sp); } } __ jmp(L_array_is_empty); __ bind(L_skip); @@ -2382,7 +2409,12 @@ // called in the case of a null pointer exception will not be // confused by the extra value on the stack (it expects the // return pointer on top of the stack) - { if (rsi_temp == saved_last_sp) __ push(saved_last_sp); } + if (rsi_temp == saved_last_sp) { + __ push(saved_last_sp); + // Need to re-push return PC to keep it on stack top. + __ lea(saved_last_sp, ExternalAddress(SharedRuntime::ricochet_blob()->bounce_addr()).addr()); + __ push(saved_last_sp); + } // Check the array type. Register rbx_klass = rbx_temp; diff -r f36619598d31 -r 864418cd5667 src/share/vm/compiler/compilerOracle.cpp --- a/src/share/vm/compiler/compilerOracle.cpp Fri Aug 31 20:57:22 2012 +0100 +++ b/src/share/vm/compiler/compilerOracle.cpp Tue Oct 16 21:31:10 2012 +0100 @@ -573,7 +573,7 @@ char token[1024]; int pos = 0; int c = getc(stream); - while(c != EOF) { + while(c != EOF && pos < (int)(sizeof(token)-1)) { if (c == '\n') { token[pos++] = '\0'; parse_from_line(token); @@ -594,7 +594,7 @@ int pos = 0; const char* sp = str; int c = *sp++; - while (c != '\0') { + while (c != '\0' && pos < (int)(sizeof(token)-1)) { if (c == '\n') { token[pos++] = '\0'; parse_line(token); diff -r f36619598d31 -r 864418cd5667 src/share/vm/opto/loopTransform.cpp --- a/src/share/vm/opto/loopTransform.cpp Fri Aug 31 20:57:22 2012 +0100 +++ b/src/share/vm/opto/loopTransform.cpp Tue Oct 16 21:31:10 2012 +0100 @@ -2733,6 +2733,8 @@ result_mem = new (C, 1) ProjNode(call,TypeFunc::Memory); _igvn.register_new_node_with_optimizer(result_mem); +/* Disable following optimization until proper fix (add missing checks). + // If this fill is tightly coupled to an allocation and overwrites // the whole body, allow it to take over the zeroing. AllocateNode* alloc = AllocateNode::Ideal_allocation(base, this); @@ -2756,6 +2758,7 @@ #endif } } +*/ // Redirect the old control and memory edges that are outside the loop. Node* exit = head->loopexit()->proj_out(0); diff -r f36619598d31 -r 864418cd5667 src/share/vm/runtime/arguments.cpp --- a/src/share/vm/runtime/arguments.cpp Fri Aug 31 20:57:22 2012 +0100 +++ b/src/share/vm/runtime/arguments.cpp Tue Oct 16 21:31:10 2012 +0100 @@ -856,7 +856,7 @@ bool result = true; int c = getc(stream); - while(c != EOF) { + while(c != EOF && pos < (int)(sizeof(token)-1)) { if (in_white_space) { if (in_comment) { if (c == '\n') in_comment = false; From andrew at icedtea.classpath.org Tue Oct 16 13:32:08 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:32:08 +0000 Subject: /hg/release/icedtea7-forest-2.2/jdk: 24 new changesets Message-ID: changeset 2d7ac13c683e in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=2d7ac13c683e author: weijun date: Fri Jun 15 09:40:30 2012 +0800 6631398: FilePermission improved path checking Reviewed-by: mullan, skoivu, jdn changeset ff160c7dce56 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=ff160c7dce56 author: smarks date: Thu Jun 21 00:20:49 2012 -0700 7093490: adjust package access in rmiregistry Reviewed-by: ahgross, coffeys, dmocek changeset 6aa2570249db in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=6aa2570249db author: sundar date: Sat Aug 04 21:16:20 2012 +0530 7143535: ScriptEngine corrected permissions Reviewed-by: jjh changeset 0970e6ece141 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=0970e6ece141 author: dsamersoff date: Fri Jun 15 15:34:35 2012 +0400 7158796: Tighten properties checking in EnvHelp Summary: Move getProperty call out of computeBooleanFromString Reviewed-by: skoivu, sla changeset 30c862a7e068 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=30c862a7e068 author: mullan date: Thu Jun 07 12:31:16 2012 -0400 7163198: Tightened package accessibility 7169887: Tightened package accessibility Reviewed-by: hawtin changeset d976a89567c6 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=d976a89567c6 author: wetmore date: Mon May 21 15:42:08 2012 -0700 7167656: Multiple Seeders are being created Reviewed-by: smarks, mduigou, ahgross changeset 0cf9c052fc81 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=0cf9c052fc81 author: robm date: Tue Sep 11 14:45:22 2012 +0100 7169884: LogManager checks do not work correctly for sub-types Reviewed-by: alanb changeset 422f98c378fd in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=422f98c378fd author: dsamersoff date: Fri Jun 15 17:02:58 2012 +0400 7169888: Narrowing resource definitions in JMX RMI connector Summary: CPU bug, we can't put offending calls outside doPrivileged, but narrow granted permissions. Reviewed-by: ahgross, fparain changeset 6e83afeee7c8 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=6e83afeee7c8 author: mullan date: Tue Jun 19 13:16:19 2012 -0400 7172522: Improve DomainCombiner checking Reviewed-by: vinnie, ahgross changeset 920013f05b7e in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=920013f05b7e author: xuelei date: Mon Jul 30 20:32:52 2012 -0700 7186286: TLS implementation to better adhere to RFC Summary: also reviewed by Alexander Fomin , Andrew Gross, Sean Coffey Reviewed-by: valeriep, wetmore changeset 763a0d44dd4a in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=763a0d44dd4a author: chegar date: Mon Aug 20 22:10:39 2012 +0100 7189103: Executors needs to maintain state Reviewed-by: dholmes, hawtin changeset 0b2f1a84557a in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=0b2f1a84557a author: mullan date: Wed Aug 15 11:39:21 2012 -0400 7189490: More improvements to DomainCombiner checking Reviewed-by: ahgross, jdn, vinnie changeset a3b1d9651b9f in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=a3b1d9651b9f author: chegar date: Wed Aug 22 22:51:16 2012 +0100 7189567: java net obselete protocol Reviewed-by: alanb, ahgross changeset 4816d9c5f4d4 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=4816d9c5f4d4 author: dsamersoff date: Sun Sep 23 23:43:31 2012 +0400 7192975: Issue with JMX reflection Summary: Make security check unconditional Reviewed-by: ahgross, asaha Contributed-by: jaroslav.bachorik at oracle.com changeset 96e691d5858f in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=96e691d5858f author: rupashka date: Tue Sep 11 17:27:31 2012 +0400 7195194: Better data validation for Swing Reviewed-by: art, ahgross changeset f9c82665b673 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=f9c82665b673 author: malenkov date: Tue Sep 11 15:58:50 2012 +0400 7195549: Better bean object persistence Reviewed-by: art, ahgross changeset d2899129e97f in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=d2899129e97f author: malenkov date: Wed Sep 19 19:10:55 2012 +0400 7195917: XMLDecoder parsing at close-time should be improved Reviewed-by: art, ahgross changeset 6bb4fd9f5b80 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=6bb4fd9f5b80 author: smarks date: Mon Sep 10 15:52:51 2012 -0700 7195919: (sl) ServiceLoader can throw CCE without needing to create instance Reviewed-by: ahgross, alanb, dmeetry changeset f15a0a6ba603 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=f15a0a6ba603 author: jrose date: Wed Sep 19 18:37:12 2012 -0700 7196190: Improve method of handling MethodHandles Summary: Bind callers to caller-sensitive methods. Reviewed-by: twisti, jjh, vlivanov, ahgross changeset da7feee63247 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=da7feee63247 author: dsamersoff date: Wed Sep 19 12:21:24 2012 -0700 7198296: Refactor classloader usage Reviewed-by: ahgross Contributed-by: dmitry.samersoff at oracle.com changeset 9f192fd4e556 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=9f192fd4e556 author: andrew date: Mon Oct 15 11:17:27 2012 +0100 Remove merge artefact. changeset 1ee835af0ae5 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=1ee835af0ae5 author: asaha date: Wed Jun 20 15:49:12 2012 -0700 7175845: "jar uf" changes file permissions unexpectedly Reviewed-by: sherman, alanb changeset 08baf77fec47 in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=08baf77fec47 author: asaha date: Wed Jun 20 15:51:01 2012 -0700 7177216: native2ascii changes file permissions of input file Reviewed-by: sherman, alanb changeset 4cf358fd012a in /hg/release/icedtea7-forest-2.2/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/jdk?cmd=changeset;node=4cf358fd012a author: andrew date: Tue Oct 16 21:31:13 2012 +0100 Added tag icedtea-2.2.3 for changeset 08baf77fec47 diffstat: .hgtags | 1 + src/share/classes/com/sun/beans/decoder/DocumentHandler.java | 55 ++- src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java | 12 +- src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java | 6 +- src/share/classes/com/sun/jmx/remote/util/EnvHelp.java | 76 +--- src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java | 10 +- src/share/classes/java/beans/XMLDecoder.java | 16 +- src/share/classes/java/io/FilePermission.java | 2 +- src/share/classes/java/lang/invoke/MethodHandleImpl.java | 169 +++++++++- src/share/classes/java/lang/invoke/MethodHandleNatives.java | 99 +++++- src/share/classes/java/lang/invoke/MethodHandleStatics.java | 4 +- src/share/classes/java/lang/invoke/MethodHandles.java | 24 +- src/share/classes/java/net/URL.java | 28 +- src/share/classes/java/security/AccessController.java | 17 +- src/share/classes/java/util/ServiceLoader.java | 15 +- src/share/classes/java/util/concurrent/Executors.java | 19 +- src/share/classes/java/util/logging/FileHandler.java | 12 +- src/share/classes/java/util/logging/Handler.java | 18 +- src/share/classes/java/util/logging/LogManager.java | 24 +- src/share/classes/java/util/logging/Logger.java | 18 +- src/share/classes/java/util/logging/MemoryHandler.java | 2 +- src/share/classes/java/util/logging/StreamHandler.java | 2 +- src/share/classes/javax/management/modelmbean/DescriptorSupport.java | 5 +- src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java | 93 +++++- src/share/classes/javax/management/remote/rmi/RMIConnector.java | 6 +- src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java | 5 +- src/share/classes/javax/swing/text/DefaultFormatter.java | 4 +- src/share/classes/sun/invoke/anon/AnonymousClassLoader.java | 76 +---- src/share/classes/sun/misc/Service.java | 12 +- src/share/classes/sun/rmi/registry/RegistryImpl.java | 3 +- src/share/classes/sun/security/provider/SecureRandom.java | 37 +- src/share/classes/sun/security/ssl/HandshakeInStream.java | 13 +- src/share/classes/sun/security/ssl/Handshaker.java | 4 +- src/share/classes/sun/security/ssl/RSAClientKeyExchange.java | 56 ++- src/share/classes/sun/tools/jar/Main.java | 4 +- src/share/classes/sun/tools/native2ascii/Main.java | 11 +- src/share/lib/security/java.security | 4 +- src/share/lib/security/java.security-macosx | 4 +- src/share/lib/security/java.security-solaris | 4 +- src/share/lib/security/java.security-windows | 4 +- test/java/net/URL/Test.java | 4 - test/sun/tools/native2ascii/Permission.java | 85 +++++ test/tools/jar/UpdateJar.java | 86 +++++ 43 files changed, 848 insertions(+), 301 deletions(-) diffs (truncated from 2258 to 500 lines): diff -r 85680f91b6f9 -r 4cf358fd012a .hgtags --- a/.hgtags Fri Aug 31 20:57:24 2012 +0100 +++ b/.hgtags Tue Oct 16 21:31:13 2012 +0100 @@ -180,3 +180,4 @@ 0000000000000000000000000000000000000000 icedtea-2.2.1 1870f7528cbf59c29224dab4ff84514aee20875e icedtea-2.2.1 5ec35e1b30b02b11a13cbebaa8e23520c5ca89cc icedtea-2.2.2 +08baf77fec47a067341cf890a2e4c4a4917b9f09 icedtea-2.2.3 diff -r 85680f91b6f9 -r 4cf358fd012a src/share/classes/com/sun/beans/decoder/DocumentHandler.java --- a/src/share/classes/com/sun/beans/decoder/DocumentHandler.java Fri Aug 31 20:57:24 2012 +0100 +++ b/src/share/classes/com/sun/beans/decoder/DocumentHandler.java Tue Oct 16 21:31:13 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -37,6 +37,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.security.AccessControlContext; +import java.security.AccessController; +import java.security.PrivilegedAction; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; @@ -46,6 +49,8 @@ import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; +import sun.misc.SharedSecrets; + /** * The main class to parse JavaBeans XML archive. * @@ -56,11 +61,10 @@ * @see ElementHandler */ public final class DocumentHandler extends DefaultHandler { - private final Map> handlers = new HashMap>(); - - private final Map environment = new HashMap(); - - private final List objects = new ArrayList(); + private final AccessControlContext acc = AccessController.getContext(); + private final Map> handlers = new HashMap<>(); + private final Map environment = new HashMap<>(); + private final List objects = new ArrayList<>(); private Reference loader; private ExceptionListener listener; @@ -351,23 +355,32 @@ * * @param input the input source to parse */ - public void parse(InputSource input) { - try { - SAXParserFactory.newInstance().newSAXParser().parse(input, this); + public void parse(final InputSource input) { + if ((this.acc == null) && (null != System.getSecurityManager())) { + throw new SecurityException("AccessControlContext is not set"); } - catch (ParserConfigurationException exception) { - handleException(exception); - } - catch (SAXException wrapper) { - Exception exception = wrapper.getException(); - if (exception == null) { - exception = wrapper; + AccessControlContext stack = AccessController.getContext(); + SharedSecrets.getJavaSecurityAccess().doIntersectionPrivilege(new PrivilegedAction() { + public Void run() { + try { + SAXParserFactory.newInstance().newSAXParser().parse(input, DocumentHandler.this); + } + catch (ParserConfigurationException exception) { + handleException(exception); + } + catch (SAXException wrapper) { + Exception exception = wrapper.getException(); + if (exception == null) { + exception = wrapper; + } + handleException(exception); + } + catch (IOException exception) { + handleException(exception); + } + return null; } - handleException(exception); - } - catch (IOException exception) { - handleException(exception); - } + }, stack, this.acc); } /** diff -r 85680f91b6f9 -r 4cf358fd012a src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java --- a/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java Fri Aug 31 20:57:24 2012 +0100 +++ b/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java Tue Oct 16 21:31:13 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -35,6 +35,8 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import sun.reflect.misc.MethodUtil; + /** * This class is intended to handle <property> element. * This element simplifies access to the properties. @@ -168,11 +170,11 @@ private static Object getPropertyValue(Object bean, String name, Integer index) throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException { Class type = bean.getClass(); if (index == null) { - return findGetter(type, name).invoke(bean); + return MethodUtil.invoke(findGetter(type, name), bean, new Object[] {}); } else if (type.isArray() && (name == null)) { return Array.get(bean, index); } else { - return findGetter(type, name, int.class).invoke(bean, index); + return MethodUtil.invoke(findGetter(type, name, int.class), bean, new Object[] {index}); } } @@ -197,11 +199,11 @@ : null; if (index == null) { - findSetter(type, name, param).invoke(bean, value); + MethodUtil.invoke(findSetter(type, name, param), bean, new Object[] {value}); } else if (type.isArray() && (name == null)) { Array.set(bean, index, value); } else { - findSetter(type, name, int.class, param).invoke(bean, index, value); + MethodUtil.invoke(findSetter(type, name, int.class, param), bean, new Object[] {index, value}); } } diff -r 85680f91b6f9 -r 4cf358fd012a src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java --- a/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java Fri Aug 31 20:57:24 2012 +0100 +++ b/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java Tue Oct 16 21:31:13 2012 +0100 @@ -68,9 +68,9 @@ this.notifBuffer = notifBuffer; this.connectionId = connectionId; connectionTimeout = EnvHelp.getServerConnectionTimeout(env); - checkNotificationEmission = EnvHelp.computeBooleanFromString( - env, - "jmx.remote.x.check.notification.emission",false); + + String stringBoolean = (String) env.get("jmx.remote.x.check.notification.emission"); + checkNotificationEmission = EnvHelp.computeBooleanFromString( stringBoolean ); notificationAccessController = EnvHelp.getNotificationAccessController(env); } diff -r 85680f91b6f9 -r 4cf358fd012a src/share/classes/com/sun/jmx/remote/util/EnvHelp.java --- a/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java Fri Aug 31 20:57:24 2012 +0100 +++ b/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java Tue Oct 16 21:31:13 2012 +0100 @@ -665,97 +665,57 @@ * Computes a boolean value from a string value retrieved from a * property in the given map. * - * @param env the environment map. - * @param prop the name of the property in the environment map whose - * returned string value must be converted into a boolean value. - * @param systemProperty if true, consult a system property of the - * same name if there is no entry in the environment map. + * @param stringBoolean the string value that must be converted + * into a boolean value. * * @return *
    - *
  • {@code false} if {@code env.get(prop)} is {@code null}
  • + *
  • {@code false} if {@code stringBoolean} is {@code null}
  • *
  • {@code false} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} + * {@code stringBoolean.equalsIgnoreCase("false")} * is {@code true}
  • *
  • {@code true} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} + * {@code stringBoolean.equalsIgnoreCase("true")} * is {@code true}
  • *
* - * @throws IllegalArgumentException if {@code env} is {@code null} or - * {@code env.get(prop)} is not {@code null} and + * @throws IllegalArgumentException if * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are * {@code false}. - * @throws ClassCastException if {@code env.get(prop)} cannot be cast - * to {@code String}. */ - public static boolean computeBooleanFromString( - Map env, String prop, boolean systemProperty) { - - if (env == null) - throw new IllegalArgumentException("env map cannot be null"); - + public static boolean computeBooleanFromString(String stringBoolean) { // returns a default value of 'false' if no property is found... - return computeBooleanFromString(env,prop,systemProperty,false); + return computeBooleanFromString(stringBoolean,false); } /** * Computes a boolean value from a string value retrieved from a * property in the given map. * - * @param env the environment map. - * @param prop the name of the property in the environment map whose - * returned string value must be converted into a boolean value. - * @param systemProperty if true, consult a system property of the - * same name if there is no entry in the environment map. + * @param stringBoolean the string value that must be converted + * into a boolean value. * @param defaultValue a default value to return in case no property * was defined. * * @return *
    - *
  • {@code defaultValue} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code false}
  • - *
  • {@code defaultValue} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code true} and - * {@code System.getProperty(prop)} is {@code null}
  • - *
  • {@code false} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code true} and - * {@code System.getProperty(prop).equalsIgnoreCase("false")} - * is {@code true}
  • - *
  • {@code true} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code true} and - * {@code System.getProperty(prop).equalsIgnoreCase("true")} - * is {@code true}
  • + *
  • {@code defaultValue} if {@code stringBoolean} + * is {@code null}
  • *
  • {@code false} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} + * {@code stringBoolean.equalsIgnoreCase("false")} * is {@code true}
  • *
  • {@code true} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} + * {@code stringBoolean.equalsIgnoreCase("true")} * is {@code true}
  • *
* - * @throws IllegalArgumentException if {@code env} is {@code null} or - * {@code env.get(prop)} is not {@code null} and + * @throws IllegalArgumentException if * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are * {@code false}. - * @throws ClassCastException if {@code env.get(prop)} cannot be cast - * to {@code String}. */ - public static boolean computeBooleanFromString( - Map env, String prop, - boolean systemProperty, boolean defaultValue) { - - if (env == null) - throw new IllegalArgumentException("env map cannot be null"); - - String stringBoolean = (String) env.get(prop); - if (stringBoolean == null && systemProperty) { - stringBoolean = - AccessController.doPrivileged(new GetPropertyAction(prop)); - } - + public static boolean computeBooleanFromString( String stringBoolean, boolean defaultValue) { if (stringBoolean == null) return defaultValue; else if (stringBoolean.equalsIgnoreCase("true")) @@ -763,8 +723,8 @@ else if (stringBoolean.equalsIgnoreCase("false")) return false; else - throw new IllegalArgumentException(prop + - " must be \"true\" or \"false\" instead of \"" + + throw new IllegalArgumentException( + "Property value must be \"true\" or \"false\" instead of \"" + stringBoolean + "\""); } diff -r 85680f91b6f9 -r 4cf358fd012a src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java --- a/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java Fri Aug 31 20:57:24 2012 +0100 +++ b/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java Tue Oct 16 21:31:13 2012 +0100 @@ -146,11 +146,11 @@ */ public RhinoScriptEngine() { if (System.getSecurityManager() != null) { - accCtxt = AccessController.getContext(); - } - - if (System.getSecurityManager() != null) { - accCtxt = AccessController.getContext(); + try { + AccessController.checkPermission(new AllPermission()); + } catch (AccessControlException ace) { + accCtxt = AccessController.getContext(); + } } Context cx = enterContext(); diff -r 85680f91b6f9 -r 4cf358fd012a src/share/classes/java/beans/XMLDecoder.java --- a/src/share/classes/java/beans/XMLDecoder.java Fri Aug 31 20:57:24 2012 +0100 +++ b/src/share/classes/java/beans/XMLDecoder.java Tue Oct 16 21:31:13 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -29,6 +29,9 @@ import java.io.Closeable; import java.io.InputStream; import java.io.IOException; +import java.security.AccessControlContext; +import java.security.AccessController; +import java.security.PrivilegedAction; import org.xml.sax.InputSource; import org.xml.sax.helpers.DefaultHandler; @@ -61,6 +64,7 @@ * @author Philip Milne */ public class XMLDecoder implements AutoCloseable { + private final AccessControlContext acc = AccessController.getContext(); private final DocumentHandler handler = new DocumentHandler(); private final InputSource input; private Object owner; @@ -189,7 +193,15 @@ return false; } if (this.array == null) { - this.handler.parse(this.input); + if ((this.acc == null) && (null != System.getSecurityManager())) { + throw new SecurityException("AccessControlContext is not set"); + } + AccessController.doPrivileged(new PrivilegedAction() { + public Void run() { + XMLDecoder.this.handler.parse(XMLDecoder.this.input); + return null; + } + }, this.acc); this.array = this.handler.getObjects(); } return true; diff -r 85680f91b6f9 -r 4cf358fd012a src/share/classes/java/io/FilePermission.java --- a/src/share/classes/java/io/FilePermission.java Fri Aug 31 20:57:24 2012 +0100 +++ b/src/share/classes/java/io/FilePermission.java Tue Oct 16 21:31:13 2012 +0100 @@ -418,7 +418,7 @@ */ public int hashCode() { - return this.cpath.hashCode(); + return 0; } /** diff -r 85680f91b6f9 -r 4cf358fd012a src/share/classes/java/lang/invoke/MethodHandleImpl.java --- a/src/share/classes/java/lang/invoke/MethodHandleImpl.java Fri Aug 31 20:57:24 2012 +0100 +++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java Tue Oct 16 21:31:13 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -25,7 +25,6 @@ package java.lang.invoke; -import sun.invoke.util.VerifyType; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; @@ -35,6 +34,7 @@ import java.util.List; import sun.invoke.empty.Empty; import sun.invoke.util.ValueConversions; +import sun.invoke.util.VerifyType; import sun.invoke.util.Wrapper; import sun.misc.Unsafe; import static java.lang.invoke.MethodHandleStatics.*; @@ -1258,4 +1258,169 @@ return THROW_EXCEPTION; } static Empty throwException(T t) throws T { throw t; } + + /** + * Create an alias for the method handle which, when called, + * appears to be called from the same class loader and protection domain + * as hostClass. + * This is an expensive no-op unless the method which is called + * is sensitive to its caller. A small number of system methods + * are in this category, including Class.forName and Method.invoke. + */ + static + MethodHandle bindCaller(MethodHandle mh, Class hostClass) { + return BindCaller.bindCaller(mh, hostClass); + } + + // Put the whole mess into its own nested class. + // That way we can lazily load the code and set up the constants. + private static class BindCaller { + static + MethodHandle bindCaller(MethodHandle mh, Class hostClass) { + // Do not use this function to inject calls into system classes. + if (hostClass == null) { + hostClass = C_Trampoline; + } else if (hostClass.isArray() || + hostClass.isPrimitive() || + hostClass.getName().startsWith("java.") || + hostClass.getName().startsWith("sun.")) { + throw new InternalError(); // does not happen, and should not anyway + } + // For simplicity, convert mh to a varargs-like method. + MethodHandle vamh = prepareForInvoker(mh); + // Cache the result of makeInjectedInvoker once per argument class. + MethodHandle bccInvoker = CV_makeInjectedInvoker.get(hostClass); + return restoreToType(bccInvoker.bindTo(vamh), mh.type()); + } + + // This class ("Trampoline") is known to be inside a dead-end class loader. + // Inject all doubtful calls into this class. + private static Class C_Trampoline; + static { + Class tramp = null; + try { + final int FRAME_COUNT_ARG = 1; // [0] Reflection [1] Trampoline + java.lang.reflect.Method gcc = sun.reflect.Reflection.class.getMethod("getCallerClass", int.class); + tramp = (Class) sun.reflect.misc.MethodUtil.invoke(gcc, null, new Object[]{ FRAME_COUNT_ARG }); + if (tramp.getClassLoader() == BindCaller.class.getClassLoader()) + throw new RuntimeException(tramp.getName()+" class loader"); + } catch (Throwable ex) { + throw new InternalError(ex.toString()); + } + C_Trampoline = tramp; + } + + private static final Unsafe UNSAFE = Unsafe.getUnsafe(); + + private static MethodHandle makeInjectedInvoker(Class hostClass) { + Class bcc = UNSAFE.defineAnonymousClass(hostClass, T_BYTES, null); + if (hostClass.getClassLoader() != bcc.getClassLoader()) + throw new InternalError(hostClass.getName()+" (CL)"); + try { + if (hostClass.getProtectionDomain() != bcc.getProtectionDomain()) + throw new InternalError(hostClass.getName()+" (PD)"); + } catch (SecurityException ex) { + // Self-check was blocked by security manager. This is OK. + // In fact the whole try body could be turned into an assertion. + } + try { + MethodHandle init = IMPL_LOOKUP.findStatic(bcc, "init", MethodType.methodType(void.class)); + init.invokeExact(); // force initialization of the class + } catch (Throwable ex) { + throw uncaughtException(ex); + } + MethodHandle bccInvoker; + try { + MethodType invokerMT = MethodType.methodType(Object.class, MethodHandle.class, Object[].class); + bccInvoker = IMPL_LOOKUP.findStatic(bcc, "invoke_V", invokerMT); + } catch (ReflectiveOperationException ex) { + throw uncaughtException(ex); + } + // Test the invoker, to ensure that it really injects into the right place. + try { + MethodHandle vamh = prepareForInvoker(MH_checkCallerClass); + Object ok = bccInvoker.invokeExact(vamh, new Object[]{hostClass, bcc}); + } catch (Throwable ex) { + throw new InternalError(ex.toString()); + } + return bccInvoker; + } + private static ClassValue CV_makeInjectedInvoker = new ClassValue() { + @Override protected MethodHandle computeValue(Class hostClass) { + return makeInjectedInvoker(hostClass); + } + }; + + // Adapt mh so that it can be called directly from an injected invoker: + private static MethodHandle prepareForInvoker(MethodHandle mh) { + mh = mh.asFixedArity(); + MethodType mt = mh.type(); + int arity = mt.parameterCount(); + MethodHandle vamh = mh.asType(mt.generic()); + vamh = vamh.asSpreader(Object[].class, arity); + return vamh; From omajid at redhat.com Tue Oct 16 13:30:28 2012 From: omajid at redhat.com (Omair Majid) Date: Tue, 16 Oct 2012 16:30:28 -0400 Subject: [icedtea-web][rfc] Fix to AppletBaseURL reproducer In-Reply-To: <507DC272.1010405@redhat.com> References: <507853E1.70905@redhat.com> <507DBBEA.4030507@redhat.com> <507DC272.1010405@redhat.com> Message-ID: <507DC3E4.4010907@redhat.com> On 10/16/2012 04:24 PM, Adam Domurad wrote: > I would argue that the 'xception' matcher is overly broad and a test > weakness. Currently there is a NPE while looking up the security context > - which I think is caused by this exit() call. I am surprised. This test is running inside a browser right? Could you take a look into why NPE is happening when you have some time? > However, there's a lot of > things that can cause exceptions on shutdown, I think (Jiri may know > better here.) This is why I'm in favour of changing 'xception' to the > appropriate exception, or getting rid of it if its just a catch-all. I don't really like the idea of 'appropriate exception'. If an exception happens (and not just looged to stdout), things are not working as desired and the test should fail. What is an appropriate exception? Who determines if an exception is appropriate? Does it really matter what exception is causing things to not function? That said, I am aware of errors like ThreadDeath causing exceptions in random places (such as in locking code) that really cant be worked around in icedtea-web. > Updated patch attached, with 'xception' matcher still removed. Looks fine to me, though it includes unrelated changes from another patch. Cheers, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From andrew at icedtea.classpath.org Tue Oct 16 13:34:16 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:34:16 +0000 Subject: /hg/release/icedtea7-forest-2.1: Added tag icedtea-2.1.3 for cha... Message-ID: changeset f89009ada191 in /hg/release/icedtea7-forest-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1?cmd=changeset;node=f89009ada191 author: andrew date: Tue Oct 16 21:32:54 2012 +0100 Added tag icedtea-2.1.3 for changeset 1e3893e92a16 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 1e3893e92a16 -r f89009ada191 .hgtags --- a/.hgtags Fri Aug 31 21:58:42 2012 +0100 +++ b/.hgtags Tue Oct 16 21:32:54 2012 +0100 @@ -149,3 +149,4 @@ 72c84a7c7d6fc45feefb808cfe1d892d1eee84bf icedtea-2.1 22cc03983e209c70d9d3476529de084122ed4313 icedtea-2.1.1 7f3d1172a6a4f6e885c8ae2b6a5d6a5265f17532 icedtea-2.1.2 +1e3893e92a164926556f0bde7aea8cf93a73a403 icedtea-2.1.3 From andrew at icedtea.classpath.org Tue Oct 16 13:34:21 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:34:21 +0000 Subject: /hg/release/icedtea7-forest-2.1/corba: Added tag icedtea-2.1.3 f... Message-ID: changeset 79ee8535bc51 in /hg/release/icedtea7-forest-2.1/corba details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/corba?cmd=changeset;node=79ee8535bc51 author: andrew date: Tue Oct 16 21:32:55 2012 +0100 Added tag icedtea-2.1.3 for changeset 5fb07c08e9e8 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 5fb07c08e9e8 -r 79ee8535bc51 .hgtags --- a/.hgtags Fri Aug 31 21:58:43 2012 +0100 +++ b/.hgtags Tue Oct 16 21:32:55 2012 +0100 @@ -149,3 +149,4 @@ a4c1348efa0807023deb0235c477b7ef0de093fa icedtea-2.1 338c21646c7616e63483a9e8fa7c517931706b95 icedtea-2.1.1 8c5573b22489182901b2fafaec3950b1c09a6851 icedtea-2.1.2 +5fb07c08e9e8c7b62395b0dc5f5a95086a7bb718 icedtea-2.1.3 From andrew at icedtea.classpath.org Tue Oct 16 13:34:27 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:34:27 +0000 Subject: /hg/release/icedtea7-forest-2.1/jaxp: Added tag icedtea-2.1.3 fo... Message-ID: changeset 77e7219c7424 in /hg/release/icedtea7-forest-2.1/jaxp details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jaxp?cmd=changeset;node=77e7219c7424 author: andrew date: Tue Oct 16 21:32:56 2012 +0100 Added tag icedtea-2.1.3 for changeset 68cc6550c43e diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 68cc6550c43e -r 77e7219c7424 .hgtags --- a/.hgtags Fri Aug 31 21:58:44 2012 +0100 +++ b/.hgtags Tue Oct 16 21:32:56 2012 +0100 @@ -149,3 +149,4 @@ 2ef9b3fbf759c360c147f8631b80b9858f0511f8 icedtea-2.1 7a8825b15df6a22c6d338d73f228186033c82ed0 icedtea-2.1.1 a812eed5797d5725785e45a13ed767fd1b067018 icedtea-2.1.2 +68cc6550c43e7327e9b9556d1db8abd070ae3b91 icedtea-2.1.3 From andrew at icedtea.classpath.org Tue Oct 16 13:34:32 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:34:32 +0000 Subject: /hg/release/icedtea7-forest-2.1/jaxws: Added tag icedtea-2.1.3 f... Message-ID: changeset d92eda447bca in /hg/release/icedtea7-forest-2.1/jaxws details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jaxws?cmd=changeset;node=d92eda447bca author: andrew date: Tue Oct 16 21:32:57 2012 +0100 Added tag icedtea-2.1.3 for changeset 27864fc81873 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 27864fc81873 -r d92eda447bca .hgtags --- a/.hgtags Fri Aug 31 21:58:45 2012 +0100 +++ b/.hgtags Tue Oct 16 21:32:57 2012 +0100 @@ -149,3 +149,4 @@ 9d6ac592aa24406ee083136561a212c289d36edb icedtea-2.1 7edfbfe974f22cdb61fc93cefd15129fa4eb8675 icedtea-2.1.1 4bb1edad129c0c441e01905b8bb43620f521bbcf icedtea-2.1.2 +27864fc818734473ceb15afcb9375504a32fe936 icedtea-2.1.3 From andrew at icedtea.classpath.org Tue Oct 16 13:34:38 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:34:38 +0000 Subject: /hg/release/icedtea7-forest-2.1/langtools: Added tag icedtea-2.1... Message-ID: changeset fd2fdb20d858 in /hg/release/icedtea7-forest-2.1/langtools details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/langtools?cmd=changeset;node=fd2fdb20d858 author: andrew date: Tue Oct 16 21:33:00 2012 +0100 Added tag icedtea-2.1.3 for changeset 59d1da099001 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 59d1da099001 -r fd2fdb20d858 .hgtags --- a/.hgtags Fri Aug 31 21:58:47 2012 +0100 +++ b/.hgtags Tue Oct 16 21:33:00 2012 +0100 @@ -149,3 +149,4 @@ 993f08cc97719576dba1f40a4484bb840f48632c icedtea-2.1 b534c4c6cd9b7030b34d82dcebaf00e1393e3eae icedtea-2.1.1 25c8b4900996be7ae923a336ea2d4e1ddb07a006 icedtea-2.1.2 +59d1da0990018410db0cdff04e96fb7dd4d0d0a3 icedtea-2.1.3 From andrew at icedtea.classpath.org Tue Oct 16 13:34:44 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:34:44 +0000 Subject: /hg/release/icedtea7-forest-2.1/hotspot: 5 new changesets Message-ID: changeset 84f98de21493 in /hg/release/icedtea7-forest-2.1/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot?cmd=changeset;node=84f98de21493 author: kvn date: Wed May 23 12:11:25 2012 -0700 7158801: Improve VM CompileOnly option Summary: Fixed buffer overflow during parsing flags -XX:CompileCommand=, -XX:CompileOnly= and command lines in .hotspot_compiler file. Reviewed-by: never changeset 8b8c198ec5c4 in /hg/release/icedtea7-forest-2.1/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot?cmd=changeset;node=8b8c198ec5c4 author: kamg date: Fri Jun 08 12:49:52 2012 -0400 7158804: Improve config file parsing Summary: Check buffer length when reading Reviewed-by: dholmes, dcubed changeset f43620c8febc in /hg/release/icedtea7-forest-2.1/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot?cmd=changeset;node=f43620c8febc author: andrew date: Fri Oct 12 14:26:47 2012 +0100 7158807: Revise stack management with volatile call sites Summary: Add missing stack banging into method handle assebly code and throw a StackOverflowError. Reviewed-by: jrose, twisti changeset 5da7e3791b0d in /hg/release/icedtea7-forest-2.1/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot?cmd=changeset;node=5da7e3791b0d author: kvn date: Wed Sep 19 21:14:10 2012 -0700 7198606: Improve VM optimization Reviewed-by: roland, twisti changeset 767fdaea4155 in /hg/release/icedtea7-forest-2.1/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot?cmd=changeset;node=767fdaea4155 author: andrew date: Tue Oct 16 21:33:00 2012 +0100 Added tag icedtea-2.1.3 for changeset 5da7e3791b0d diffstat: .hgtags | 1 + src/cpu/sparc/vm/methodHandles_sparc.cpp | 31 +++++++++++++++++++++++++++++++ src/cpu/x86/vm/methodHandles_x86.cpp | 31 +++++++++++++++++++++++++++++-- src/share/vm/compiler/compilerOracle.cpp | 4 ++-- src/share/vm/opto/loopTransform.cpp | 3 +++ src/share/vm/runtime/arguments.cpp | 2 +- 6 files changed, 67 insertions(+), 5 deletions(-) diffs (180 lines): diff -r c159737dd826 -r 767fdaea4155 .hgtags --- a/.hgtags Fri Aug 31 21:58:49 2012 +0100 +++ b/.hgtags Tue Oct 16 21:33:00 2012 +0100 @@ -220,3 +220,4 @@ 0000000000000000000000000000000000000000 icedtea-2.1.1 8b7c4c5f6ba9a0a7e8114d886a574d99827934a1 icedtea-2.1.1 fbe959dad801cae4c21edcd4afdc0e030f1d07b4 icedtea-2.1.2 +5da7e3791b0d3b2930dffa33e51c73fb93697a41 icedtea-2.1.3 diff -r c159737dd826 -r 767fdaea4155 src/cpu/sparc/vm/methodHandles_sparc.cpp --- a/src/cpu/sparc/vm/methodHandles_sparc.cpp Fri Aug 31 21:58:49 2012 +0100 +++ b/src/cpu/sparc/vm/methodHandles_sparc.cpp Tue Oct 16 21:33:00 2012 +0100 @@ -694,6 +694,17 @@ if (arg_slots.is_constant() && arg_slots.as_constant() == 0) return; + // We have to insert at least one word, so bang the stack. + if (UseStackBanging) { + // Save G3_method_handle since bang_stack_with_offset uses it as a temp register + __ mov(G3_method_handle, temp_reg); + int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0); + if (frame_size <= 0) + frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size); + __ mov(temp_reg, G3_method_handle); + } + assert_different_registers(argslot_reg, temp_reg, temp2_reg, temp3_reg, (!arg_slots.is_register() ? Gargs : arg_slots.as_register())); @@ -1587,6 +1598,14 @@ "copied argument(s) must fall within current frame"); } + if (UseStackBanging) { + // Save G3_method_handle since bang_stack_with_offset uses it as a temp register + __ mov(G3_method_handle, O3_scratch); + // Bang the stack before pushing args. + int frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + __ mov(O3_scratch, G3_method_handle); + } // insert location is always the bottom of the argument list: __ neg(O1_stack_move); push_arg_slots(_masm, O0_argslot, O1_stack_move, O2_scratch, O3_scratch); @@ -2003,6 +2022,18 @@ // The return handler will further cut back the stack when it takes // down the RF. Perhaps there is a way to streamline this further. + if (UseStackBanging) { + // Save G3_method_handle since bang_stack_with_offset uses it as a temp register + __ mov(G3_method_handle, O4_scratch); + // Bang the stack before recursive call. + // Even if slots == 0, we are inside a RicochetFrame. + int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1; + if (frame_size < 0) { + frame_size = 256 * Interpreter::stackElementSize; // conservative + } + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + __ mov(O4_scratch, G3_method_handle); + } // State during recursive call: // ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc | __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); diff -r c159737dd826 -r 767fdaea4155 src/cpu/x86/vm/methodHandles_x86.cpp --- a/src/cpu/x86/vm/methodHandles_x86.cpp Fri Aug 31 21:58:49 2012 +0100 +++ b/src/cpu/x86/vm/methodHandles_x86.cpp Tue Oct 16 21:33:00 2012 +0100 @@ -687,6 +687,14 @@ if (VerifyMethodHandles) verify_stack_move(_masm, arg_slots, -1); + // We have to insert at least one word, so bang the stack. + if (UseStackBanging) { + int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0); + if (frame_size <= 0) + frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size); + } + // Make space on the stack for the inserted argument(s). // Then pull down everything shallower than rax_argslot. // The stacked return address gets pulled down with everything else. @@ -1698,6 +1706,11 @@ "copied argument(s) must fall within current frame"); } + if (UseStackBanging) { + // Bang the stack before pushing args. + int frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + } // insert location is always the bottom of the argument list: Address insert_location = __ argument_address(constant(0)); int pre_arg_words = insert_location.disp() / wordSize; // return PC is pushed @@ -2135,6 +2148,15 @@ // The return handler will further cut back the stack when it takes // down the RF. Perhaps there is a way to streamline this further. + if (UseStackBanging) { + // Bang the stack before recursive call. + // Even if slots == 0, we are inside a RicochetFrame. + int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1; + if (frame_size < 0) { + frame_size = 256 * Interpreter::stackElementSize; // conservative + } + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + } // State during recursive call: // ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc | __ jump_to_method_handle_entry(rcx_recv, rdx_temp); @@ -2265,10 +2287,15 @@ // grab another temp Register rsi_temp = rsi; - { if (rsi_temp == saved_last_sp) __ push(saved_last_sp); } + if (rsi_temp == saved_last_sp) { + __ push(saved_last_sp); + // Need to re-push return PC to keep it on stack top. + __ lea(saved_last_sp, ExternalAddress(SharedRuntime::ricochet_blob()->bounce_addr()).addr()); + __ push(saved_last_sp); + } // (preceding push must be done after argslot address is taken!) #define UNPUSH_RSI \ - { if (rsi_temp == saved_last_sp) __ pop(saved_last_sp); } + { if (rsi_temp == saved_last_sp) { __ pop(saved_last_sp); __ pop(saved_last_sp); } } // arx_argslot points both to the array and to the first output arg vmarg = Address(rax_argslot, 0); diff -r c159737dd826 -r 767fdaea4155 src/share/vm/compiler/compilerOracle.cpp --- a/src/share/vm/compiler/compilerOracle.cpp Fri Aug 31 21:58:49 2012 +0100 +++ b/src/share/vm/compiler/compilerOracle.cpp Tue Oct 16 21:33:00 2012 +0100 @@ -573,7 +573,7 @@ char token[1024]; int pos = 0; int c = getc(stream); - while(c != EOF) { + while(c != EOF && pos < (int)(sizeof(token)-1)) { if (c == '\n') { token[pos++] = '\0'; parse_from_line(token); @@ -594,7 +594,7 @@ int pos = 0; const char* sp = str; int c = *sp++; - while (c != '\0') { + while (c != '\0' && pos < (int)(sizeof(token)-1)) { if (c == '\n') { token[pos++] = '\0'; parse_line(token); diff -r c159737dd826 -r 767fdaea4155 src/share/vm/opto/loopTransform.cpp --- a/src/share/vm/opto/loopTransform.cpp Fri Aug 31 21:58:49 2012 +0100 +++ b/src/share/vm/opto/loopTransform.cpp Tue Oct 16 21:33:00 2012 +0100 @@ -2733,6 +2733,8 @@ result_mem = new (C, 1) ProjNode(call,TypeFunc::Memory); _igvn.register_new_node_with_optimizer(result_mem); +/* Disable following optimization until proper fix (add missing checks). + // If this fill is tightly coupled to an allocation and overwrites // the whole body, allow it to take over the zeroing. AllocateNode* alloc = AllocateNode::Ideal_allocation(base, this); @@ -2756,6 +2758,7 @@ #endif } } +*/ // Redirect the old control and memory edges that are outside the loop. Node* exit = head->loopexit()->proj_out(0); diff -r c159737dd826 -r 767fdaea4155 src/share/vm/runtime/arguments.cpp --- a/src/share/vm/runtime/arguments.cpp Fri Aug 31 21:58:49 2012 +0100 +++ b/src/share/vm/runtime/arguments.cpp Tue Oct 16 21:33:00 2012 +0100 @@ -842,7 +842,7 @@ bool result = true; int c = getc(stream); - while(c != EOF) { + while(c != EOF && pos < (int)(sizeof(token)-1)) { if (in_white_space) { if (in_comment) { if (c == '\n') in_comment = false; From andrew at icedtea.classpath.org Tue Oct 16 13:34:54 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:34:54 +0000 Subject: /hg/release/icedtea7-forest-2.1/jdk: 25 new changesets Message-ID: changeset ebe4e7aa1568 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=ebe4e7aa1568 author: weijun date: Fri Jun 15 09:40:30 2012 +0800 6631398: FilePermission improved path checking Reviewed-by: mullan, skoivu, jdn changeset f4b341b79244 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=f4b341b79244 author: smarks date: Thu Jun 21 00:20:49 2012 -0700 7093490: adjust package access in rmiregistry Reviewed-by: ahgross, coffeys, dmocek changeset ea46e51cffde in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=ea46e51cffde author: sundar date: Sat Aug 04 21:16:20 2012 +0530 7143535: ScriptEngine corrected permissions Reviewed-by: jjh changeset 3028ca335e71 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=3028ca335e71 author: dsamersoff date: Fri Jun 15 15:34:35 2012 +0400 7158796: Tighten properties checking in EnvHelp Summary: Move getProperty call out of computeBooleanFromString Reviewed-by: skoivu, sla changeset bea1e9846e0a in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=bea1e9846e0a author: mullan date: Thu Jun 07 12:31:16 2012 -0400 7163198: Tightened package accessibility 7169887: Tightened package accessibility Reviewed-by: hawtin changeset e729ae72febc in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=e729ae72febc author: wetmore date: Mon May 21 15:42:08 2012 -0700 7167656: Multiple Seeders are being created Reviewed-by: smarks, mduigou, ahgross changeset a272c11a561c in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=a272c11a561c author: robm date: Tue Sep 11 14:45:22 2012 +0100 7169884: LogManager checks do not work correctly for sub-types Reviewed-by: alanb changeset cefe9f3a3f07 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=cefe9f3a3f07 author: dsamersoff date: Fri Jun 15 17:02:58 2012 +0400 7169888: Narrowing resource definitions in JMX RMI connector Summary: CPU bug, we can't put offending calls outside doPrivileged, but narrow granted permissions. Reviewed-by: ahgross, fparain changeset 9305d50eefa8 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=9305d50eefa8 author: mullan date: Tue Jun 19 13:16:19 2012 -0400 7172522: Improve DomainCombiner checking Reviewed-by: vinnie, ahgross changeset 9cdb6aa1f830 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=9cdb6aa1f830 author: xuelei date: Mon Jul 30 20:32:52 2012 -0700 7186286: TLS implementation to better adhere to RFC Summary: also reviewed by Alexander Fomin , Andrew Gross, Sean Coffey Reviewed-by: valeriep, wetmore changeset 56173911c8be in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=56173911c8be author: chegar date: Mon Aug 20 22:10:39 2012 +0100 7189103: Executors needs to maintain state Reviewed-by: dholmes, hawtin changeset 48535f11df43 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=48535f11df43 author: mullan date: Wed Aug 15 11:39:21 2012 -0400 7189490: More improvements to DomainCombiner checking Reviewed-by: ahgross, jdn, vinnie changeset 5d11aa25b675 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=5d11aa25b675 author: chegar date: Wed Aug 22 22:51:16 2012 +0100 7189567: java net obselete protocol Reviewed-by: alanb, ahgross changeset 18937d30c79d in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=18937d30c79d author: dsamersoff date: Sun Sep 23 23:43:31 2012 +0400 7192975: Issue with JMX reflection Summary: Make security check unconditional Reviewed-by: ahgross, asaha Contributed-by: jaroslav.bachorik at oracle.com changeset b57b565966e7 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=b57b565966e7 author: rupashka date: Tue Sep 11 17:27:31 2012 +0400 7195194: Better data validation for Swing Reviewed-by: art, ahgross changeset 04af7af320bc in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=04af7af320bc author: malenkov date: Tue Sep 11 15:58:50 2012 +0400 7195549: Better bean object persistence Reviewed-by: art, ahgross changeset cf3a5065f934 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=cf3a5065f934 author: malenkov date: Wed Sep 19 19:10:55 2012 +0400 7195917: XMLDecoder parsing at close-time should be improved Reviewed-by: art, ahgross changeset ad0309f0390a in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=ad0309f0390a author: smarks date: Mon Sep 10 15:52:51 2012 -0700 7195919: (sl) ServiceLoader can throw CCE without needing to create instance Reviewed-by: ahgross, alanb, dmeetry changeset 3bc32b0c1ecb in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=3bc32b0c1ecb author: jrose date: Fri Oct 12 14:20:15 2012 +0100 7196190: Improve method of handling MethodHandles Summary: Bind callers to caller-sensitive methods. Reviewed-by: twisti, jjh, vlivanov, ahgross changeset 24344e6eb1b6 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=24344e6eb1b6 author: dsamersoff date: Wed Sep 19 12:21:24 2012 -0700 7198296: Refactor classloader usage Reviewed-by: ahgross Contributed-by: dmitry.samersoff at oracle.com changeset adfb4e4dd42c in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=adfb4e4dd42c author: xuelei date: Sun Jan 15 19:33:24 2012 -0800 7106773: 512 bits RSA key cannot work with SHA384 and SHA512 Reviewed-by: weijun changeset a344c0c4c5d4 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=a344c0c4c5d4 author: andrew date: Mon Oct 15 11:17:27 2012 +0100 Remove merge artefact. changeset 9c60987d3a57 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=9c60987d3a57 author: asaha date: Wed Jun 20 15:49:12 2012 -0700 7175845: "jar uf" changes file permissions unexpectedly Reviewed-by: sherman, alanb changeset 8c49c024c920 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=8c49c024c920 author: asaha date: Wed Jun 20 15:51:01 2012 -0700 7177216: native2ascii changes file permissions of input file Reviewed-by: sherman, alanb changeset d7ecb57d3c61 in /hg/release/icedtea7-forest-2.1/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/jdk?cmd=changeset;node=d7ecb57d3c61 author: andrew date: Tue Oct 16 21:33:05 2012 +0100 Added tag icedtea-2.1.3 for changeset 8c49c024c920 diffstat: .hgtags | 1 + src/share/classes/com/sun/beans/decoder/DocumentHandler.java | 55 +- src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java | 12 +- src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java | 6 +- src/share/classes/com/sun/jmx/remote/util/EnvHelp.java | 76 +- src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java | 10 +- src/share/classes/java/beans/XMLDecoder.java | 16 +- src/share/classes/java/io/FilePermission.java | 2 +- src/share/classes/java/lang/invoke/MethodHandleImpl.java | 169 ++++- src/share/classes/java/lang/invoke/MethodHandleNatives.java | 99 ++- src/share/classes/java/lang/invoke/MethodHandleStatics.java | 4 +- src/share/classes/java/lang/invoke/MethodHandles.java | 24 +- src/share/classes/java/net/URL.java | 28 +- src/share/classes/java/security/AccessController.java | 17 +- src/share/classes/java/util/ServiceLoader.java | 15 +- src/share/classes/java/util/concurrent/Executors.java | 19 +- src/share/classes/java/util/logging/FileHandler.java | 12 +- src/share/classes/java/util/logging/Handler.java | 18 +- src/share/classes/java/util/logging/LogManager.java | 24 +- src/share/classes/java/util/logging/Logger.java | 18 +- src/share/classes/java/util/logging/MemoryHandler.java | 2 +- src/share/classes/java/util/logging/StreamHandler.java | 2 +- src/share/classes/javax/management/modelmbean/DescriptorSupport.java | 5 +- src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java | 93 ++- src/share/classes/javax/management/remote/rmi/RMIConnector.java | 6 +- src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java | 5 +- src/share/classes/javax/swing/text/DefaultFormatter.java | 4 +- src/share/classes/sun/invoke/anon/AnonymousClassLoader.java | 76 +- src/share/classes/sun/misc/Service.java | 12 +- src/share/classes/sun/rmi/registry/RegistryImpl.java | 3 +- src/share/classes/sun/security/pkcs11/P11Cipher.java | 4 +- src/share/classes/sun/security/pkcs11/P11Key.java | 11 +- src/share/classes/sun/security/pkcs11/P11RSACipher.java | 6 +- src/share/classes/sun/security/pkcs11/P11Signature.java | 8 +- src/share/classes/sun/security/provider/SecureRandom.java | 37 +- src/share/classes/sun/security/ssl/ClientHandshaker.java | 5 +- src/share/classes/sun/security/ssl/HandshakeInStream.java | 13 +- src/share/classes/sun/security/ssl/Handshaker.java | 4 +- src/share/classes/sun/security/ssl/RSAClientKeyExchange.java | 56 +- src/share/classes/sun/security/ssl/ServerHandshaker.java | 22 +- src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java | 91 +- src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java | 40 +- src/share/classes/sun/security/util/KeyLength.java | 91 ++ src/share/classes/sun/security/util/Length.java | 43 + src/share/classes/sun/tools/jar/Main.java | 4 +- src/share/classes/sun/tools/native2ascii/Main.java | 11 +- src/share/lib/security/java.security | 4 +- src/share/lib/security/java.security-solaris | 4 +- src/share/lib/security/java.security-windows | 4 +- src/windows/classes/sun/security/mscapi/Key.java | 9 +- src/windows/classes/sun/security/mscapi/RSACipher.java | 8 +- src/windows/classes/sun/security/mscapi/RSASignature.java | 4 +- test/java/net/URL/Test.java | 4 - test/sun/security/mscapi/ShortRSAKey1024.sh | 85 ++ test/sun/security/mscapi/ShortRSAKey512.sh | 86 ++ test/sun/security/mscapi/ShortRSAKey768.sh | 85 ++ test/sun/security/mscapi/ShortRSAKeyWithinTLS.java | 355 ++++++++ test/sun/security/pkcs11/KeyStore/ClientAuth.java | 25 +- test/sun/security/pkcs11/KeyStore/ClientAuth.sh | 27 +- test/sun/security/ssl/javax/net/ssl/SSLContextVersion.java | 6 +- test/sun/security/ssl/javax/net/ssl/TLSv12/ShortRSAKey512.java | 414 ++++++++++ test/sun/tools/native2ascii/Permission.java | 85 ++ test/tools/jar/UpdateJar.java | 86 ++ 63 files changed, 2179 insertions(+), 391 deletions(-) diffs (truncated from 4066 to 500 lines): diff -r 362f79895241 -r d7ecb57d3c61 .hgtags --- a/.hgtags Fri Aug 31 21:58:52 2012 +0100 +++ b/.hgtags Tue Oct 16 21:33:05 2012 +0100 @@ -153,3 +153,4 @@ 0000000000000000000000000000000000000000 icedtea-2.1.1 d5ddeffc46517a17e3236f1a2c2446d432370f5e icedtea-2.1.1 2b707a3a7d8d885d00eab5d0d43dd24d1c5a0213 icedtea-2.1.2 +8c49c024c920982eb4a99b5960f260b9210eb363 icedtea-2.1.3 diff -r 362f79895241 -r d7ecb57d3c61 src/share/classes/com/sun/beans/decoder/DocumentHandler.java --- a/src/share/classes/com/sun/beans/decoder/DocumentHandler.java Fri Aug 31 21:58:52 2012 +0100 +++ b/src/share/classes/com/sun/beans/decoder/DocumentHandler.java Tue Oct 16 21:33:05 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -37,6 +37,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.security.AccessControlContext; +import java.security.AccessController; +import java.security.PrivilegedAction; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; @@ -46,6 +49,8 @@ import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; +import sun.misc.SharedSecrets; + /** * The main class to parse JavaBeans XML archive. * @@ -56,11 +61,10 @@ * @see ElementHandler */ public final class DocumentHandler extends DefaultHandler { - private final Map> handlers = new HashMap>(); - - private final Map environment = new HashMap(); - - private final List objects = new ArrayList(); + private final AccessControlContext acc = AccessController.getContext(); + private final Map> handlers = new HashMap<>(); + private final Map environment = new HashMap<>(); + private final List objects = new ArrayList<>(); private Reference loader; private ExceptionListener listener; @@ -351,23 +355,32 @@ * * @param input the input source to parse */ - public void parse(InputSource input) { - try { - SAXParserFactory.newInstance().newSAXParser().parse(input, this); + public void parse(final InputSource input) { + if ((this.acc == null) && (null != System.getSecurityManager())) { + throw new SecurityException("AccessControlContext is not set"); } - catch (ParserConfigurationException exception) { - handleException(exception); - } - catch (SAXException wrapper) { - Exception exception = wrapper.getException(); - if (exception == null) { - exception = wrapper; + AccessControlContext stack = AccessController.getContext(); + SharedSecrets.getJavaSecurityAccess().doIntersectionPrivilege(new PrivilegedAction() { + public Void run() { + try { + SAXParserFactory.newInstance().newSAXParser().parse(input, DocumentHandler.this); + } + catch (ParserConfigurationException exception) { + handleException(exception); + } + catch (SAXException wrapper) { + Exception exception = wrapper.getException(); + if (exception == null) { + exception = wrapper; + } + handleException(exception); + } + catch (IOException exception) { + handleException(exception); + } + return null; } - handleException(exception); - } - catch (IOException exception) { - handleException(exception); - } + }, stack, this.acc); } /** diff -r 362f79895241 -r d7ecb57d3c61 src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java --- a/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java Fri Aug 31 21:58:52 2012 +0100 +++ b/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java Tue Oct 16 21:33:05 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -35,6 +35,8 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import sun.reflect.misc.MethodUtil; + /** * This class is intended to handle <property> element. * This element simplifies access to the properties. @@ -168,11 +170,11 @@ private static Object getPropertyValue(Object bean, String name, Integer index) throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException { Class type = bean.getClass(); if (index == null) { - return findGetter(type, name).invoke(bean); + return MethodUtil.invoke(findGetter(type, name), bean, new Object[] {}); } else if (type.isArray() && (name == null)) { return Array.get(bean, index); } else { - return findGetter(type, name, int.class).invoke(bean, index); + return MethodUtil.invoke(findGetter(type, name, int.class), bean, new Object[] {index}); } } @@ -197,11 +199,11 @@ : null; if (index == null) { - findSetter(type, name, param).invoke(bean, value); + MethodUtil.invoke(findSetter(type, name, param), bean, new Object[] {value}); } else if (type.isArray() && (name == null)) { Array.set(bean, index, value); } else { - findSetter(type, name, int.class, param).invoke(bean, index, value); + MethodUtil.invoke(findSetter(type, name, int.class, param), bean, new Object[] {index, value}); } } diff -r 362f79895241 -r d7ecb57d3c61 src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java --- a/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java Fri Aug 31 21:58:52 2012 +0100 +++ b/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java Tue Oct 16 21:33:05 2012 +0100 @@ -68,9 +68,9 @@ this.notifBuffer = notifBuffer; this.connectionId = connectionId; connectionTimeout = EnvHelp.getServerConnectionTimeout(env); - checkNotificationEmission = EnvHelp.computeBooleanFromString( - env, - "jmx.remote.x.check.notification.emission",false); + + String stringBoolean = (String) env.get("jmx.remote.x.check.notification.emission"); + checkNotificationEmission = EnvHelp.computeBooleanFromString( stringBoolean ); notificationAccessController = EnvHelp.getNotificationAccessController(env); } diff -r 362f79895241 -r d7ecb57d3c61 src/share/classes/com/sun/jmx/remote/util/EnvHelp.java --- a/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java Fri Aug 31 21:58:52 2012 +0100 +++ b/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java Tue Oct 16 21:33:05 2012 +0100 @@ -665,97 +665,57 @@ * Computes a boolean value from a string value retrieved from a * property in the given map. * - * @param env the environment map. - * @param prop the name of the property in the environment map whose - * returned string value must be converted into a boolean value. - * @param systemProperty if true, consult a system property of the - * same name if there is no entry in the environment map. + * @param stringBoolean the string value that must be converted + * into a boolean value. * * @return *
    - *
  • {@code false} if {@code env.get(prop)} is {@code null}
  • + *
  • {@code false} if {@code stringBoolean} is {@code null}
  • *
  • {@code false} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} + * {@code stringBoolean.equalsIgnoreCase("false")} * is {@code true}
  • *
  • {@code true} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} + * {@code stringBoolean.equalsIgnoreCase("true")} * is {@code true}
  • *
* - * @throws IllegalArgumentException if {@code env} is {@code null} or - * {@code env.get(prop)} is not {@code null} and + * @throws IllegalArgumentException if * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are * {@code false}. - * @throws ClassCastException if {@code env.get(prop)} cannot be cast - * to {@code String}. */ - public static boolean computeBooleanFromString( - Map env, String prop, boolean systemProperty) { - - if (env == null) - throw new IllegalArgumentException("env map cannot be null"); - + public static boolean computeBooleanFromString(String stringBoolean) { // returns a default value of 'false' if no property is found... - return computeBooleanFromString(env,prop,systemProperty,false); + return computeBooleanFromString(stringBoolean,false); } /** * Computes a boolean value from a string value retrieved from a * property in the given map. * - * @param env the environment map. - * @param prop the name of the property in the environment map whose - * returned string value must be converted into a boolean value. - * @param systemProperty if true, consult a system property of the - * same name if there is no entry in the environment map. + * @param stringBoolean the string value that must be converted + * into a boolean value. * @param defaultValue a default value to return in case no property * was defined. * * @return *
    - *
  • {@code defaultValue} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code false}
  • - *
  • {@code defaultValue} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code true} and - * {@code System.getProperty(prop)} is {@code null}
  • - *
  • {@code false} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code true} and - * {@code System.getProperty(prop).equalsIgnoreCase("false")} - * is {@code true}
  • - *
  • {@code true} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code true} and - * {@code System.getProperty(prop).equalsIgnoreCase("true")} - * is {@code true}
  • + *
  • {@code defaultValue} if {@code stringBoolean} + * is {@code null}
  • *
  • {@code false} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} + * {@code stringBoolean.equalsIgnoreCase("false")} * is {@code true}
  • *
  • {@code true} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} + * {@code stringBoolean.equalsIgnoreCase("true")} * is {@code true}
  • *
* - * @throws IllegalArgumentException if {@code env} is {@code null} or - * {@code env.get(prop)} is not {@code null} and + * @throws IllegalArgumentException if * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are * {@code false}. - * @throws ClassCastException if {@code env.get(prop)} cannot be cast - * to {@code String}. */ - public static boolean computeBooleanFromString( - Map env, String prop, - boolean systemProperty, boolean defaultValue) { - - if (env == null) - throw new IllegalArgumentException("env map cannot be null"); - - String stringBoolean = (String) env.get(prop); - if (stringBoolean == null && systemProperty) { - stringBoolean = - AccessController.doPrivileged(new GetPropertyAction(prop)); - } - + public static boolean computeBooleanFromString( String stringBoolean, boolean defaultValue) { if (stringBoolean == null) return defaultValue; else if (stringBoolean.equalsIgnoreCase("true")) @@ -763,8 +723,8 @@ else if (stringBoolean.equalsIgnoreCase("false")) return false; else - throw new IllegalArgumentException(prop + - " must be \"true\" or \"false\" instead of \"" + + throw new IllegalArgumentException( + "Property value must be \"true\" or \"false\" instead of \"" + stringBoolean + "\""); } diff -r 362f79895241 -r d7ecb57d3c61 src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java --- a/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java Fri Aug 31 21:58:52 2012 +0100 +++ b/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java Tue Oct 16 21:33:05 2012 +0100 @@ -146,11 +146,11 @@ */ public RhinoScriptEngine() { if (System.getSecurityManager() != null) { - accCtxt = AccessController.getContext(); - } - - if (System.getSecurityManager() != null) { - accCtxt = AccessController.getContext(); + try { + AccessController.checkPermission(new AllPermission()); + } catch (AccessControlException ace) { + accCtxt = AccessController.getContext(); + } } Context cx = enterContext(); diff -r 362f79895241 -r d7ecb57d3c61 src/share/classes/java/beans/XMLDecoder.java --- a/src/share/classes/java/beans/XMLDecoder.java Fri Aug 31 21:58:52 2012 +0100 +++ b/src/share/classes/java/beans/XMLDecoder.java Tue Oct 16 21:33:05 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -29,6 +29,9 @@ import java.io.Closeable; import java.io.InputStream; import java.io.IOException; +import java.security.AccessControlContext; +import java.security.AccessController; +import java.security.PrivilegedAction; import org.xml.sax.InputSource; import org.xml.sax.helpers.DefaultHandler; @@ -61,6 +64,7 @@ * @author Philip Milne */ public class XMLDecoder implements AutoCloseable { + private final AccessControlContext acc = AccessController.getContext(); private final DocumentHandler handler = new DocumentHandler(); private final InputSource input; private Object owner; @@ -189,7 +193,15 @@ return false; } if (this.array == null) { - this.handler.parse(this.input); + if ((this.acc == null) && (null != System.getSecurityManager())) { + throw new SecurityException("AccessControlContext is not set"); + } + AccessController.doPrivileged(new PrivilegedAction() { + public Void run() { + XMLDecoder.this.handler.parse(XMLDecoder.this.input); + return null; + } + }, this.acc); this.array = this.handler.getObjects(); } return true; diff -r 362f79895241 -r d7ecb57d3c61 src/share/classes/java/io/FilePermission.java --- a/src/share/classes/java/io/FilePermission.java Fri Aug 31 21:58:52 2012 +0100 +++ b/src/share/classes/java/io/FilePermission.java Tue Oct 16 21:33:05 2012 +0100 @@ -418,7 +418,7 @@ */ public int hashCode() { - return this.cpath.hashCode(); + return 0; } /** diff -r 362f79895241 -r d7ecb57d3c61 src/share/classes/java/lang/invoke/MethodHandleImpl.java --- a/src/share/classes/java/lang/invoke/MethodHandleImpl.java Fri Aug 31 21:58:52 2012 +0100 +++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java Tue Oct 16 21:33:05 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -25,7 +25,6 @@ package java.lang.invoke; -import sun.invoke.util.VerifyType; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; @@ -35,6 +34,7 @@ import java.util.List; import sun.invoke.empty.Empty; import sun.invoke.util.ValueConversions; +import sun.invoke.util.VerifyType; import sun.invoke.util.Wrapper; import sun.misc.Unsafe; import static java.lang.invoke.MethodHandleStatics.*; @@ -1259,6 +1259,171 @@ } static Empty throwException(T t) throws T { throw t; } + /** + * Create an alias for the method handle which, when called, + * appears to be called from the same class loader and protection domain + * as hostClass. + * This is an expensive no-op unless the method which is called + * is sensitive to its caller. A small number of system methods + * are in this category, including Class.forName and Method.invoke. + */ + static + MethodHandle bindCaller(MethodHandle mh, Class hostClass) { + return BindCaller.bindCaller(mh, hostClass); + } + + // Put the whole mess into its own nested class. + // That way we can lazily load the code and set up the constants. + private static class BindCaller { + static + MethodHandle bindCaller(MethodHandle mh, Class hostClass) { + // Do not use this function to inject calls into system classes. + if (hostClass == null) { + hostClass = C_Trampoline; + } else if (hostClass.isArray() || + hostClass.isPrimitive() || + hostClass.getName().startsWith("java.") || + hostClass.getName().startsWith("sun.")) { + throw new InternalError(); // does not happen, and should not anyway + } + // For simplicity, convert mh to a varargs-like method. + MethodHandle vamh = prepareForInvoker(mh); + // Cache the result of makeInjectedInvoker once per argument class. + MethodHandle bccInvoker = CV_makeInjectedInvoker.get(hostClass); + return restoreToType(bccInvoker.bindTo(vamh), mh.type()); + } + + // This class ("Trampoline") is known to be inside a dead-end class loader. + // Inject all doubtful calls into this class. + private static Class C_Trampoline; + static { + Class tramp = null; + try { + final int FRAME_COUNT_ARG = 1; // [0] Reflection [1] Trampoline + java.lang.reflect.Method gcc = sun.reflect.Reflection.class.getMethod("getCallerClass", int.class); + tramp = (Class) sun.reflect.misc.MethodUtil.invoke(gcc, null, new Object[]{ FRAME_COUNT_ARG }); + if (tramp.getClassLoader() == BindCaller.class.getClassLoader()) + throw new RuntimeException(tramp.getName()+" class loader"); + } catch (Throwable ex) { + throw new InternalError(ex.toString()); + } + C_Trampoline = tramp; + } + + private static final Unsafe UNSAFE = Unsafe.getUnsafe(); + + private static MethodHandle makeInjectedInvoker(Class hostClass) { + Class bcc = UNSAFE.defineAnonymousClass(hostClass, T_BYTES, null); + if (hostClass.getClassLoader() != bcc.getClassLoader()) + throw new InternalError(hostClass.getName()+" (CL)"); + try { + if (hostClass.getProtectionDomain() != bcc.getProtectionDomain()) + throw new InternalError(hostClass.getName()+" (PD)"); + } catch (SecurityException ex) { + // Self-check was blocked by security manager. This is OK. + // In fact the whole try body could be turned into an assertion. + } + try { + MethodHandle init = IMPL_LOOKUP.findStatic(bcc, "init", MethodType.methodType(void.class)); + init.invokeExact(); // force initialization of the class + } catch (Throwable ex) { + throw uncaughtException(ex); + } + MethodHandle bccInvoker; + try { + MethodType invokerMT = MethodType.methodType(Object.class, MethodHandle.class, Object[].class); + bccInvoker = IMPL_LOOKUP.findStatic(bcc, "invoke_V", invokerMT); + } catch (ReflectiveOperationException ex) { + throw uncaughtException(ex); + } + // Test the invoker, to ensure that it really injects into the right place. + try { + MethodHandle vamh = prepareForInvoker(MH_checkCallerClass); + Object ok = bccInvoker.invokeExact(vamh, new Object[]{hostClass, bcc}); + } catch (Throwable ex) { + throw new InternalError(ex.toString()); + } + return bccInvoker; + } + private static ClassValue CV_makeInjectedInvoker = new ClassValue() { + @Override protected MethodHandle computeValue(Class hostClass) { + return makeInjectedInvoker(hostClass); + } + }; + + // Adapt mh so that it can be called directly from an injected invoker: + private static MethodHandle prepareForInvoker(MethodHandle mh) { + mh = mh.asFixedArity(); + MethodType mt = mh.type(); + int arity = mt.parameterCount(); + MethodHandle vamh = mh.asType(mt.generic()); + vamh = vamh.asSpreader(Object[].class, arity); + return vamh; + } From andrew at icedtea.classpath.org Tue Oct 16 13:35:51 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:35:51 +0000 Subject: /hg/release/icedtea6-1.11: 7 new changesets Message-ID: changeset d9564350faa6 in /hg/release/icedtea6-1.11 details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=d9564350faa6 author: Andrew John Hughes date: Thu Oct 11 21:32:13 2012 +0100 Add 2012/10/16 security patches. 2012-10-11 Andrew John Hughes * Makefile.am: (SECURITY_PATCHES): Add new patches. * patches/ecj/override.patch: Add new cases in P11Key and RMIConnectionImpl introduced by security patches. * patches/security/20121016/6631398.patch, * patches/security/20121016/7093490.patch, * patches/security/20121016/7143535.patch, * patches/security/20121016/7158800.patch, * patches/security/20121016/7158801.patch, * patches/security/20121016/7158804.patch, * patches/security/20121016/7167656.patch, * patches/security/20121016/7169884.patch, * patches/security/20121016/7169888.patch, * patches/security/20121016/7172522.patch, * patches/security/20121016/7176337.patch, * patches/security/20121016/7186286.patch, * patches/security/20121016/7189103.patch, * patches/security/20121016/7189490.patch, * patches/security/20121016/7189567.patch, * patches/security/20121016/7192975.patch, * patches/security/20121016/7195194.patch, * patches/security/20121016/7195917.patch, * patches/security/20121016/7195919.patch, * patches/security/20121016/7198296.patch, * patches/security/20121016/7198606.patch: New patches. changeset f975a9b1d5b5 in /hg/release/icedtea6-1.11 details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=f975a9b1d5b5 author: Andrew John Hughes date: Thu Oct 11 21:48:44 2012 +0100 Update NEWS with security fixes. 2012-10-11 Andrew John Hughes * NEWS: Update with security fixes. changeset 904945674c52 in /hg/release/icedtea6-1.11 details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=904945674c52 author: Andrew John Hughes date: Fri Oct 12 03:10:34 2012 +0100 Merge changeset 12172d5875a5 in /hg/release/icedtea6-1.11 details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=12172d5875a5 author: Andrew John Hughes date: Fri Oct 12 20:41:03 2012 +0100 Prepare for 1.11.5 2012-10-12 Andrew John Hughes * NEWS: Set release date for 1.11.5. * configure.ac: Bump to 1.11.5. changeset 527b1ef07071 in /hg/release/icedtea6-1.11 details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=527b1ef07071 author: Andrew John Hughes date: Mon Oct 15 18:59:53 2012 +0100 S7175845: "jar uf" changes file permissions unexpectedly S7177216: native2ascii changes file permissions of input file 2012-10-15 Andrew John Hughes * Makefile.am: (ICEDTEA_PATCHES): Add new patches. * NEWS: Mention S7175845 and S7177216. * patches/openjdk/7175845-jar_uf_changes_file_permissions.patch, * patches/openjdk/7177216-native2ascii_changes_file_permissions.patch: New backports to fix regressions caused by S7143606. changeset f63ce4390499 in /hg/release/icedtea6-1.11 details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=f63ce4390499 author: Andrew John Hughes date: Tue Oct 16 16:13:14 2012 +0100 S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo 2012-10-15 Andrew John Hughes * Makefile.am: (ICEDTEA_PATCHES): Add new patch. * NEWS: Mention S7199153. * patches/openjdk/7199153-try_with_resources_pushed_to_6.patch: Added to fix tests from previous commit. changeset 2e4b16eaaf3f in /hg/release/icedtea6-1.11 details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=2e4b16eaaf3f author: Andrew John Hughes date: Tue Oct 16 21:23:51 2012 +0100 Added tag icedtea6-1.11.5 for changeset f63ce4390499 diffstat: .hgtags | 1 + ChangeLog | 68 + Makefile.am | 28 +- NEWS | 30 +- acinclude.m4 | 4 +- configure.ac | 2 +- patches/ecj/override.patch | 22 + patches/openjdk/7175845-jar_uf_changes_file_permissions.patch | 113 + patches/openjdk/7177216-native2ascii_changes_file_permissions.patch | 110 + patches/openjdk/7199153-try_with_resources_pushed_to_6.patch | 194 + patches/security/20121016/6631398.patch | 20 + patches/security/20121016/7093490.patch | 28 + patches/security/20121016/7143535.patch | 31 + patches/security/20121016/7158800.patch | 1413 ++++++++++ patches/security/20121016/7158801.patch | 30 + patches/security/20121016/7158804.patch | 28 + patches/security/20121016/7167656.patch | 75 + patches/security/20121016/7169884.patch | 349 ++ patches/security/20121016/7169888.patch | 125 + patches/security/20121016/7172522.patch | 36 + patches/security/20121016/7176337.patch | 29 + patches/security/20121016/7186286.patch | 552 +++ patches/security/20121016/7189103.patch | 39 + patches/security/20121016/7189490.patch | 55 + patches/security/20121016/7189567.patch | 95 + patches/security/20121016/7192975.patch | 35 + patches/security/20121016/7195194.patch | 29 + patches/security/20121016/7195917.patch | 88 + patches/security/20121016/7195919.patch | 63 + patches/security/20121016/7198296.patch | 114 + patches/security/20121016/7198606.patch | 28 + 31 files changed, 3828 insertions(+), 6 deletions(-) diffs (truncated from 3996 to 500 lines): diff -r 7f603a40c817 -r 2e4b16eaaf3f .hgtags --- a/.hgtags Wed Sep 05 11:43:29 2012 +0200 +++ b/.hgtags Tue Oct 16 21:23:51 2012 +0100 @@ -27,3 +27,4 @@ ca61b2ffa966cac5c5d9ea217b7aec4a0da83ab8 icedtea6-1.11.2 a9b49bd3d0b5c54eb368b5f9f9b96b8d1aef843d icedtea6-1.11.3 a773e4481576804dfdf51501727bd5461f88b801 icedtea6-1.11.4 +f63ce43904998e7e9ac04558ada787bb73044ef6 icedtea6-1.11.5 diff -r 7f603a40c817 -r 2e4b16eaaf3f ChangeLog --- a/ChangeLog Wed Sep 05 11:43:29 2012 +0200 +++ b/ChangeLog Tue Oct 16 21:23:51 2012 +0100 @@ -1,3 +1,71 @@ +2012-10-15 Andrew John Hughes + + * Makefile.am: + (ICEDTEA_PATCHES): Add new patch. + * NEWS: Mention S7199153. + * patches/openjdk/7199153-try_with_resources_pushed_to_6.patch: + Added to fix tests from previous commit. + +2012-10-15 Andrew John Hughes + + * Makefile.am: + (ICEDTEA_PATCHES): Add new patches. + * NEWS: + Mention S7175845 and S7177216. + * patches/openjdk/7175845-jar_uf_changes_file_permissions.patch, + * patches/openjdk/7177216-native2ascii_changes_file_permissions.patch: + New backports to fix regressions caused by + S7143606. + +2012-10-12 Andrew John Hughes + + * NEWS: Set release date for 1.11.5. + * configure.ac: Bump to 1.11.5. + +2012-10-11 Andrew John Hughes + + * NEWS: Update with security fixes. + +2012-10-11 Andrew John Hughes + + * Makefile.am: + (SECURITY_PATCHES): Add new patches. + * patches/ecj/override.patch: + Add new cases in P11Key and RMIConnectionImpl + introduced by security patches. + * patches/security/20121016/6631398.patch, + * patches/security/20121016/7093490.patch, + * patches/security/20121016/7143535.patch, + * patches/security/20121016/7158800.patch, + * patches/security/20121016/7158801.patch, + * patches/security/20121016/7158804.patch, + * patches/security/20121016/7167656.patch, + * patches/security/20121016/7169884.patch, + * patches/security/20121016/7169888.patch, + * patches/security/20121016/7172522.patch, + * patches/security/20121016/7176337.patch, + * patches/security/20121016/7186286.patch, + * patches/security/20121016/7189103.patch, + * patches/security/20121016/7189490.patch, + * patches/security/20121016/7189567.patch, + * patches/security/20121016/7192975.patch, + * patches/security/20121016/7195194.patch, + * patches/security/20121016/7195917.patch, + * patches/security/20121016/7195919.patch, + * patches/security/20121016/7198296.patch, + * patches/security/20121016/7198606.patch: + New patches. + +2012-03-19 Andrew John Hughes + + PR 1194: + * acinclude.m4: + (IT_CHECK_FOR_JDK): Update JDK home directory + check list, adding some missing 1.6 entries + and removing generic ones which may now pick + up an unwanted 1.7 installation. + * NEWS: Updated. + 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diff -r 7f603a40c817 -r 2e4b16eaaf3f Makefile.am --- a/Makefile.am Wed Sep 05 11:43:29 2012 +0200 +++ b/Makefile.am Tue Oct 16 21:23:51 2012 +0100 @@ -224,7 +224,28 @@ patches/security/20120612/7160757.patch \ patches/security/20120830/7162476-xmldecoder_via_classfinder.patch \ patches/security/20120830/7163201-simplify_toolkit_internal_references.patch \ - patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch + patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch \ + patches/security/20121016/6631398.patch \ + patches/security/20121016/7093490.patch \ + patches/security/20121016/7143535.patch \ + patches/security/20121016/7158800.patch \ + patches/security/20121016/7158801.patch \ + patches/security/20121016/7158804.patch \ + patches/security/20121016/7167656.patch \ + patches/security/20121016/7169884.patch \ + patches/security/20121016/7169888.patch \ + patches/security/20121016/7172522.patch \ + patches/security/20121016/7176337.patch \ + patches/security/20121016/7186286.patch \ + patches/security/20121016/7189103.patch \ + patches/security/20121016/7189490.patch \ + patches/security/20121016/7189567.patch \ + patches/security/20121016/7192975.patch \ + patches/security/20121016/7195194.patch \ + patches/security/20121016/7195917.patch \ + patches/security/20121016/7195919.patch \ + patches/security/20121016/7198296.patch \ + patches/security/20121016/7198606.patch SPECIAL_SECURITY_PATCH = patches/security/20120214/7112642.patch @@ -435,7 +456,10 @@ patches/openjdk/6792400-Avoid_loading_Normalizer_resources.patch \ patches/coverage-table.patch \ patches/openjdk/7185678-xmenuitem_peer_npe.patch \ - patches/merge_fix.patch + patches/merge_fix.patch \ + patches/openjdk/7175845-jar_uf_changes_file_permissions.patch \ + patches/openjdk/7177216-native2ascii_changes_file_permissions.patch \ + patches/openjdk/7199153-try_with_resources_pushed_to_6.patch if WITH_RHINO ICEDTEA_PATCHES += \ diff -r 7f603a40c817 -r 2e4b16eaaf3f NEWS --- a/NEWS Wed Sep 05 11:43:29 2012 +0200 +++ b/NEWS Tue Oct 16 21:23:51 2012 +0100 @@ -10,7 +10,35 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.11.5 (2012-XX-XX): +New in release 1.11.5 (2012-10-16): + +* Security fixes + - S6631398, CVE-2012-3216: FilePermission improved path checking + - S7093490: adjust package access in rmiregistry + - S7143535, CVE-2012-5068: ScriptEngine corrected permissions + - S7167656, CVE-2012-5077: Multiple Seeders are being created + - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types + - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector + - S7172522, CVE-2012-5072: Improve DomainCombiner checking + - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC + - S7189103, CVE-2012-5069: Executors needs to maintain state + - S7189490: More improvements to DomainCombiner checking + - S7189567, CVE-2012-5085: java net obselete protocol + - S7192975, CVE-2012-5071: Conditional usage check is wrong + - S7195194, CVE-2012-5084: Better data validation for Swing + - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved + - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance + - S7198296, CVE-2012-5089: Refactor classloader usage + - S7158800: Improve storage of symbol tables + - S7158801: Improve VM CompileOnly option + - S7158804: Improve config file parsing + - S7176337: Additional changes needed for 7158801 fix + - S7198606, CVE-2012-4416: Improve VM optimization +* Bug fixes + - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default + - S7175845: "jar uf" changes file permissions unexpectedly + - S7177216: native2ascii changes file permissions of input file + - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo New in release 1.11.4 (2012-08-31): diff -r 7f603a40c817 -r 2e4b16eaaf3f acinclude.m4 --- a/acinclude.m4 Wed Sep 05 11:43:29 2012 +0200 +++ b/acinclude.m4 Tue Oct 16 21:23:51 2012 +0100 @@ -1147,9 +1147,9 @@ if test "x${enable_bootstrap}" = "xyes"; then BOOTSTRAP_VMS="/usr/lib/jvm/java-gcj /usr/lib/jvm/gcj-jdk /usr/lib/jvm/cacao"; fi - for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-openjdk \ + for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-1.6.0 \ /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ - /usr/lib/jvm/openjdk /usr/lib/jvm/java-icedtea ; do + /usr/lib/jvm/java-1.6.0-openjdk /usr/lib/jvm/icedtea-6 ; do if test -d $dir; then SYSTEM_JDK_DIR=$dir break diff -r 7f603a40c817 -r 2e4b16eaaf3f configure.ac --- a/configure.ac Wed Sep 05 11:43:29 2012 +0200 +++ b/configure.ac Tue Oct 16 21:23:51 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea6],[1.11.5pre],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.11.5],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r 7f603a40c817 -r 2e4b16eaaf3f patches/ecj/override.patch --- a/patches/ecj/override.patch Wed Sep 05 11:43:29 2012 +0200 +++ b/patches/ecj/override.patch Tue Oct 16 21:23:51 2012 +0100 @@ -229,3 +229,25 @@ public int compareTo(X509IssuerSerial another) { int cissuer = issuer.toString() .compareTo(another.issuer.toString()); +diff -Nru openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java +--- openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:58:37.130814619 +0100 ++++ openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:59:39.699829277 +0100 +@@ -168,7 +168,6 @@ + this.defaultContextClassLoader = + AccessController.doPrivileged( + new PrivilegedAction() { +- @Override + public ClassLoader run() { + return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), + dcl); +diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java +--- openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:18:07.340676704 +0100 ++++ openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:17:40.092039288 +0100 +@@ -216,7 +216,6 @@ + /** + * Return bit length of the key. + */ +- @Override + public int length() { + return keyLength; + } diff -r 7f603a40c817 -r 2e4b16eaaf3f patches/openjdk/7175845-jar_uf_changes_file_permissions.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/7175845-jar_uf_changes_file_permissions.patch Tue Oct 16 21:23:51 2012 +0100 @@ -0,0 +1,113 @@ +# HG changeset patch +# User mbankal +# Date 1342460916 25200 +# Node ID 2366192c7fcb928a2adec2bdf08138688dac0423 +# Parent 0e34d43263864db83322f337262fbb2be3be5d17 +7175845: "jar uf" changes file permissions unexpectedly +Reviewed-by: ohair +Contributed-by: mala.bankal at oracle.com + +diff --git a/src/share/classes/sun/tools/jar/Main.java b/src/share/classes/sun/tools/jar/Main.java +--- openjdk/jdk/src/share/classes/sun/tools/jar/Main.java ++++ openjdk/jdk/src/share/classes/sun/tools/jar/Main.java +@@ -134,7 +134,7 @@ + File dir = file.getParentFile(); + if (dir == null) + dir = new File("."); +- return sun.misc.IOUtils.createTempFile("jartmp", null, dir); ++ return File.createTempFile("jartmp", null, dir); + } + + private boolean ok; +diff --git a/test/tools/jar/UpdateJar.java b/test/tools/jar/UpdateJar.java +new file mode 100644 +--- /dev/null ++++ openjdk/jdk/test/tools/jar/UpdateJar.java +@@ -0,0 +1,87 @@ ++/* ++ * Copyright (c) 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/** ++ * @test ++ * @bug 7175845 ++ * @summary jar -uf should not change file permission ++ */ ++ ++import java.io.*; ++import java.nio.file.*; ++import java.nio.file.attribute.*; ++import java.util.Set; ++import sun.tools.jar.Main; ++ ++public class UpdateJar { ++ ++ private static void cleanup(String... fnames) throws Throwable { ++ for (String fname : fnames) { ++ Files.deleteIfExists(Paths.get(fname)); ++ } ++ } ++ ++ public static void realMain(String[] args) throws Throwable { ++ if (!System.getProperty("os.name").startsWith("Windows")) { ++ String jar = "testUpdateJar.jar"; ++ String e0 = "testUpdateJar_entry0.txt"; ++ String e1 = "testUpdateJar_entry1.txt"; ++ cleanup(jar, e0, e1); ++ try { ++ try (FileOutputStream fos0 = new FileOutputStream(e0); ++ FileOutputStream fos1 = new FileOutputStream(e1)) { ++ fos0.write(0); ++ fos1.write(0); ++ } ++ String[] jarArgs = new String[] {"cfM0", jar, e0}; ++ if (!new Main(System.out, System.err, "jar").run(jarArgs)) { ++ fail("Could not create jar file."); ++ } ++ Set pm = Files.getPosixFilePermissions(Paths.get(jar)); ++ jarArgs = new String[] {"uf", jar, e1}; ++ if (!new Main(System.out, System.err, "jar").run(jarArgs)) { ++ fail("Could not create jar file."); ++ } ++ equal(pm, Files.getPosixFilePermissions(Paths.get(jar))); ++ } finally { ++ cleanup(jar, e0, e1); ++ } ++ } ++ } ++ ++ //--------------------- Infrastructure --------------------------- ++ static volatile int passed = 0, failed = 0; ++ static void pass() {passed++;} ++ static void fail() {failed++; Thread.dumpStack();} ++ static void fail(String msg) {System.out.println(msg); fail();} ++ static void unexpected(Throwable t) {failed++; t.printStackTrace();} ++ static void check(boolean cond) {if (cond) pass(); else fail();} ++ static void equal(Object x, Object y) { ++ if (x == null ? y == null : x.equals(y)) pass(); ++ else fail(x + " not equal to " + y);} ++ public static void main(String[] args) throws Throwable { ++ try {realMain(args);} catch (Throwable t) {unexpected(t);} ++ System.out.println("\nPassed = " + passed + " failed = " + failed); ++ if (failed > 0) throw new AssertionError("Some tests failed");} ++} ++ diff -r 7f603a40c817 -r 2e4b16eaaf3f patches/openjdk/7177216-native2ascii_changes_file_permissions.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/7177216-native2ascii_changes_file_permissions.patch Tue Oct 16 21:23:51 2012 +0100 @@ -0,0 +1,110 @@ +# HG changeset patch +# User mbankal +# Date 1342030130 25200 +# Node ID 0e34d43263864db83322f337262fbb2be3be5d17 +# Parent 99b43838c5d0a55a92bccbb62e6df5ee685978b6 +7177216: native2ascii changes file permissions of input file +Reviewed-by: ohair + +diff --git a/src/share/classes/sun/tools/native2ascii/Main.java b/src/share/classes/sun/tools/native2ascii/Main.java +--- openjdk/jdk/src/share/classes/sun/tools/native2ascii/Main.java ++++ openjdk/jdk/src/share/classes/sun/tools/native2ascii/Main.java +@@ -237,7 +237,7 @@ + if (tempDir == null) + tempDir = new File(System.getProperty("user.dir")); + +- tempFile = sun.misc.IOUtils.createTempFile("_N2A", ".TMP", tempDir); ++ tempFile = File.createTempFile("_N2A", ".TMP", tempDir); + tempFile.deleteOnExit(); + + try { +diff --git a/test/sun/tools/native2ascii/Permission.java b/test/sun/tools/native2ascii/Permission.java +new file mode 100644 +--- /dev/null ++++ openjdk/jdk/test/sun/tools/native2ascii/Permission.java +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/** ++ * @test ++ * @bug 7177216 ++ * @summary resulting file of native2ascii should have normal permission ++ */ ++ ++import java.io.*; ++import java.nio.file.*; ++import java.nio.file.attribute.*; ++import sun.tools.native2ascii.Main; ++ ++public class Permission { ++ ++ private static void cleanup(String... fnames) throws Throwable { ++ for (String fname : fnames) { ++ Files.deleteIfExists(Paths.get(fname)); ++ } ++ } ++ ++ public static void realMain(String[] args) throws Throwable { ++ if (!System.getProperty("os.name").startsWith("Windows")) { ++ String src = "native2ascii_permtest_src"; ++ String dst = "native2ascii_permtest_dst"; ++ ++ cleanup(src, dst); ++ try { ++ try (FileOutputStream fos = new FileOutputStream(src)) { ++ fos.write('a'); fos.write('b'); fos.write('c'); ++ } ++ String[] n2aArgs = new String[] {"-encoding", "utf8", src, dst}; ++ if (!new Main().convert(n2aArgs)) { ++ fail("n2a failed."); ++ } ++ equal(Files.getPosixFilePermissions(Paths.get(src)), ++ Files.getPosixFilePermissions(Paths.get(dst))); ++ String[] a2nArgs = new String[] {"-reverse", "-encoding", "utf8", dst, src}; ++ if (!new Main().convert(a2nArgs)) { ++ fail("a2n failed."); ++ } ++ equal(Files.getPosixFilePermissions(Paths.get(src)), ++ Files.getPosixFilePermissions(Paths.get(dst))); ++ } finally { ++ cleanup(src, dst); ++ } ++ } ++ } ++ ++ //--------------------- Infrastructure --------------------------- ++ static volatile int passed = 0, failed = 0; ++ static void pass() {passed++;} ++ static void fail() {failed++; Thread.dumpStack();} ++ static void fail(String msg) {System.out.println(msg); fail();} ++ static void unexpected(Throwable t) {failed++; t.printStackTrace();} ++ static void check(boolean cond) {if (cond) pass(); else fail();} ++ static void equal(Object x, Object y) { ++ if (x == null ? y == null : x.equals(y)) pass(); ++ else fail(x + " not equal to " + y);} ++ public static void main(String[] args) throws Throwable { ++ try {realMain(args);} catch (Throwable t) {unexpected(t);} ++ System.out.println("\nPassed = " + passed + " failed = " + failed); ++ if (failed > 0) throw new AssertionError("Some tests failed");} ++} diff -r 7f603a40c817 -r 2e4b16eaaf3f patches/openjdk/7199153-try_with_resources_pushed_to_6.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/7199153-try_with_resources_pushed_to_6.patch Tue Oct 16 21:23:51 2012 +0100 @@ -0,0 +1,194 @@ +# HG changeset patch +# User coffeys +# Date 1348007758 -3600 +# Node ID 0abac47de6d12023982e35effe00ea028d613b5e +# Parent 5998d43cb08ce2477ad9ba7970a26ef5be1f175c +7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo +Reviewed-by: ohair + +diff --git a/test/sun/tools/native2ascii/Permission.java b/test/sun/tools/native2ascii/Permission.java +--- openjdk/jdk/test/sun/tools/native2ascii/Permission.java ++++ openjdk/jdk/test/sun/tools/native2ascii/Permission.java +@@ -21,25 +21,43 @@ + * questions. + */ + +-/** ++/* + * @test +- * @bug 7177216 ++ * @bug 7177216 7199153 + * @summary resulting file of native2ascii should have normal permission + */ + + import java.io.*; +-import java.nio.file.*; +-import java.nio.file.attribute.*; + import sun.tools.native2ascii.Main; + + public class Permission { + + private static void cleanup(String... fnames) throws Throwable { + for (String fname : fnames) { +- Files.deleteIfExists(Paths.get(fname)); ++ File f = new File(fname); ++ if (f.exists()) ++ f.delete(); + } + } + ++ private static String permission(String fname) throws Throwable { ++ Process p = Runtime.getRuntime().exec("ls -l " + fname); ++ InputStream is = null; ++ String ret = null; ++ if (p != null && (is = p.getInputStream()) != null) { From andrew at icedtea.classpath.org Tue Oct 16 13:37:35 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:37:35 +0000 Subject: /hg/release/icedtea7-forest-2.3: Added tag icedtea-2.3.3 for cha... Message-ID: changeset 301e79a966b4 in /hg/release/icedtea7-forest-2.3 details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3?cmd=changeset;node=301e79a966b4 author: andrew date: Tue Oct 16 21:36:34 2012 +0100 Added tag icedtea-2.3.3 for changeset acba2d30209d diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r acba2d30209d -r 301e79a966b4 .hgtags --- a/.hgtags Thu Aug 30 20:29:21 2012 +0100 +++ b/.hgtags Tue Oct 16 21:36:34 2012 +0100 @@ -209,3 +209,4 @@ dda13866dd2855c304ba3801194f7ca3cffc3535 icedtea-2.3 2783cace584cbfa3ed52774185859faf41569f8e icedtea-2.3.1 a3fa5d49d528c32ad5d4b49e7241696a672ffe18 icedtea-2.3.2 +acba2d30209d19a87dbc0d2a6e366f09f01a210d icedtea-2.3.3 From andrew at icedtea.classpath.org Tue Oct 16 13:37:40 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:37:40 +0000 Subject: /hg/release/icedtea7-forest-2.3/corba: Added tag icedtea-2.3.3 f... Message-ID: changeset 9a95d714d136 in /hg/release/icedtea7-forest-2.3/corba details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/corba?cmd=changeset;node=9a95d714d136 author: andrew date: Tue Oct 16 21:36:34 2012 +0100 Added tag icedtea-2.3.3 for changeset 7fae6a3a68c7 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 7fae6a3a68c7 -r 9a95d714d136 .hgtags --- a/.hgtags Thu Aug 30 20:29:21 2012 +0100 +++ b/.hgtags Tue Oct 16 21:36:34 2012 +0100 @@ -209,3 +209,4 @@ f621504b45f74a5700c26334b70303f56a49f54c icedtea-2.3 2b1d2e9aea3270eb30e7a1ac2a02c5584acc404c icedtea-2.3.1 e9b200124386d2dceba0f2641316e8c6499f9966 icedtea-2.3.2 +7fae6a3a68c71b9b13144e92969b8ad625cf9814 icedtea-2.3.3 From andrew at icedtea.classpath.org Tue Oct 16 13:37:47 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:37:47 +0000 Subject: /hg/release/icedtea7-forest-2.3/jaxp: Added tag icedtea-2.3.3 fo... Message-ID: changeset f45296ac69be in /hg/release/icedtea7-forest-2.3/jaxp details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jaxp?cmd=changeset;node=f45296ac69be author: andrew date: Tue Oct 16 21:36:36 2012 +0100 Added tag icedtea-2.3.3 for changeset ee4bd94136ec diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r ee4bd94136ec -r f45296ac69be .hgtags --- a/.hgtags Thu Aug 30 20:29:23 2012 +0100 +++ b/.hgtags Tue Oct 16 21:36:36 2012 +0100 @@ -209,3 +209,4 @@ 1d3e59049a8998841ec63bc119adb1ea3f4c7116 icedtea-2.3 20e3c00ca7ae9649a40b385223a6c3b0d1155b93 icedtea-2.3.1 9bd1d8e8b802a8e22637c8a2e0acad9c9cb4a114 icedtea-2.3.2 +ee4bd94136ece0fed96b7b8d18f4d99f74fbd326 icedtea-2.3.3 From andrew at icedtea.classpath.org Tue Oct 16 13:37:52 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:37:52 +0000 Subject: /hg/release/icedtea7-forest-2.3/jaxws: Added tag icedtea-2.3.3 f... Message-ID: changeset 03f54ef33914 in /hg/release/icedtea7-forest-2.3/jaxws details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jaxws?cmd=changeset;node=03f54ef33914 author: andrew date: Tue Oct 16 21:36:37 2012 +0100 Added tag icedtea-2.3.3 for changeset c89c6ac953e7 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r c89c6ac953e7 -r 03f54ef33914 .hgtags --- a/.hgtags Thu Aug 30 20:29:24 2012 +0100 +++ b/.hgtags Tue Oct 16 21:36:37 2012 +0100 @@ -209,3 +209,4 @@ 973648e4cf9bafe4e0c489a7a5711a9047262f88 icedtea-2.3 410de4b438cf005c78611209ffa0799d89be1e19 icedtea-2.3.1 9a744f20cfc52e19f66956e5d406c23910ed4cb4 icedtea-2.3.2 +c89c6ac953e7f30780e74b4bc153fee4dd330179 icedtea-2.3.3 From andrew at icedtea.classpath.org Tue Oct 16 13:37:58 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:37:58 +0000 Subject: /hg/release/icedtea7-forest-2.3/langtools: Added tag icedtea-2.3... Message-ID: changeset ec73c6927fb7 in /hg/release/icedtea7-forest-2.3/langtools details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/langtools?cmd=changeset;node=ec73c6927fb7 author: andrew date: Tue Oct 16 21:36:38 2012 +0100 Added tag icedtea-2.3.3 for changeset 867d5041bee6 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r 867d5041bee6 -r ec73c6927fb7 .hgtags --- a/.hgtags Thu Aug 30 20:29:25 2012 +0100 +++ b/.hgtags Tue Oct 16 21:36:38 2012 +0100 @@ -209,3 +209,4 @@ ca0a82364e5fe1ae03911c90732b226d2482b77c icedtea-2.3 4ccca0a55ed66de7e7482b5f2a9222ec44bea699 icedtea-2.3.1 0cf6181d44db827cb1a341f5936ce43cc489fd08 icedtea-2.3.2 +867d5041bee60ea67ee56c5990a82a0215cc4959 icedtea-2.3.3 From andrew at icedtea.classpath.org Tue Oct 16 13:38:04 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:38:04 +0000 Subject: /hg/release/icedtea7-forest-2.3/hotspot: 5 new changesets Message-ID: changeset d1d78d586dca in /hg/release/icedtea7-forest-2.3/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=d1d78d586dca author: kvn date: Wed May 23 12:11:25 2012 -0700 7158801: Improve VM CompileOnly option Summary: Fixed buffer overflow during parsing flags -XX:CompileCommand=, -XX:CompileOnly= and command lines in .hotspot_compiler file. Reviewed-by: never changeset ece7163f52f0 in /hg/release/icedtea7-forest-2.3/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=ece7163f52f0 author: kamg date: Fri Jun 08 12:49:52 2012 -0400 7158804: Improve config file parsing Summary: Check buffer length when reading Reviewed-by: dholmes, dcubed changeset ae2d26a44633 in /hg/release/icedtea7-forest-2.3/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=ae2d26a44633 author: kvn date: Mon Jun 18 09:50:43 2012 -0700 7158807: Revise stack management with volatile call sites Summary: Add missing stack banging into method handle assebly code and throw a StackOverflowError. Reviewed-by: jrose, twisti changeset 0885feeea95c in /hg/release/icedtea7-forest-2.3/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=0885feeea95c author: kvn date: Wed Sep 19 21:14:10 2012 -0700 7198606: Improve VM optimization Reviewed-by: roland, twisti changeset d2d0a106917c in /hg/release/icedtea7-forest-2.3/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot?cmd=changeset;node=d2d0a106917c author: andrew date: Tue Oct 16 21:36:40 2012 +0100 Added tag icedtea-2.3.3 for changeset 0885feeea95c diffstat: .hgtags | 1 + src/cpu/sparc/vm/methodHandles_sparc.cpp | 31 ++++++++++++++++++++++++++ src/cpu/x86/vm/methodHandles_x86.cpp | 38 +++++++++++++++++++++++++++++-- src/share/vm/compiler/compilerOracle.cpp | 4 +- src/share/vm/opto/loopTransform.cpp | 3 ++ src/share/vm/runtime/arguments.cpp | 2 +- 6 files changed, 73 insertions(+), 6 deletions(-) diffs (194 lines): diff -r ea39d76b3bde -r d2d0a106917c .hgtags --- a/.hgtags Thu Aug 30 20:29:26 2012 +0100 +++ b/.hgtags Tue Oct 16 21:36:40 2012 +0100 @@ -330,3 +330,4 @@ eede732f62dd73953dce03e003415729c6c335b2 icedtea-2.3 c798442fa4c00ad251f6cbe989d32485845bf247 icedtea-2.3.1 2a413d946cb1acdcbe1110098f79b7a1f267bf75 icedtea-2.3.2 +0885feeea95caa8b92f46234872f0c3839d8850b icedtea-2.3.3 diff -r ea39d76b3bde -r d2d0a106917c src/cpu/sparc/vm/methodHandles_sparc.cpp --- a/src/cpu/sparc/vm/methodHandles_sparc.cpp Thu Aug 30 20:29:26 2012 +0100 +++ b/src/cpu/sparc/vm/methodHandles_sparc.cpp Tue Oct 16 21:36:40 2012 +0100 @@ -698,6 +698,17 @@ if (arg_slots.is_constant() && arg_slots.as_constant() == 0) return; + // We have to insert at least one word, so bang the stack. + if (UseStackBanging) { + // Save G3_method_handle since bang_stack_with_offset uses it as a temp register + __ mov(G3_method_handle, temp_reg); + int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0); + if (frame_size <= 0) + frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size); + __ mov(temp_reg, G3_method_handle); + } + assert_different_registers(argslot_reg, temp_reg, temp2_reg, temp3_reg, (!arg_slots.is_register() ? Gargs : arg_slots.as_register())); @@ -1702,6 +1713,14 @@ "copied argument(s) must fall within current frame"); } + if (UseStackBanging) { + // Save G3_method_handle since bang_stack_with_offset uses it as a temp register + __ mov(G3_method_handle, O3_scratch); + // Bang the stack before pushing args. + int frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + __ mov(O3_scratch, G3_method_handle); + } // insert location is always the bottom of the argument list: __ neg(O1_stack_move); push_arg_slots(_masm, O0_argslot, O1_stack_move, O2_scratch, O3_scratch); @@ -2118,6 +2137,18 @@ // The return handler will further cut back the stack when it takes // down the RF. Perhaps there is a way to streamline this further. + if (UseStackBanging) { + // Save G3_method_handle since bang_stack_with_offset uses it as a temp register + __ mov(G3_method_handle, O4_scratch); + // Bang the stack before recursive call. + // Even if slots == 0, we are inside a RicochetFrame. + int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1; + if (frame_size < 0) { + frame_size = 256 * Interpreter::stackElementSize; // conservative + } + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + __ mov(O4_scratch, G3_method_handle); + } // State during recursive call: // ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc | __ jump_to_method_handle_entry(G3_method_handle, O1_scratch); diff -r ea39d76b3bde -r d2d0a106917c src/cpu/x86/vm/methodHandles_x86.cpp --- a/src/cpu/x86/vm/methodHandles_x86.cpp Thu Aug 30 20:29:26 2012 +0100 +++ b/src/cpu/x86/vm/methodHandles_x86.cpp Tue Oct 16 21:36:40 2012 +0100 @@ -691,6 +691,14 @@ if (VerifyMethodHandles) verify_stack_move(_masm, arg_slots, -1); + // We have to insert at least one word, so bang the stack. + if (UseStackBanging) { + int frame_size = (arg_slots.is_constant() ? -1 * arg_slots.as_constant() * wordSize : 0); + if (frame_size <= 0) + frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size); + } + // Make space on the stack for the inserted argument(s). // Then pull down everything shallower than rax_argslot. // The stacked return address gets pulled down with everything else. @@ -1769,6 +1777,11 @@ "copied argument(s) must fall within current frame"); } + if (UseStackBanging) { + // Bang the stack before pushing args. + int frame_size = 256 * Interpreter::stackElementSize; // conservative + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + } // insert location is always the bottom of the argument list: Address insert_location = __ argument_address(constant(0)); int pre_arg_words = insert_location.disp() / wordSize; // return PC is pushed @@ -2206,6 +2219,15 @@ // The return handler will further cut back the stack when it takes // down the RF. Perhaps there is a way to streamline this further. + if (UseStackBanging) { + // Bang the stack before recursive call. + // Even if slots == 0, we are inside a RicochetFrame. + int frame_size = collect_count.is_constant() ? collect_count.as_constant() * wordSize : -1; + if (frame_size < 0) { + frame_size = 256 * Interpreter::stackElementSize; // conservative + } + __ generate_stack_overflow_check(frame_size + sizeof(RicochetFrame)); + } // State during recursive call: // ... keep1 | dest | dest=42 | keep3 | RF... | collect | bounce_pc | __ jump_to_method_handle_entry(rcx_recv, rdx_temp); @@ -2366,10 +2388,15 @@ // case in a 32-bit version of the VM) we have to save 'rsi' // on the stack because later on (at 'L_array_is_empty') 'rsi' // will be overwritten. - { if (rsi_temp == saved_last_sp) __ push(saved_last_sp); } + if (rsi_temp == saved_last_sp) { + __ push(saved_last_sp); + // Need to re-push return PC to keep it on stack top. + __ lea(saved_last_sp, ExternalAddress(SharedRuntime::ricochet_blob()->bounce_addr()).addr()); + __ push(saved_last_sp); + } // Also prepare a handy macro which restores 'rsi' if required. #define UNPUSH_RSI \ - { if (rsi_temp == saved_last_sp) __ pop(saved_last_sp); } + { if (rsi_temp == saved_last_sp) { __ pop(saved_last_sp); __ pop(saved_last_sp); } } __ jmp(L_array_is_empty); __ bind(L_skip); @@ -2382,7 +2409,12 @@ // called in the case of a null pointer exception will not be // confused by the extra value on the stack (it expects the // return pointer on top of the stack) - { if (rsi_temp == saved_last_sp) __ push(saved_last_sp); } + if (rsi_temp == saved_last_sp) { + __ push(saved_last_sp); + // Need to re-push return PC to keep it on stack top. + __ lea(saved_last_sp, ExternalAddress(SharedRuntime::ricochet_blob()->bounce_addr()).addr()); + __ push(saved_last_sp); + } // Check the array type. Register rbx_klass = rbx_temp; diff -r ea39d76b3bde -r d2d0a106917c src/share/vm/compiler/compilerOracle.cpp --- a/src/share/vm/compiler/compilerOracle.cpp Thu Aug 30 20:29:26 2012 +0100 +++ b/src/share/vm/compiler/compilerOracle.cpp Tue Oct 16 21:36:40 2012 +0100 @@ -575,7 +575,7 @@ char token[1024]; int pos = 0; int c = getc(stream); - while(c != EOF) { + while(c != EOF && pos < (int)(sizeof(token)-1)) { if (c == '\n') { token[pos++] = '\0'; parse_from_line(token); @@ -596,7 +596,7 @@ int pos = 0; const char* sp = str; int c = *sp++; - while (c != '\0') { + while (c != '\0' && pos < (int)(sizeof(token)-1)) { if (c == '\n') { token[pos++] = '\0'; parse_line(token); diff -r ea39d76b3bde -r d2d0a106917c src/share/vm/opto/loopTransform.cpp --- a/src/share/vm/opto/loopTransform.cpp Thu Aug 30 20:29:26 2012 +0100 +++ b/src/share/vm/opto/loopTransform.cpp Tue Oct 16 21:36:40 2012 +0100 @@ -2733,6 +2733,8 @@ result_mem = new (C, 1) ProjNode(call,TypeFunc::Memory); _igvn.register_new_node_with_optimizer(result_mem); +/* Disable following optimization until proper fix (add missing checks). + // If this fill is tightly coupled to an allocation and overwrites // the whole body, allow it to take over the zeroing. AllocateNode* alloc = AllocateNode::Ideal_allocation(base, this); @@ -2756,6 +2758,7 @@ #endif } } +*/ // Redirect the old control and memory edges that are outside the loop. Node* exit = head->loopexit()->proj_out(0); diff -r ea39d76b3bde -r d2d0a106917c src/share/vm/runtime/arguments.cpp --- a/src/share/vm/runtime/arguments.cpp Thu Aug 30 20:29:26 2012 +0100 +++ b/src/share/vm/runtime/arguments.cpp Tue Oct 16 21:36:40 2012 +0100 @@ -856,7 +856,7 @@ bool result = true; int c = getc(stream); - while(c != EOF) { + while(c != EOF && pos < (int)(sizeof(token)-1)) { if (in_white_space) { if (in_comment) { if (c == '\n') in_comment = false; From andrew at icedtea.classpath.org Tue Oct 16 13:38:12 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:38:12 +0000 Subject: /hg/release/icedtea7-forest-2.3/jdk: 22 new changesets Message-ID: changeset cb996986a525 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=cb996986a525 author: weijun date: Fri Jun 15 09:40:30 2012 +0800 6631398: FilePermission improved path checking Reviewed-by: mullan, skoivu, jdn changeset e1cd2adcb6fc in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=e1cd2adcb6fc author: smarks date: Thu Jun 21 00:20:49 2012 -0700 7093490: adjust package access in rmiregistry Reviewed-by: ahgross, coffeys, dmocek changeset ae6eefc8216c in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=ae6eefc8216c author: sundar date: Sat Aug 04 21:16:20 2012 +0530 7143535: ScriptEngine corrected permissions Reviewed-by: jjh changeset da0ee7f1af26 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=da0ee7f1af26 author: dsamersoff date: Fri Jun 15 15:34:35 2012 +0400 7158796: Tighten properties checking in EnvHelp Summary: Move getProperty call out of computeBooleanFromString Reviewed-by: skoivu, sla changeset f2bae6dacc05 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=f2bae6dacc05 author: mullan date: Thu Jun 07 12:31:16 2012 -0400 7163198: Tightened package accessibility 7169887: Tightened package accessibility Reviewed-by: hawtin changeset ec46ad0afaa2 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=ec46ad0afaa2 author: wetmore date: Mon May 21 15:42:08 2012 -0700 7167656: Multiple Seeders are being created Reviewed-by: smarks, mduigou, ahgross changeset 97f75273d727 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=97f75273d727 author: robm date: Tue Sep 11 14:45:22 2012 +0100 7169884: LogManager checks do not work correctly for sub-types Reviewed-by: alanb changeset 33544e126c75 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=33544e126c75 author: dsamersoff date: Fri Jun 15 17:02:58 2012 +0400 7169888: Narrowing resource definitions in JMX RMI connector Summary: CPU bug, we can't put offending calls outside doPrivileged, but narrow granted permissions. Reviewed-by: ahgross, fparain changeset 0048b76ea9fd in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=0048b76ea9fd author: mullan date: Tue Jun 19 13:16:19 2012 -0400 7172522: Improve DomainCombiner checking Reviewed-by: vinnie, ahgross changeset 65b5c1d1fe57 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=65b5c1d1fe57 author: xuelei date: Mon Jul 30 20:32:52 2012 -0700 7186286: TLS implementation to better adhere to RFC Summary: also reviewed by Alexander Fomin , Andrew Gross, Sean Coffey Reviewed-by: valeriep, wetmore changeset 00c665aa6d1d in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=00c665aa6d1d author: chegar date: Mon Aug 20 22:10:39 2012 +0100 7189103: Executors needs to maintain state Reviewed-by: dholmes, hawtin changeset ca88b412e85f in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=ca88b412e85f author: mullan date: Wed Aug 15 11:39:21 2012 -0400 7189490: More improvements to DomainCombiner checking Reviewed-by: ahgross, jdn, vinnie changeset e75f6a1028d1 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=e75f6a1028d1 author: chegar date: Wed Aug 22 22:51:16 2012 +0100 7189567: java net obselete protocol Reviewed-by: alanb, ahgross changeset da9b90b138f3 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=da9b90b138f3 author: dsamersoff date: Sun Sep 23 23:43:31 2012 +0400 7192975: Issue with JMX reflection Summary: Make security check unconditional Reviewed-by: ahgross, asaha Contributed-by: jaroslav.bachorik at oracle.com changeset bdda5d624540 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=bdda5d624540 author: rupashka date: Tue Sep 11 17:27:31 2012 +0400 7195194: Better data validation for Swing Reviewed-by: art, ahgross changeset 06a9af6fad52 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=06a9af6fad52 author: malenkov date: Tue Sep 11 15:58:50 2012 +0400 7195549: Better bean object persistence Reviewed-by: art, ahgross changeset fa7cbfacfb00 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=fa7cbfacfb00 author: malenkov date: Wed Sep 19 19:10:55 2012 +0400 7195917: XMLDecoder parsing at close-time should be improved Reviewed-by: art, ahgross changeset c7b17be8f842 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=c7b17be8f842 author: smarks date: Mon Sep 10 15:52:51 2012 -0700 7195919: (sl) ServiceLoader can throw CCE without needing to create instance Reviewed-by: ahgross, alanb, dmeetry changeset 43113374306c in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=43113374306c author: jrose date: Wed Sep 19 18:37:12 2012 -0700 7196190: Improve method of handling MethodHandles Summary: Bind callers to caller-sensitive methods. Reviewed-by: twisti, jjh, vlivanov, ahgross changeset a0ae1a8c83e0 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=a0ae1a8c83e0 author: dsamersoff date: Wed Sep 19 12:21:24 2012 -0700 7198296: Refactor classloader usage Reviewed-by: ahgross Contributed-by: dmitry.samersoff at oracle.com changeset 6d4f9b2e4a51 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=6d4f9b2e4a51 author: andrew date: Mon Oct 15 11:17:27 2012 +0100 Remove merge artefact. changeset 5ec94d162f05 in /hg/release/icedtea7-forest-2.3/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/jdk?cmd=changeset;node=5ec94d162f05 author: andrew date: Tue Oct 16 21:36:45 2012 +0100 Added tag icedtea-2.3.3 for changeset 6d4f9b2e4a51 diffstat: .hgtags | 1 + src/share/classes/com/sun/beans/decoder/DocumentHandler.java | 55 ++- src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java | 12 +- src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java | 6 +- src/share/classes/com/sun/jmx/remote/util/EnvHelp.java | 76 +--- src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java | 10 +- src/share/classes/java/beans/XMLDecoder.java | 16 +- src/share/classes/java/io/FilePermission.java | 2 +- src/share/classes/java/lang/invoke/MethodHandleImpl.java | 169 +++++++++- src/share/classes/java/lang/invoke/MethodHandleNatives.java | 99 +++++- src/share/classes/java/lang/invoke/MethodHandleStatics.java | 4 +- src/share/classes/java/lang/invoke/MethodHandles.java | 24 +- src/share/classes/java/net/URL.java | 28 +- src/share/classes/java/security/AccessController.java | 17 +- src/share/classes/java/util/ServiceLoader.java | 15 +- src/share/classes/java/util/concurrent/Executors.java | 19 +- src/share/classes/java/util/logging/FileHandler.java | 12 +- src/share/classes/java/util/logging/Handler.java | 18 +- src/share/classes/java/util/logging/LogManager.java | 24 +- src/share/classes/java/util/logging/Logger.java | 18 +- src/share/classes/java/util/logging/MemoryHandler.java | 2 +- src/share/classes/java/util/logging/StreamHandler.java | 2 +- src/share/classes/javax/management/modelmbean/DescriptorSupport.java | 5 +- src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java | 93 +++++- src/share/classes/javax/management/remote/rmi/RMIConnector.java | 6 +- src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java | 5 +- src/share/classes/javax/swing/text/DefaultFormatter.java | 4 +- src/share/classes/sun/invoke/anon/AnonymousClassLoader.java | 76 +---- src/share/classes/sun/misc/Service.java | 12 +- src/share/classes/sun/rmi/registry/RegistryImpl.java | 3 +- src/share/classes/sun/security/provider/SecureRandom.java | 37 +- src/share/classes/sun/security/ssl/HandshakeInStream.java | 13 +- src/share/classes/sun/security/ssl/Handshaker.java | 4 +- src/share/classes/sun/security/ssl/RSAClientKeyExchange.java | 56 ++- src/share/lib/security/java.security | 4 +- src/share/lib/security/java.security-macosx | 4 +- src/share/lib/security/java.security-solaris | 4 +- src/share/lib/security/java.security-windows | 4 +- test/java/net/URL/Test.java | 4 - 39 files changed, 668 insertions(+), 295 deletions(-) diffs (truncated from 2020 to 500 lines): diff -r f78eb7e08ee1 -r 5ec94d162f05 .hgtags --- a/.hgtags Fri Aug 31 12:21:12 2012 +0100 +++ b/.hgtags Tue Oct 16 21:36:45 2012 +0100 @@ -217,3 +217,4 @@ 0000000000000000000000000000000000000000 icedtea-2.3.2 0000000000000000000000000000000000000000 icedtea-2.3.2 64ec99488219da2565d3eea0a53ffb4854c87fbe icedtea-2.3.2 +6d4f9b2e4a51be218c0d0a1b10cd8469d8ca3cdc icedtea-2.3.3 diff -r f78eb7e08ee1 -r 5ec94d162f05 src/share/classes/com/sun/beans/decoder/DocumentHandler.java --- a/src/share/classes/com/sun/beans/decoder/DocumentHandler.java Fri Aug 31 12:21:12 2012 +0100 +++ b/src/share/classes/com/sun/beans/decoder/DocumentHandler.java Tue Oct 16 21:36:45 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -37,6 +37,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.security.AccessControlContext; +import java.security.AccessController; +import java.security.PrivilegedAction; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; @@ -46,6 +49,8 @@ import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; +import sun.misc.SharedSecrets; + /** * The main class to parse JavaBeans XML archive. * @@ -56,11 +61,10 @@ * @see ElementHandler */ public final class DocumentHandler extends DefaultHandler { - private final Map> handlers = new HashMap>(); - - private final Map environment = new HashMap(); - - private final List objects = new ArrayList(); + private final AccessControlContext acc = AccessController.getContext(); + private final Map> handlers = new HashMap<>(); + private final Map environment = new HashMap<>(); + private final List objects = new ArrayList<>(); private Reference loader; private ExceptionListener listener; @@ -351,23 +355,32 @@ * * @param input the input source to parse */ - public void parse(InputSource input) { - try { - SAXParserFactory.newInstance().newSAXParser().parse(input, this); + public void parse(final InputSource input) { + if ((this.acc == null) && (null != System.getSecurityManager())) { + throw new SecurityException("AccessControlContext is not set"); } - catch (ParserConfigurationException exception) { - handleException(exception); - } - catch (SAXException wrapper) { - Exception exception = wrapper.getException(); - if (exception == null) { - exception = wrapper; + AccessControlContext stack = AccessController.getContext(); + SharedSecrets.getJavaSecurityAccess().doIntersectionPrivilege(new PrivilegedAction() { + public Void run() { + try { + SAXParserFactory.newInstance().newSAXParser().parse(input, DocumentHandler.this); + } + catch (ParserConfigurationException exception) { + handleException(exception); + } + catch (SAXException wrapper) { + Exception exception = wrapper.getException(); + if (exception == null) { + exception = wrapper; + } + handleException(exception); + } + catch (IOException exception) { + handleException(exception); + } + return null; } - handleException(exception); - } - catch (IOException exception) { - handleException(exception); - } + }, stack, this.acc); } /** diff -r f78eb7e08ee1 -r 5ec94d162f05 src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java --- a/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java Fri Aug 31 12:21:12 2012 +0100 +++ b/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java Tue Oct 16 21:36:45 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -35,6 +35,8 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import sun.reflect.misc.MethodUtil; + /** * This class is intended to handle <property> element. * This element simplifies access to the properties. @@ -168,11 +170,11 @@ private static Object getPropertyValue(Object bean, String name, Integer index) throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException { Class type = bean.getClass(); if (index == null) { - return findGetter(type, name).invoke(bean); + return MethodUtil.invoke(findGetter(type, name), bean, new Object[] {}); } else if (type.isArray() && (name == null)) { return Array.get(bean, index); } else { - return findGetter(type, name, int.class).invoke(bean, index); + return MethodUtil.invoke(findGetter(type, name, int.class), bean, new Object[] {index}); } } @@ -197,11 +199,11 @@ : null; if (index == null) { - findSetter(type, name, param).invoke(bean, value); + MethodUtil.invoke(findSetter(type, name, param), bean, new Object[] {value}); } else if (type.isArray() && (name == null)) { Array.set(bean, index, value); } else { - findSetter(type, name, int.class, param).invoke(bean, index, value); + MethodUtil.invoke(findSetter(type, name, int.class, param), bean, new Object[] {index, value}); } } diff -r f78eb7e08ee1 -r 5ec94d162f05 src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java --- a/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java Fri Aug 31 12:21:12 2012 +0100 +++ b/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java Tue Oct 16 21:36:45 2012 +0100 @@ -68,9 +68,9 @@ this.notifBuffer = notifBuffer; this.connectionId = connectionId; connectionTimeout = EnvHelp.getServerConnectionTimeout(env); - checkNotificationEmission = EnvHelp.computeBooleanFromString( - env, - "jmx.remote.x.check.notification.emission",false); + + String stringBoolean = (String) env.get("jmx.remote.x.check.notification.emission"); + checkNotificationEmission = EnvHelp.computeBooleanFromString( stringBoolean ); notificationAccessController = EnvHelp.getNotificationAccessController(env); } diff -r f78eb7e08ee1 -r 5ec94d162f05 src/share/classes/com/sun/jmx/remote/util/EnvHelp.java --- a/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java Fri Aug 31 12:21:12 2012 +0100 +++ b/src/share/classes/com/sun/jmx/remote/util/EnvHelp.java Tue Oct 16 21:36:45 2012 +0100 @@ -665,97 +665,57 @@ * Computes a boolean value from a string value retrieved from a * property in the given map. * - * @param env the environment map. - * @param prop the name of the property in the environment map whose - * returned string value must be converted into a boolean value. - * @param systemProperty if true, consult a system property of the - * same name if there is no entry in the environment map. + * @param stringBoolean the string value that must be converted + * into a boolean value. * * @return *
    - *
  • {@code false} if {@code env.get(prop)} is {@code null}
  • + *
  • {@code false} if {@code stringBoolean} is {@code null}
  • *
  • {@code false} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} + * {@code stringBoolean.equalsIgnoreCase("false")} * is {@code true}
  • *
  • {@code true} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} + * {@code stringBoolean.equalsIgnoreCase("true")} * is {@code true}
  • *
* - * @throws IllegalArgumentException if {@code env} is {@code null} or - * {@code env.get(prop)} is not {@code null} and + * @throws IllegalArgumentException if * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are * {@code false}. - * @throws ClassCastException if {@code env.get(prop)} cannot be cast - * to {@code String}. */ - public static boolean computeBooleanFromString( - Map env, String prop, boolean systemProperty) { - - if (env == null) - throw new IllegalArgumentException("env map cannot be null"); - + public static boolean computeBooleanFromString(String stringBoolean) { // returns a default value of 'false' if no property is found... - return computeBooleanFromString(env,prop,systemProperty,false); + return computeBooleanFromString(stringBoolean,false); } /** * Computes a boolean value from a string value retrieved from a * property in the given map. * - * @param env the environment map. - * @param prop the name of the property in the environment map whose - * returned string value must be converted into a boolean value. - * @param systemProperty if true, consult a system property of the - * same name if there is no entry in the environment map. + * @param stringBoolean the string value that must be converted + * into a boolean value. * @param defaultValue a default value to return in case no property * was defined. * * @return *
    - *
  • {@code defaultValue} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code false}
  • - *
  • {@code defaultValue} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code true} and - * {@code System.getProperty(prop)} is {@code null}
  • - *
  • {@code false} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code true} and - * {@code System.getProperty(prop).equalsIgnoreCase("false")} - * is {@code true}
  • - *
  • {@code true} if {@code env.get(prop)} is {@code null} - * and {@code systemProperty} is {@code true} and - * {@code System.getProperty(prop).equalsIgnoreCase("true")} - * is {@code true}
  • + *
  • {@code defaultValue} if {@code stringBoolean} + * is {@code null}
  • *
  • {@code false} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} + * {@code stringBoolean.equalsIgnoreCase("false")} * is {@code true}
  • *
  • {@code true} if - * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} + * {@code stringBoolean.equalsIgnoreCase("true")} * is {@code true}
  • *
* - * @throws IllegalArgumentException if {@code env} is {@code null} or - * {@code env.get(prop)} is not {@code null} and + * @throws IllegalArgumentException if * {@code ((String)env.get(prop)).equalsIgnoreCase("false")} and * {@code ((String)env.get(prop)).equalsIgnoreCase("true")} are * {@code false}. - * @throws ClassCastException if {@code env.get(prop)} cannot be cast - * to {@code String}. */ - public static boolean computeBooleanFromString( - Map env, String prop, - boolean systemProperty, boolean defaultValue) { - - if (env == null) - throw new IllegalArgumentException("env map cannot be null"); - - String stringBoolean = (String) env.get(prop); - if (stringBoolean == null && systemProperty) { - stringBoolean = - AccessController.doPrivileged(new GetPropertyAction(prop)); - } - + public static boolean computeBooleanFromString( String stringBoolean, boolean defaultValue) { if (stringBoolean == null) return defaultValue; else if (stringBoolean.equalsIgnoreCase("true")) @@ -763,8 +723,8 @@ else if (stringBoolean.equalsIgnoreCase("false")) return false; else - throw new IllegalArgumentException(prop + - " must be \"true\" or \"false\" instead of \"" + + throw new IllegalArgumentException( + "Property value must be \"true\" or \"false\" instead of \"" + stringBoolean + "\""); } diff -r f78eb7e08ee1 -r 5ec94d162f05 src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java --- a/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java Fri Aug 31 12:21:12 2012 +0100 +++ b/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java Tue Oct 16 21:36:45 2012 +0100 @@ -146,11 +146,11 @@ */ public RhinoScriptEngine() { if (System.getSecurityManager() != null) { - accCtxt = AccessController.getContext(); - } - - if (System.getSecurityManager() != null) { - accCtxt = AccessController.getContext(); + try { + AccessController.checkPermission(new AllPermission()); + } catch (AccessControlException ace) { + accCtxt = AccessController.getContext(); + } } Context cx = enterContext(); diff -r f78eb7e08ee1 -r 5ec94d162f05 src/share/classes/java/beans/XMLDecoder.java --- a/src/share/classes/java/beans/XMLDecoder.java Fri Aug 31 12:21:12 2012 +0100 +++ b/src/share/classes/java/beans/XMLDecoder.java Tue Oct 16 21:36:45 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -29,6 +29,9 @@ import java.io.Closeable; import java.io.InputStream; import java.io.IOException; +import java.security.AccessControlContext; +import java.security.AccessController; +import java.security.PrivilegedAction; import org.xml.sax.InputSource; import org.xml.sax.helpers.DefaultHandler; @@ -61,6 +64,7 @@ * @author Philip Milne */ public class XMLDecoder implements AutoCloseable { + private final AccessControlContext acc = AccessController.getContext(); private final DocumentHandler handler = new DocumentHandler(); private final InputSource input; private Object owner; @@ -189,7 +193,15 @@ return false; } if (this.array == null) { - this.handler.parse(this.input); + if ((this.acc == null) && (null != System.getSecurityManager())) { + throw new SecurityException("AccessControlContext is not set"); + } + AccessController.doPrivileged(new PrivilegedAction() { + public Void run() { + XMLDecoder.this.handler.parse(XMLDecoder.this.input); + return null; + } + }, this.acc); this.array = this.handler.getObjects(); } return true; diff -r f78eb7e08ee1 -r 5ec94d162f05 src/share/classes/java/io/FilePermission.java --- a/src/share/classes/java/io/FilePermission.java Fri Aug 31 12:21:12 2012 +0100 +++ b/src/share/classes/java/io/FilePermission.java Tue Oct 16 21:36:45 2012 +0100 @@ -418,7 +418,7 @@ */ public int hashCode() { - return this.cpath.hashCode(); + return 0; } /** diff -r f78eb7e08ee1 -r 5ec94d162f05 src/share/classes/java/lang/invoke/MethodHandleImpl.java --- a/src/share/classes/java/lang/invoke/MethodHandleImpl.java Fri Aug 31 12:21:12 2012 +0100 +++ b/src/share/classes/java/lang/invoke/MethodHandleImpl.java Tue Oct 16 21:36:45 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -25,7 +25,6 @@ package java.lang.invoke; -import sun.invoke.util.VerifyType; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; @@ -35,6 +34,7 @@ import java.util.List; import sun.invoke.empty.Empty; import sun.invoke.util.ValueConversions; +import sun.invoke.util.VerifyType; import sun.invoke.util.Wrapper; import sun.misc.Unsafe; import static java.lang.invoke.MethodHandleStatics.*; @@ -1258,4 +1258,169 @@ return THROW_EXCEPTION; } static Empty throwException(T t) throws T { throw t; } + + /** + * Create an alias for the method handle which, when called, + * appears to be called from the same class loader and protection domain + * as hostClass. + * This is an expensive no-op unless the method which is called + * is sensitive to its caller. A small number of system methods + * are in this category, including Class.forName and Method.invoke. + */ + static + MethodHandle bindCaller(MethodHandle mh, Class hostClass) { + return BindCaller.bindCaller(mh, hostClass); + } + + // Put the whole mess into its own nested class. + // That way we can lazily load the code and set up the constants. + private static class BindCaller { + static + MethodHandle bindCaller(MethodHandle mh, Class hostClass) { + // Do not use this function to inject calls into system classes. + if (hostClass == null) { + hostClass = C_Trampoline; + } else if (hostClass.isArray() || + hostClass.isPrimitive() || + hostClass.getName().startsWith("java.") || + hostClass.getName().startsWith("sun.")) { + throw new InternalError(); // does not happen, and should not anyway + } + // For simplicity, convert mh to a varargs-like method. + MethodHandle vamh = prepareForInvoker(mh); + // Cache the result of makeInjectedInvoker once per argument class. + MethodHandle bccInvoker = CV_makeInjectedInvoker.get(hostClass); + return restoreToType(bccInvoker.bindTo(vamh), mh.type()); + } + + // This class ("Trampoline") is known to be inside a dead-end class loader. + // Inject all doubtful calls into this class. + private static Class C_Trampoline; + static { + Class tramp = null; + try { + final int FRAME_COUNT_ARG = 1; // [0] Reflection [1] Trampoline + java.lang.reflect.Method gcc = sun.reflect.Reflection.class.getMethod("getCallerClass", int.class); + tramp = (Class) sun.reflect.misc.MethodUtil.invoke(gcc, null, new Object[]{ FRAME_COUNT_ARG }); + if (tramp.getClassLoader() == BindCaller.class.getClassLoader()) + throw new RuntimeException(tramp.getName()+" class loader"); + } catch (Throwable ex) { + throw new InternalError(ex.toString()); + } + C_Trampoline = tramp; + } + + private static final Unsafe UNSAFE = Unsafe.getUnsafe(); + + private static MethodHandle makeInjectedInvoker(Class hostClass) { + Class bcc = UNSAFE.defineAnonymousClass(hostClass, T_BYTES, null); + if (hostClass.getClassLoader() != bcc.getClassLoader()) + throw new InternalError(hostClass.getName()+" (CL)"); + try { + if (hostClass.getProtectionDomain() != bcc.getProtectionDomain()) + throw new InternalError(hostClass.getName()+" (PD)"); + } catch (SecurityException ex) { + // Self-check was blocked by security manager. This is OK. + // In fact the whole try body could be turned into an assertion. + } + try { + MethodHandle init = IMPL_LOOKUP.findStatic(bcc, "init", MethodType.methodType(void.class)); + init.invokeExact(); // force initialization of the class + } catch (Throwable ex) { + throw uncaughtException(ex); + } + MethodHandle bccInvoker; + try { + MethodType invokerMT = MethodType.methodType(Object.class, MethodHandle.class, Object[].class); + bccInvoker = IMPL_LOOKUP.findStatic(bcc, "invoke_V", invokerMT); + } catch (ReflectiveOperationException ex) { + throw uncaughtException(ex); + } + // Test the invoker, to ensure that it really injects into the right place. + try { + MethodHandle vamh = prepareForInvoker(MH_checkCallerClass); + Object ok = bccInvoker.invokeExact(vamh, new Object[]{hostClass, bcc}); + } catch (Throwable ex) { + throw new InternalError(ex.toString()); + } + return bccInvoker; + } + private static ClassValue CV_makeInjectedInvoker = new ClassValue() { + @Override protected MethodHandle computeValue(Class hostClass) { + return makeInjectedInvoker(hostClass); + } + }; + + // Adapt mh so that it can be called directly from an injected invoker: + private static MethodHandle prepareForInvoker(MethodHandle mh) { + mh = mh.asFixedArity(); + MethodType mt = mh.type(); + int arity = mt.parameterCount(); + MethodHandle vamh = mh.asType(mt.generic()); + vamh = vamh.asSpreader(Object[].class, arity); + return vamh; From omajid at redhat.com Tue Oct 16 13:05:34 2012 From: omajid at redhat.com (Omair Majid) Date: Tue, 16 Oct 2012 16:05:34 -0400 Subject: [icedtea-web][rfc] Update to AppletTakesLastParam reproducer In-Reply-To: <50783FD5.10109@redhat.com> References: <50783FD5.10109@redhat.com> Message-ID: <507DBE0E.1020000@redhat.com> On 10/12/2012 12:05 PM, Adam Domurad wrote: > This is a minor update to AppletTakesLastParam (no bug report associated). > This will cause the reproducer to finish more quickly (as well as having > a bit of code cleanup). The change in sleep() looks fine to me. > + System.out.println("*** APPLET FINISHED ***"); > + > + // To quickly close JNLP applet > + //(NB: System.exit must be in separate thread for applets) > + new Thread() { > + @Override > + public void run() { > + System.exit(0); The comment is not right. Applet's cant call System.exit(), not in the applet thread and not in another thread. If they could, a random applet could take down the entire JVM, killing all other applets in the browser. Please fix the comment before you push. Cheers, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From adomurad at icedtea.classpath.org Tue Oct 16 13:53:19 2012 From: adomurad at icedtea.classpath.org (adomurad at icedtea.classpath.org) Date: Tue, 16 Oct 2012 20:53:19 +0000 Subject: /hg/icedtea-web: Add automatic closing to AppletTakesLastParam b... Message-ID: changeset ede3d73b7e24 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=ede3d73b7e24 author: Adam Domurad date: Tue Oct 16 16:55:52 2012 -0400 Add automatic closing to AppletTakesLastParam browser test diffstat: ChangeLog | 7 + tests/reproducers/simple/AppletTakesLastParam/srcs/AppletTakesLastParam.java | 23 +----- tests/reproducers/simple/AppletTakesLastParam/testcases/AppletTakesLastParamTests.java | 37 +++++---- 3 files changed, 30 insertions(+), 37 deletions(-) diffs (110 lines): diff -r c4dc3da913ab -r ede3d73b7e24 ChangeLog --- a/ChangeLog Mon Oct 15 10:36:56 2012 +0200 +++ b/ChangeLog Tue Oct 16 16:55:52 2012 -0400 @@ -1,3 +1,10 @@ +2012-10-16 Adam Domurad + + * tests/reproducers/simple/AppletTakesLastParam/srcs/AppletTakesLastParam.java: + Add 'standard' applet closing message. + * tests/reproducers/simple/AppletTakesLastParam/testcases/AppletTakesLastParamTests.java: + Clean-up code and add automatic applet closing on finish. + 2012-10-15 Jana Fabrikova * tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java: diff -r c4dc3da913ab -r ede3d73b7e24 tests/reproducers/simple/AppletTakesLastParam/srcs/AppletTakesLastParam.java --- a/tests/reproducers/simple/AppletTakesLastParam/srcs/AppletTakesLastParam.java Mon Oct 15 10:36:56 2012 +0200 +++ b/tests/reproducers/simple/AppletTakesLastParam/srcs/AppletTakesLastParam.java Tue Oct 16 16:55:52 2012 -0400 @@ -38,26 +38,11 @@ exception statement from your version. */ public class AppletTakesLastParam extends Applet { - - private class Killer extends Thread { - - public int n = 2000; - - @Override - public void run() { - try { - Thread.sleep(n); - System.out.println("Applet killing itself after " + n + " ms"); - System.exit(0); - } catch (Exception ex) { - } - } - } - private Killer killer = new Killer(); - - @Override public void init() { System.out.println(getParameter("param")); - killer.start(); + System.out.println("*** APPLET FINISHED ***"); + + // Exits JNLP-launched applets, throws exception on normal applet: + System.exit(0); } } diff -r c4dc3da913ab -r ede3d73b7e24 tests/reproducers/simple/AppletTakesLastParam/testcases/AppletTakesLastParamTests.java --- a/tests/reproducers/simple/AppletTakesLastParam/testcases/AppletTakesLastParamTests.java Mon Oct 15 10:36:56 2012 +0200 +++ b/tests/reproducers/simple/AppletTakesLastParam/testcases/AppletTakesLastParamTests.java Tue Oct 16 16:55:52 2012 -0400 @@ -1,4 +1,4 @@ -/* AppletTestTests.java +/* AppletTakesLastParamTests.java Copyright (C) 2011 Red Hat, Inc. This file is part of IcedTea. @@ -35,8 +35,8 @@ exception statement from your version. */ -import net.sourceforge.jnlp.ServerAccess; -import net.sourceforge.jnlp.ServerAccess.ProcessResult; +import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess.AutoClose; import net.sourceforge.jnlp.browsertesting.BrowserTest; import net.sourceforge.jnlp.browsertesting.Browsers; import net.sourceforge.jnlp.annotations.TestInBrowsers; @@ -45,24 +45,25 @@ import org.junit.Test; public class AppletTakesLastParamTests extends BrowserTest { + private void evaluate(ProcessResult pr) { + String firstParam = "value1"; + String secondParam = "value2"; - @Test - public void AppletTest() throws Exception { - ServerAccess.ProcessResult pr = server.executeJavaws(null, "/appletTakesLastParam.jnlp"); - evaluateApplet(pr); - } - - private void evaluateApplet(ProcessResult pr) { - String s0 = "value1"; - Assert.assertTrue("AppletTakesLastParam stdout should not contain " + s0 + " but did.", !pr.stdout.contains(s0)); - String s1 = "value2"; - Assert.assertTrue("AppletTakesLastParam stdout should contain " + s1 + " but did not.", pr.stdout.contains(s1)); + Assert.assertFalse("AppletTakesLastParam stdout should not contain " + firstParam + " but did.", + pr.stdout.contains(firstParam)); + Assert.assertTrue("AppletTakesLastParam stdout should contain " + secondParam + " but did not.", + pr.stdout.contains(secondParam)); } @Test @TestInBrowsers(testIn = {Browsers.one}) - public void AppletInFirefoxTest() throws Exception { - ServerAccess.ProcessResult pr = server.executeBrowser("/appletTakesLastParam.html"); - evaluateApplet(pr); + public void appletTakesLastParam() throws Exception { + ProcessResult pr = server.executeBrowser("/appletTakesLastParam.html", AutoClose.CLOSE_ON_BOTH); + evaluate(pr); } -} + @Test + public void jnlpTakesLastParam() throws Exception { + ProcessResult pr = server.executeJavaws("/appletTakesLastParam.jnlp"); + evaluate(pr); + } +} \ No newline at end of file From adomurad at icedtea.classpath.org Tue Oct 16 14:16:21 2012 From: adomurad at icedtea.classpath.org (adomurad at icedtea.classpath.org) Date: Tue, 16 Oct 2012 21:16:21 +0000 Subject: /hg/icedtea-web: Add automatic closing to AppletBaseURL tests Message-ID: changeset 6e622e87010e in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=6e622e87010e author: Adam Domurad date: Tue Oct 16 17:18:52 2012 -0400 Add automatic closing to AppletBaseURL tests diffstat: tests/reproducers/simple/AppletBaseURLTest/srcs/AppletBaseURL.java | 23 +-------- tests/reproducers/simple/AppletBaseURLTest/testcases/AppletBaseURLTest.java | 21 ++++---- 2 files changed, 15 insertions(+), 29 deletions(-) diffs (93 lines): diff -r ede3d73b7e24 -r 6e622e87010e tests/reproducers/simple/AppletBaseURLTest/srcs/AppletBaseURL.java --- a/tests/reproducers/simple/AppletBaseURLTest/srcs/AppletBaseURL.java Tue Oct 16 16:55:52 2012 -0400 +++ b/tests/reproducers/simple/AppletBaseURLTest/srcs/AppletBaseURL.java Tue Oct 16 17:18:52 2012 -0400 @@ -37,28 +37,13 @@ import java.applet.Applet; public class AppletBaseURL extends Applet { - - private class Killer extends Thread { - - public int n = 1000; - - @Override - public void run() { - try { - Thread.sleep(n); - System.out.println("Aplet killing himself after " + n + " ms of life"); - System.exit(0); - } catch (Exception ex) { - } - } - } - private Killer killer; - @Override public void init() { System.out.println("Document base is " + getDocumentBase() + " for this applet"); System.out.println("Codebase is " + getCodeBase() + " for this applet"); - killer = new Killer(); - killer.start(); + System.out.println("*** APPLET FINISHED ***"); + + // Exits JNLP-launched applets, throws exception on normal applet: + System.exit(0); } } diff -r ede3d73b7e24 -r 6e622e87010e tests/reproducers/simple/AppletBaseURLTest/testcases/AppletBaseURLTest.java --- a/tests/reproducers/simple/AppletBaseURLTest/testcases/AppletBaseURLTest.java Tue Oct 16 16:55:52 2012 -0400 +++ b/tests/reproducers/simple/AppletBaseURLTest/testcases/AppletBaseURLTest.java Tue Oct 16 17:18:52 2012 -0400 @@ -35,7 +35,8 @@ exception statement from your version. */ -import net.sourceforge.jnlp.ServerAccess.ProcessResult; +import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess.AutoClose; import net.sourceforge.jnlp.annotations.Bug; import net.sourceforge.jnlp.annotations.NeedsDisplay; import net.sourceforge.jnlp.annotations.TestInBrowsers; @@ -48,18 +49,18 @@ public class AppletBaseURLTest extends BrowserTest{ private void evaluateApplet(ProcessResult pr, String baseName) { - String s8 = "(?s).*Codebase is http://localhost:[0-9]{5}/ for this applet(?s).*"; - Assert.assertTrue("AppletBaseURL stdout should match" + s8 + " but didn't", pr.stdout.matches(s8)); - String s9 = "(?s).*Document base is http://localhost:[0-9]{5}/" + baseName + " for this applet(?s).*"; - Assert.assertTrue("AppletBaseURL stdout should match" + s9 + " but didn't", pr.stdout.matches(s9)); - String ss = "xception"; - Assert.assertFalse("AppletBaseURL stderr should not contain" + ss + " but did", pr.stderr.contains(ss)); + String codebaseRule = "(?s).*Codebase is http://localhost:[0-9]{5}/ for this applet(?s).*"; + Assert.assertTrue("AppletBaseURL stdout should match" + codebaseRule + " but didn't", + pr.stdout.matches(codebaseRule)); + String documentbaseRule = "(?s).*Document base is http://localhost:[0-9]{5}/" + baseName + " for this applet(?s).*"; + Assert.assertTrue("AppletBaseURL stdout should match" + documentbaseRule + " but didn't", + pr.stdout.matches(documentbaseRule)); } @NeedsDisplay @Test public void AppletWebstartBaseURLTest() throws Exception { - ProcessResult pr = server.executeJavaws(null, "/AppletBaseURLTest.jnlp"); + ProcessResult pr = server.executeJavaws("/AppletBaseURLTest.jnlp"); evaluateApplet(pr, ""); Assert.assertFalse(pr.wasTerminated); Assert.assertEquals((Integer) 0, pr.returnValue); @@ -70,7 +71,7 @@ @Test @TestInBrowsers(testIn={Browsers.one}) public void AppletInFirefoxTest() throws Exception { - ProcessResult pr = server.executeBrowser("/AppletBaseURLTest.html"); + ProcessResult pr = server.executeBrowser("/AppletBaseURLTest.html", AutoClose.CLOSE_ON_BOTH); pr.process.destroy(); evaluateApplet(pr, "AppletBaseURLTest.html"); Assert.assertTrue(pr.wasTerminated); @@ -81,7 +82,7 @@ @Test @TestInBrowsers(testIn={Browsers.one}) public void AppletWithJNLPHrefTest() throws Exception { - ProcessResult pr = server.executeBrowser("/AppletJNLPHrefBaseURLTest.html"); + ProcessResult pr = server.executeBrowser("/AppletJNLPHrefBaseURLTest.html", AutoClose.CLOSE_ON_BOTH); pr.process.destroy(); evaluateApplet(pr, "AppletJNLPHrefBaseURLTest.html"); Assert.assertTrue(pr.wasTerminated); From amiko212 at 126.com Tue Oct 16 17:57:49 2012 From: amiko212 at 126.com (liu chao jun) Date: Wed, 17 Oct 2012 08:57:49 +0800 (CST) Subject: /hg/release/icedtea6-1.11: 7 new changesets In-Reply-To: References: Message-ID: <7037df69.20e15f.13a6c39f738.Coremail.amiko212@126.com> Hi alll , During the following email contents ,I found there is some patches relation with security, And i also have some issues about it for icedtea6-1.11.1 and others about LLVM-3.0. 1 .Is icedtea6-1.11.1 is include the security feature ? 2 . If it include security feature is there any patches for it ? 3 . Is any body run icedtea6-1.11.1 with -Xcomp Parameter (Only compile mode) according to LLVM-30 ? Or LLVM-30 support it or not ? Thank you very much and looking forward to your reply BR//Amiko At 2012-10-17 04:35:51,andrew at icedtea.classpath.org wrote: >changeset d9564350faa6 in /hg/release/icedtea6-1.11 >details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=d9564350faa6 >author: Andrew John Hughes >date: Thu Oct 11 21:32:13 2012 +0100 > > Add 2012/10/16 security patches. > > 2012-10-11 Andrew John Hughes > > * Makefile.am: > (SECURITY_PATCHES): Add new patches. > * patches/ecj/override.patch: > Add new cases in P11Key and RMIConnectionImpl > introduced by security patches. > * patches/security/20121016/6631398.patch, > * patches/security/20121016/7093490.patch, > * patches/security/20121016/7143535.patch, > * patches/security/20121016/7158800.patch, > * patches/security/20121016/7158801.patch, > * patches/security/20121016/7158804.patch, > * patches/security/20121016/7167656.patch, > * patches/security/20121016/7169884.patch, > * patches/security/20121016/7169888.patch, > * patches/security/20121016/7172522.patch, > * patches/security/20121016/7176337.patch, > * patches/security/20121016/7186286.patch, > * patches/security/20121016/7189103.patch, > * patches/security/20121016/7189490.patch, > * patches/security/20121016/7189567.patch, > * patches/security/20121016/7192975.patch, > * patches/security/20121016/7195194.patch, > * patches/security/20121016/7195917.patch, > * patches/security/20121016/7195919.patch, > * patches/security/20121016/7198296.patch, > * patches/security/20121016/7198606.patch: > New patches. > > >changeset f975a9b1d5b5 in /hg/release/icedtea6-1.11 >details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=f975a9b1d5b5 >author: Andrew John Hughes >date: Thu Oct 11 21:48:44 2012 +0100 > > Update NEWS with security fixes. > > 2012-10-11 Andrew John Hughes > > * NEWS: Update with security fixes. > > >changeset 904945674c52 in /hg/release/icedtea6-1.11 >details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=904945674c52 >author: Andrew John Hughes >date: Fri Oct 12 03:10:34 2012 +0100 > > Merge > > >changeset 12172d5875a5 in /hg/release/icedtea6-1.11 >details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=12172d5875a5 >author: Andrew John Hughes >date: Fri Oct 12 20:41:03 2012 +0100 > > Prepare for 1.11.5 > > 2012-10-12 Andrew John Hughes > > * NEWS: Set release date for 1.11.5. > * configure.ac: Bump to 1.11.5. > > >changeset 527b1ef07071 in /hg/release/icedtea6-1.11 >details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=527b1ef07071 >author: Andrew John Hughes >date: Mon Oct 15 18:59:53 2012 +0100 > > S7175845: "jar uf" changes file permissions unexpectedly > S7177216: native2ascii changes file permissions of input file > > 2012-10-15 Andrew John Hughes > > * Makefile.am: > (ICEDTEA_PATCHES): Add new patches. > * NEWS: > Mention S7175845 and S7177216. > * patches/openjdk/7175845-jar_uf_changes_file_permissions.patch, > * patches/openjdk/7177216-native2ascii_changes_file_permissions.patch: > New backports to fix regressions caused by > S7143606. > > >changeset f63ce4390499 in /hg/release/icedtea6-1.11 >details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=f63ce4390499 >author: Andrew John Hughes >date: Tue Oct 16 16:13:14 2012 +0100 > > S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo > > 2012-10-15 Andrew John Hughes > > * Makefile.am: > (ICEDTEA_PATCHES): Add new patch. > * NEWS: Mention S7199153. > * patches/openjdk/7199153-try_with_resources_pushed_to_6.patch: > Added to fix tests from previous commit. > > >changeset 2e4b16eaaf3f in /hg/release/icedtea6-1.11 >details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=2e4b16eaaf3f >author: Andrew John Hughes >date: Tue Oct 16 21:23:51 2012 +0100 > > Added tag icedtea6-1.11.5 for changeset f63ce4390499 > > >diffstat: > > .hgtags | 1 + > ChangeLog | 68 + > Makefile.am | 28 +- > NEWS | 30 +- > acinclude.m4 | 4 +- > configure.ac | 2 +- > patches/ecj/override.patch | 22 + > patches/openjdk/7175845-jar_uf_changes_file_permissions.patch | 113 + > patches/openjdk/7177216-native2ascii_changes_file_permissions.patch | 110 + > patches/openjdk/7199153-try_with_resources_pushed_to_6.patch | 194 + > patches/security/20121016/6631398.patch | 20 + > patches/security/20121016/7093490.patch | 28 + > patches/security/20121016/7143535.patch | 31 + > patches/security/20121016/7158800.patch | 1413 ++++++++++ > patches/security/20121016/7158801.patch | 30 + > patches/security/20121016/7158804.patch | 28 + > patches/security/20121016/7167656.patch | 75 + > patches/security/20121016/7169884.patch | 349 ++ > patches/security/20121016/7169888.patch | 125 + > patches/security/20121016/7172522.patch | 36 + > patches/security/20121016/7176337.patch | 29 + > patches/security/20121016/7186286.patch | 552 +++ > patches/security/20121016/7189103.patch | 39 + > patches/security/20121016/7189490.patch | 55 + > patches/security/20121016/7189567.patch | 95 + > patches/security/20121016/7192975.patch | 35 + > patches/security/20121016/7195194.patch | 29 + > patches/security/20121016/7195917.patch | 88 + > patches/security/20121016/7195919.patch | 63 + > patches/security/20121016/7198296.patch | 114 + > patches/security/20121016/7198606.patch | 28 + > 31 files changed, 3828 insertions(+), 6 deletions(-) > >diffs (truncated from 3996 to 500 lines): > >diff -r 7f603a40c817 -r 2e4b16eaaf3f .hgtags >--- a/.hgtags Wed Sep 05 11:43:29 2012 +0200 >+++ b/.hgtags Tue Oct 16 21:23:51 2012 +0100 >@@ -27,3 +27,4 @@ > ca61b2ffa966cac5c5d9ea217b7aec4a0da83ab8 icedtea6-1.11.2 > a9b49bd3d0b5c54eb368b5f9f9b96b8d1aef843d icedtea6-1.11.3 > a773e4481576804dfdf51501727bd5461f88b801 icedtea6-1.11.4 >+f63ce43904998e7e9ac04558ada787bb73044ef6 icedtea6-1.11.5 >diff -r 7f603a40c817 -r 2e4b16eaaf3f ChangeLog >--- a/ChangeLog Wed Sep 05 11:43:29 2012 +0200 >+++ b/ChangeLog Tue Oct 16 21:23:51 2012 +0100 >@@ -1,3 +1,71 @@ >+2012-10-15 Andrew John Hughes >+ >+ * Makefile.am: >+ (ICEDTEA_PATCHES): Add new patch. >+ * NEWS: Mention S7199153. >+ * patches/openjdk/7199153-try_with_resources_pushed_to_6.patch: >+ Added to fix tests from previous commit. >+ >+2012-10-15 Andrew John Hughes >+ >+ * Makefile.am: >+ (ICEDTEA_PATCHES): Add new patches. >+ * NEWS: >+ Mention S7175845 and S7177216. >+ * patches/openjdk/7175845-jar_uf_changes_file_permissions.patch, >+ * patches/openjdk/7177216-native2ascii_changes_file_permissions.patch: >+ New backports to fix regressions caused by >+ S7143606. >+ >+2012-10-12 Andrew John Hughes >+ >+ * NEWS: Set release date for 1.11.5. >+ * configure.ac: Bump to 1.11.5. >+ >+2012-10-11 Andrew John Hughes >+ >+ * NEWS: Update with security fixes. >+ >+2012-10-11 Andrew John Hughes >+ >+ * Makefile.am: >+ (SECURITY_PATCHES): Add new patches. >+ * patches/ecj/override.patch: >+ Add new cases in P11Key and RMIConnectionImpl >+ introduced by security patches. >+ * patches/security/20121016/6631398.patch, >+ * patches/security/20121016/7093490.patch, >+ * patches/security/20121016/7143535.patch, >+ * patches/security/20121016/7158800.patch, >+ * patches/security/20121016/7158801.patch, >+ * patches/security/20121016/7158804.patch, >+ * patches/security/20121016/7167656.patch, >+ * patches/security/20121016/7169884.patch, >+ * patches/security/20121016/7169888.patch, >+ * patches/security/20121016/7172522.patch, >+ * patches/security/20121016/7176337.patch, >+ * patches/security/20121016/7186286.patch, >+ * patches/security/20121016/7189103.patch, >+ * patches/security/20121016/7189490.patch, >+ * patches/security/20121016/7189567.patch, >+ * patches/security/20121016/7192975.patch, >+ * patches/security/20121016/7195194.patch, >+ * patches/security/20121016/7195917.patch, >+ * patches/security/20121016/7195919.patch, >+ * patches/security/20121016/7198296.patch, >+ * patches/security/20121016/7198606.patch: >+ New patches. >+ >+2012-03-19 Andrew John Hughes >+ >+ PR 1194: >+ * acinclude.m4: >+ (IT_CHECK_FOR_JDK): Update JDK home directory >+ check list, adding some missing 1.6 entries >+ and removing generic ones which may now pick >+ up an unwanted 1.7 installation. >+ * NEWS: Updated. >+ > 2012-09-05 Matthias Klose > > * configure.ac: Remove the Xp header and library checks. >diff -r 7f603a40c817 -r 2e4b16eaaf3f Makefile.am >--- a/Makefile.am Wed Sep 05 11:43:29 2012 +0200 >+++ b/Makefile.am Tue Oct 16 21:23:51 2012 +0100 >@@ -224,7 +224,28 @@ > patches/security/20120612/7160757.patch \ > patches/security/20120830/7162476-xmldecoder_via_classfinder.patch \ > patches/security/20120830/7163201-simplify_toolkit_internal_references.patch \ >- patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch >+ patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch \ >+ patches/security/20121016/6631398.patch \ >+ patches/security/20121016/7093490.patch \ >+ patches/security/20121016/7143535.patch \ >+ patches/security/20121016/7158800.patch \ >+ patches/security/20121016/7158801.patch \ >+ patches/security/20121016/7158804.patch \ >+ patches/security/20121016/7167656.patch \ >+ patches/security/20121016/7169884.patch \ >+ patches/security/20121016/7169888.patch \ >+ patches/security/20121016/7172522.patch \ >+ patches/security/20121016/7176337.patch \ >+ patches/security/20121016/7186286.patch \ >+ patches/security/20121016/7189103.patch \ >+ patches/security/20121016/7189490.patch \ >+ patches/security/20121016/7189567.patch \ >+ patches/security/20121016/7192975.patch \ >+ patches/security/20121016/7195194.patch \ >+ patches/security/20121016/7195917.patch \ >+ patches/security/20121016/7195919.patch \ >+ patches/security/20121016/7198296.patch \ >+ patches/security/20121016/7198606.patch > > SPECIAL_SECURITY_PATCH = patches/security/20120214/7112642.patch > >@@ -435,7 +456,10 @@ > patches/openjdk/6792400-Avoid_loading_Normalizer_resources.patch \ > patches/coverage-table.patch \ > patches/openjdk/7185678-xmenuitem_peer_npe.patch \ >- patches/merge_fix.patch >+ patches/merge_fix.patch \ >+ patches/openjdk/7175845-jar_uf_changes_file_permissions.patch \ >+ patches/openjdk/7177216-native2ascii_changes_file_permissions.patch \ >+ patches/openjdk/7199153-try_with_resources_pushed_to_6.patch > > if WITH_RHINO > ICEDTEA_PATCHES += \ >diff -r 7f603a40c817 -r 2e4b16eaaf3f NEWS >--- a/NEWS Wed Sep 05 11:43:29 2012 +0200 >+++ b/NEWS Tue Oct 16 21:23:51 2012 +0100 >@@ -10,7 +10,35 @@ > > CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY > >-New in release 1.11.5 (2012-XX-XX): >+New in release 1.11.5 (2012-10-16): >+ >+* Security fixes >+ - S6631398, CVE-2012-3216: FilePermission improved path checking >+ - S7093490: adjust package access in rmiregistry >+ - S7143535, CVE-2012-5068: ScriptEngine corrected permissions >+ - S7167656, CVE-2012-5077: Multiple Seeders are being created >+ - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types >+ - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector >+ - S7172522, CVE-2012-5072: Improve DomainCombiner checking >+ - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC >+ - S7189103, CVE-2012-5069: Executors needs to maintain state >+ - S7189490: More improvements to DomainCombiner checking >+ - S7189567, CVE-2012-5085: java net obselete protocol >+ - S7192975, CVE-2012-5071: Conditional usage check is wrong >+ - S7195194, CVE-2012-5084: Better data validation for Swing >+ - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved >+ - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance >+ - S7198296, CVE-2012-5089: Refactor classloader usage >+ - S7158800: Improve storage of symbol tables >+ - S7158801: Improve VM CompileOnly option >+ - S7158804: Improve config file parsing >+ - S7176337: Additional changes needed for 7158801 fix >+ - S7198606, CVE-2012-4416: Improve VM optimization >+* Bug fixes >+ - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default >+ - S7175845: "jar uf" changes file permissions unexpectedly >+ - S7177216: native2ascii changes file permissions of input file >+ - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo > > New in release 1.11.4 (2012-08-31): > >diff -r 7f603a40c817 -r 2e4b16eaaf3f acinclude.m4 >--- a/acinclude.m4 Wed Sep 05 11:43:29 2012 +0200 >+++ b/acinclude.m4 Tue Oct 16 21:23:51 2012 +0100 >@@ -1147,9 +1147,9 @@ > if test "x${enable_bootstrap}" = "xyes"; then > BOOTSTRAP_VMS="/usr/lib/jvm/java-gcj /usr/lib/jvm/gcj-jdk /usr/lib/jvm/cacao"; > fi >- for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-openjdk \ >+ for dir in ${BOOTSTRAP_VMS} /usr/lib/jvm/java-1.6.0 \ > /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \ >- /usr/lib/jvm/openjdk /usr/lib/jvm/java-icedtea ; do >+ /usr/lib/jvm/java-1.6.0-openjdk /usr/lib/jvm/icedtea-6 ; do > if test -d $dir; then > SYSTEM_JDK_DIR=$dir > break >diff -r 7f603a40c817 -r 2e4b16eaaf3f configure.ac >--- a/configure.ac Wed Sep 05 11:43:29 2012 +0200 >+++ b/configure.ac Tue Oct 16 21:23:51 2012 +0100 >@@ -1,4 +1,4 @@ >-AC_INIT([icedtea6],[1.11.5pre],[distro-pkg-dev at openjdk.java.net]) >+AC_INIT([icedtea6],[1.11.5],[distro-pkg-dev at openjdk.java.net]) > AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) > AC_CONFIG_FILES([Makefile]) > >diff -r 7f603a40c817 -r 2e4b16eaaf3f patches/ecj/override.patch >--- a/patches/ecj/override.patch Wed Sep 05 11:43:29 2012 +0200 >+++ b/patches/ecj/override.patch Tue Oct 16 21:23:51 2012 +0100 >@@ -229,3 +229,25 @@ > public int compareTo(X509IssuerSerial another) { > int cissuer = issuer.toString() > .compareTo(another.issuer.toString()); >+diff -Nru openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java >+--- openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:58:37.130814619 +0100 >++++ openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:59:39.699829277 +0100 >+@@ -168,7 +168,6 @@ >+ this.defaultContextClassLoader = >+ AccessController.doPrivileged( >+ new PrivilegedAction() { >+- @Override >+ public ClassLoader run() { >+ return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), >+ dcl); >+diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java >+--- openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:18:07.340676704 +0100 >++++ openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:17:40.092039288 +0100 >+@@ -216,7 +216,6 @@ >+ /** >+ * Return bit length of the key. >+ */ >+- @Override >+ public int length() { >+ return keyLength; >+ } >diff -r 7f603a40c817 -r 2e4b16eaaf3f patches/openjdk/7175845-jar_uf_changes_file_permissions.patch >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/patches/openjdk/7175845-jar_uf_changes_file_permissions.patch Tue Oct 16 21:23:51 2012 +0100 >@@ -0,0 +1,113 @@ >+# HG changeset patch >+# User mbankal >+# Date 1342460916 25200 >+# Node ID 2366192c7fcb928a2adec2bdf08138688dac0423 >+# Parent 0e34d43263864db83322f337262fbb2be3be5d17 >+7175845: "jar uf" changes file permissions unexpectedly >+Reviewed-by: ohair >+Contributed-by: mala.bankal at oracle.com >+ >+diff --git a/src/share/classes/sun/tools/jar/Main.java b/src/share/classes/sun/tools/jar/Main.java >+--- openjdk/jdk/src/share/classes/sun/tools/jar/Main.java >++++ openjdk/jdk/src/share/classes/sun/tools/jar/Main.java >+@@ -134,7 +134,7 @@ >+ File dir = file.getParentFile(); >+ if (dir == null) >+ dir = new File("."); >+- return sun.misc.IOUtils.createTempFile("jartmp", null, dir); >++ return File.createTempFile("jartmp", null, dir); >+ } >+ >+ private boolean ok; >+diff --git a/test/tools/jar/UpdateJar.java b/test/tools/jar/UpdateJar.java >+new file mode 100644 >+--- /dev/null >++++ openjdk/jdk/test/tools/jar/UpdateJar.java >+@@ -0,0 +1,87 @@ >++/* >++ * Copyright (c) 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 >++ * under the terms of the GNU General Public License version 2 only, as >++ * published by the Free Software Foundation. >++ * >++ * This code is distributed in the hope that it will be useful, but WITHOUT >++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or >++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License >++ * version 2 for more details (a copy is included in the LICENSE file that >++ * accompanied this code). >++ * >++ * You should have received a copy of the GNU General Public License version >++ * 2 along with this work; if not, write to the Free Software Foundation, >++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. >++ * >++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA >++ * or visit www.oracle.com if you need additional information or have any >++ * questions. >++ */ >++ >++/** >++ * @test >++ * @bug 7175845 >++ * @summary jar -uf should not change file permission >++ */ >++ >++import java.io.*; >++import java.nio.file.*; >++import java.nio.file.attribute.*; >++import java.util.Set; >++import sun.tools.jar.Main; >++ >++public class UpdateJar { >++ >++ private static void cleanup(String... fnames) throws Throwable { >++ for (String fname : fnames) { >++ Files.deleteIfExists(Paths.get(fname)); >++ } >++ } >++ >++ public static void realMain(String[] args) throws Throwable { >++ if (!System.getProperty("os.name").startsWith("Windows")) { >++ String jar = "testUpdateJar.jar"; >++ String e0 = "testUpdateJar_entry0.txt"; >++ String e1 = "testUpdateJar_entry1.txt"; >++ cleanup(jar, e0, e1); >++ try { >++ try (FileOutputStream fos0 = new FileOutputStream(e0); >++ FileOutputStream fos1 = new FileOutputStream(e1)) { >++ fos0.write(0); >++ fos1.write(0); >++ } >++ String[] jarArgs = new String[] {"cfM0", jar, e0}; >++ if (!new Main(System.out, System.err, "jar").run(jarArgs)) { >++ fail("Could not create jar file."); >++ } >++ Set pm = Files.getPosixFilePermissions(Paths.get(jar)); >++ jarArgs = new String[] {"uf", jar, e1}; >++ if (!new Main(System.out, System.err, "jar").run(jarArgs)) { >++ fail("Could not create jar file."); >++ } >++ equal(pm, Files.getPosixFilePermissions(Paths.get(jar))); >++ } finally { >++ cleanup(jar, e0, e1); >++ } >++ } >++ } >++ >++ //--------------------- Infrastructure --------------------------- >++ static volatile int passed = 0, failed = 0; >++ static void pass() {passed++;} >++ static void fail() {failed++; Thread.dumpStack();} >++ static void fail(String msg) {System.out.println(msg); fail();} >++ static void unexpected(Throwable t) {failed++; t.printStackTrace();} >++ static void check(boolean cond) {if (cond) pass(); else fail();} >++ static void equal(Object x, Object y) { >++ if (x == null ? y == null : x.equals(y)) pass(); >++ else fail(x + " not equal to " + y);} >++ public static void main(String[] args) throws Throwable { >++ try {realMain(args);} catch (Throwable t) {unexpected(t);} >++ System.out.println("\nPassed = " + passed + " failed = " + failed); >++ if (failed > 0) throw new AssertionError("Some tests failed");} >++} >++ >diff -r 7f603a40c817 -r 2e4b16eaaf3f patches/openjdk/7177216-native2ascii_changes_file_permissions.patch >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/patches/openjdk/7177216-native2ascii_changes_file_permissions.patch Tue Oct 16 21:23:51 2012 +0100 >@@ -0,0 +1,110 @@ >+# HG changeset patch >+# User mbankal >+# Date 1342030130 25200 >+# Node ID 0e34d43263864db83322f337262fbb2be3be5d17 >+# Parent 99b43838c5d0a55a92bccbb62e6df5ee685978b6 >+7177216: native2ascii changes file permissions of input file >+Reviewed-by: ohair >+ >+diff --git a/src/share/classes/sun/tools/native2ascii/Main.java b/src/share/classes/sun/tools/native2ascii/Main.java >+--- openjdk/jdk/src/share/classes/sun/tools/native2ascii/Main.java >++++ openjdk/jdk/src/share/classes/sun/tools/native2ascii/Main.java >+@@ -237,7 +237,7 @@ >+ if (tempDir == null) >+ tempDir = new File(System.getProperty("user.dir")); >+ >+- tempFile = sun.misc.IOUtils.createTempFile("_N2A", ".TMP", tempDir); >++ tempFile = File.createTempFile("_N2A", ".TMP", tempDir); >+ tempFile.deleteOnExit(); >+ >+ try { >+diff --git a/test/sun/tools/native2ascii/Permission.java b/test/sun/tools/native2ascii/Permission.java >+new file mode 100644 >+--- /dev/null >++++ openjdk/jdk/test/sun/tools/native2ascii/Permission.java >+@@ -0,0 +1,85 @@ >++/* >++ * Copyright (c) 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 >++ * under the terms of the GNU General Public License version 2 only, as >++ * published by the Free Software Foundation. >++ * >++ * This code is distributed in the hope that it will be useful, but WITHOUT >++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or >++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License >++ * version 2 for more details (a copy is included in the LICENSE file that >++ * accompanied this code). >++ * >++ * You should have received a copy of the GNU General Public License version >++ * 2 along with this work; if not, write to the Free Software Foundation, >++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. >++ * >++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA >++ * or visit www.oracle.com if you need additional information or have any >++ * questions. >++ */ >++ >++/** >++ * @test >++ * @bug 7177216 >++ * @summary resulting file of native2ascii should have normal permission >++ */ >++ >++import java.io.*; >++import java.nio.file.*; >++import java.nio.file.attribute.*; >++import sun.tools.native2ascii.Main; >++ >++public class Permission { >++ >++ private static void cleanup(String... fnames) throws Throwable { >++ for (String fname : fnames) { >++ Files.deleteIfExists(Paths.get(fname)); >++ } >++ } >++ >++ public static void realMain(String[] args) throws Throwable { >++ if (!System.getProperty("os.name").startsWith("Windows")) { >++ String src = "native2ascii_permtest_src"; >++ String dst = "native2ascii_permtest_dst"; >++ >++ cleanup(src, dst); >++ try { >++ try (FileOutputStream fos = new FileOutputStream(src)) { >++ fos.write('a'); fos.write('b'); fos.write('c'); >++ } >++ String[] n2aArgs = new String[] {"-encoding", "utf8", src, dst}; >++ if (!new Main().convert(n2aArgs)) { >++ fail("n2a failed."); >++ } >++ equal(Files.getPosixFilePermissions(Paths.get(src)), >++ Files.getPosixFilePermissions(Paths.get(dst))); >++ String[] a2nArgs = new String[] {"-reverse", "-encoding", "utf8", dst, src}; >++ if (!new Main().convert(a2nArgs)) { >++ fail("a2n failed."); >++ } >++ equal(Files.getPosixFilePermissions(Paths.get(src)), >++ Files.getPosixFilePermissions(Paths.get(dst))); >++ } finally { >++ cleanup(src, dst); >++ } >++ } >++ } >++ >++ //--------------------- Infrastructure --------------------------- >++ static volatile int passed = 0, failed = 0; >++ static void pass() {passed++;} >++ static void fail() {failed++; Thread.dumpStack();} >++ static void fail(String msg) {System.out.println(msg); fail();} >++ static void unexpected(Throwable t) {failed++; t.printStackTrace();} >++ static void check(boolean cond) {if (cond) pass(); else fail();} >++ static void equal(Object x, Object y) { >++ if (x == null ? y == null : x.equals(y)) pass(); >++ else fail(x + " not equal to " + y);} >++ public static void main(String[] args) throws Throwable { >++ try {realMain(args);} catch (Throwable t) {unexpected(t);} >++ System.out.println("\nPassed = " + passed + " failed = " + failed); >++ if (failed > 0) throw new AssertionError("Some tests failed");} >++} >diff -r 7f603a40c817 -r 2e4b16eaaf3f patches/openjdk/7199153-try_with_resources_pushed_to_6.patch >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/patches/openjdk/7199153-try_with_resources_pushed_to_6.patch Tue Oct 16 21:23:51 2012 +0100 >@@ -0,0 +1,194 @@ >+# HG changeset patch >+# User coffeys >+# Date 1348007758 -3600 >+# Node ID 0abac47de6d12023982e35effe00ea028d613b5e >+# Parent 5998d43cb08ce2477ad9ba7970a26ef5be1f175c >+7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo >+Reviewed-by: ohair >+ >+diff --git a/test/sun/tools/native2ascii/Permission.java b/test/sun/tools/native2ascii/Permission.java >+--- openjdk/jdk/test/sun/tools/native2ascii/Permission.java >++++ openjdk/jdk/test/sun/tools/native2ascii/Permission.java >+@@ -21,25 +21,43 @@ >+ * questions. >+ */ >+ >+-/** >++/* >+ * @test >+- * @bug 7177216 >++ * @bug 7177216 7199153 >+ * @summary resulting file of native2ascii should have normal permission >+ */ >+ >+ import java.io.*; >+-import java.nio.file.*; >+-import java.nio.file.attribute.*; >+ import sun.tools.native2ascii.Main; >+ >+ public class Permission { >+ >+ private static void cleanup(String... fnames) throws Throwable { >+ for (String fname : fnames) { >+- Files.deleteIfExists(Paths.get(fname)); >++ File f = new File(fname); >++ if (f.exists()) >++ f.delete(); >+ } >+ } >+ >++ private static String permission(String fname) throws Throwable { >++ Process p = Runtime.getRuntime().exec("ls -l " + fname); >++ InputStream is = null; >++ String ret = null; >++ if (p != null && (is = p.getInputStream()) != null) { -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121017/9da7dabb/attachment.html From gnu.andrew at redhat.com Tue Oct 16 20:08:02 2012 From: gnu.andrew at redhat.com (Andrew John Hughes) Date: Wed, 17 Oct 2012 04:08:02 +0100 Subject: [SECURITY] IcedTea 1.10.10 & 1.11.5 for OpenJDK6 Released! Message-ID: <20121017030802.GA29964@rivendell.middle-earth.co.uk> The IcedTea project provides a harness to build the source code from OpenJDK6 using Free Software build tools, along with additional features such as a PulseAudio sound driver and support for alternative virtual machines. A new set of security releases is now available: * IcedTea6 1.10.10 * IcedTea6 1.11.5 We recommend that users upgrade to the latest release from the appropriate branch as soon as possible. All updates contain the following security fixes: * S6631398, CVE-2012-3216: FilePermission improved path checking * S7093490: adjust package access in rmiregistry * S7143535, CVE-2012-5068: ScriptEngine corrected permissions * S7167656, CVE-2012-5077: Multiple Seeders are being created * S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types * S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector * S7172522, CVE-2012-5072: Improve DomainCombiner checking * S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC * S7189103, CVE-2012-5069: Executors needs to maintain state * S7189490: More improvements to DomainCombiner checking * S7189567, CVE-2012-5085: java net obselete protocol * S7192975, CVE-2012-5071: Conditional usage check is wrong * S7195194, CVE-2012-5084: Better data validation for Swing * S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved * S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance * S7198296, CVE-2012-5089: Refactor classloader usage * S7158800: Improve storage of symbol tables * S7158801: Improve VM CompileOnly option * S7158804: Improve config file parsing * S7176337: Additional changes needed for 7158801 fix * S7198606, CVE-2012-4416: Improve VM optimization Full details of each release can be found below. What?s New? ?????? New in release 1.10.10 (2012-10-16): * Security fixes - S6631398, CVE-2012-3216: FilePermission improved path checking - S7093490: adjust package access in rmiregistry - S7143535, CVE-2012-5068: ScriptEngine corrected permissions - S7167656, CVE-2012-5077: Multiple Seeders are being created - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector - S7172522, CVE-2012-5072: Improve DomainCombiner checking - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC - S7189103, CVE-2012-5069: Executors needs to maintain state - S7189490: More improvements to DomainCombiner checking - S7189567, CVE-2012-5085: java net obselete protocol - S7192975, CVE-2012-5071: Conditional usage check is wrong - S7195194, CVE-2012-5084: Better data validation for Swing - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance - S7198296, CVE-2012-5089: Refactor classloader usage - S7158800: Improve storage of symbol tables - S7158801: Improve VM CompileOnly option - S7158804: Improve config file parsing - S7176337: Additional changes needed for 7158801 fix - S7198606, CVE-2012-4416: Improve VM optimization * Backports - S7092186: adjust package access in rmiregistry - S7175845: "jar uf" changes file permissions unexpectedly - S7177216: native2ascii changes file permissions of input file - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo * Bug fixes - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default New in release 1.11.5 (2012-10-16): * Security fixes - S6631398, CVE-2012-3216: FilePermission improved path checking - S7093490: adjust package access in rmiregistry - S7143535, CVE-2012-5068: ScriptEngine corrected permissions - S7167656, CVE-2012-5077: Multiple Seeders are being created - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector - S7172522, CVE-2012-5072: Improve DomainCombiner checking - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC - S7189103, CVE-2012-5069: Executors needs to maintain state - S7189490: More improvements to DomainCombiner checking - S7189567, CVE-2012-5085: java net obselete protocol - S7192975, CVE-2012-5071: Conditional usage check is wrong - S7195194, CVE-2012-5084: Better data validation for Swing - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance - S7198296, CVE-2012-5089: Refactor classloader usage - S7158800: Improve storage of symbol tables - S7158801: Improve VM CompileOnly option - S7158804: Improve config file parsing - S7176337: Additional changes needed for 7158801 fix - S7198606, CVE-2012-4416: Improve VM optimization * Backports - S7175845: "jar uf" changes file permissions unexpectedly - S7177216: native2ascii changes file permissions of input file - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo * Bug fixes - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default The tarballs can be downloaded from: * http://icedtea.classpath.org/download/source/icedtea6-1.10.10.tar.gz * http://icedtea.classpath.org/download/source/icedtea6-1.11.5.tar.gz SHA256 checksums: 644804a85b5b446d7840e3d11adf45782d73fcd880a2df5403c53c96cc288c3e icedtea6-1.10.10.tar.gz 258d81d957f8ab9322fbaf7c90647f27f6b4e675504fa279858e6dfe513f7574 icedtea6-1.11.5.tar.gz Each tarball is accompanied by a digital signature (available at the above URL + '.sig'). This is produced using my public key. See details below. The following people helped with these releases: * Elliott Baron (creation of reproducers for S7163198/S7169887 & S7186286, checking S7189103 & S7189567) * Deepak Bhole (creation of reproducer for S7093490) * Andrew John Hughes (applying all security patches, backports & bug fixes, reproducer runs, release management) * Omair Majid (creation of reproducers for S7167656, S7172522, S7195549 & S7195917) * Chris Phillips (checking S7143535, S7169884 & S7198606 reproducers) * Roman Kennke (creation of reproducers for S7158796, S7192975 & S7198296) * Pavel Tisnovsky (additional reproducer runs) * Mario Torre (creation of reproducers for S6631398, S7195919 & S7196190, checking S7195194 reproducer) * Jon VanAlten (creation of reproducer for S7158801, checking S7158800, S7158804 & S7158807) We would also like to thank the bug reporters and testers! To get started: $ tar xzf icedtea6-${ver}.tar.gz Full build requirements and instructions are in INSTALL: $ mkdir icedtea6-build $ cd icedtea6-build $ ../icedtea6-${ver}/configure [--enable-zero --enable-pulse-java --enable-systemtap ...] $ make -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121017/13575903/attachment.bin From andrew at icedtea.classpath.org Tue Oct 16 21:10:21 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 04:10:21 +0000 Subject: /hg/release/icedtea7-2.3: Update with 2012/10/16 security fixes. Message-ID: changeset faad80f467c0 in /hg/release/icedtea7-2.3 details: http://icedtea.classpath.org/hg/release/icedtea7-2.3?cmd=changeset;node=faad80f467c0 author: Andrew John Hughes date: Wed Oct 17 05:09:54 2012 +0100 Update with 2012/10/16 security fixes. 2011-10-17 Andrew John Hughes * Makefile.am: (JDK_UPDATE_VERSION): Bump to 09. (CORBA_CHANGESET): Update to IcedTea7 2.3 forest head; the tag icedtea-2.3.3. (JAXP_CHANGESET): Likewise. (JAXWS_CHANGESET): Likewise. (JDK_CHANGESET): Likewise. (LANGTOOLS_CHANGESET): Likewise. (OPENJDK_CHANGESET): Likewise. (CORBA_SHA256SUM): Likewise. (JAXP_SHA256SUM): Likewise. (JAXWS_SHA256SUM): Likewise. (JDK_SHA256SUM): Likewise. (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. * hotspot.map: Update default to IcedTea7 2.3.3 & zero to IcedTea7 2.1.3. * patches/boot/ecj-autoboxing.patch: Add additional case in java.lang.invoke.MethodHandleImpl. * patches/boot/ecj-diamond.patch: Add additional case in com.sun.beans.decoder.DocumentHandler. * patches/boot/ecj-stringswitch.patch: Add additional case in java.lang.invoke.MethodHandleNatives. * patches/boot/ecj-trywithresources.patch: Add additional case in java.lang.invoke.MethodHandleImpl. diffstat: ChangeLog | 32 ++++++ Makefile.am | 26 ++-- hotspot.map | 4 +- patches/boot/ecj-autoboxing.patch | 12 ++ patches/boot/ecj-diamond.patch | 17 +++ patches/boot/ecj-stringswitch.patch | 150 ++++++++++++++++++++++++++++++++ patches/boot/ecj-trywithresources.patch | 20 ++++ 7 files changed, 246 insertions(+), 15 deletions(-) diffs (321 lines): diff -r b5dcc4ea49a8 -r faad80f467c0 ChangeLog --- a/ChangeLog Wed Sep 26 12:05:38 2012 +0200 +++ b/ChangeLog Wed Oct 17 05:09:54 2012 +0100 @@ -1,3 +1,35 @@ +2011-10-17 Andrew John Hughes + + * Makefile.am: + (JDK_UPDATE_VERSION): Bump to 09. + (CORBA_CHANGESET): Update to IcedTea7 2.3 forest head; + the tag icedtea-2.3.3. + (JAXP_CHANGESET): Likewise. + (JAXWS_CHANGESET): Likewise. + (JDK_CHANGESET): Likewise. + (LANGTOOLS_CHANGESET): Likewise. + (OPENJDK_CHANGESET): Likewise. + (CORBA_SHA256SUM): Likewise. + (JAXP_SHA256SUM): Likewise. + (JAXWS_SHA256SUM): Likewise. + (JDK_SHA256SUM): Likewise. + (LANGTOOLS_SHA256SUM): Likewise. + (OPENJDK_SHA256SUM): Likewise. + * hotspot.map: Update default to IcedTea7 2.3.3 + & zero to IcedTea7 2.1.3. + * patches/boot/ecj-autoboxing.patch: + Add additional case in + java.lang.invoke.MethodHandleImpl. + * patches/boot/ecj-diamond.patch: + Add additional case in + com.sun.beans.decoder.DocumentHandler. + * patches/boot/ecj-stringswitch.patch: + Add additional case in + java.lang.invoke.MethodHandleNatives. + * patches/boot/ecj-trywithresources.patch: + Add additional case in + java.lang.invoke.MethodHandleImpl. + 2012-09-26 Xerxes R??nby JamVM diff -r b5dcc4ea49a8 -r faad80f467c0 Makefile.am --- a/Makefile.am Wed Sep 26 12:05:38 2012 +0200 +++ b/Makefile.am Wed Oct 17 05:09:54 2012 +0100 @@ -1,22 +1,22 @@ # Dependencies OPENJDK_VERSION = b30 -JDK_UPDATE_VERSION = 07 +JDK_UPDATE_VERSION = 09 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION) -CORBA_CHANGESET = 7fae6a3a68c7 -JAXP_CHANGESET = ee4bd94136ec -JAXWS_CHANGESET = c89c6ac953e7 -JDK_CHANGESET = f78eb7e08ee1 -LANGTOOLS_CHANGESET = 867d5041bee6 -OPENJDK_CHANGESET = acba2d30209d +CORBA_CHANGESET = 9a95d714d136 +JAXP_CHANGESET = f45296ac69be +JAXWS_CHANGESET = 03f54ef33914 +JDK_CHANGESET = 5ec94d162f05 +LANGTOOLS_CHANGESET = ec73c6927fb7 +OPENJDK_CHANGESET = 301e79a966b4 -CORBA_SHA256SUM = 8d94e9b594e4ae0eff6899cb4ff899ce66db3b4d6ef158e019b7be96e193ec0f -JAXP_SHA256SUM = 26991edc468b7599a332753a60ff861fde78af439d0a5b87d0e5b389d5e53fb5 -JAXWS_SHA256SUM = a411bdde270bb0451b74fc9ba890159ed1f7070bc25f21b3ebd17b79b42805f8 -JDK_SHA256SUM = 74cd8b7c7ed1d80dd4cfa45565584ec1c24cfd5e10a32fc026b92f0ce27ff224 -LANGTOOLS_SHA256SUM = ded69ccf2baea82b7baf9050c64160733ff45c10c0a363de80d795618c494707 -OPENJDK_SHA256SUM = ae63f88590d4aa82de82322e6bb61b31157e49617a4f8c310fc4c4ab4690f528 +CORBA_SHA256SUM = 4ad0ab1e0ab6f1e0402fd5a5f0b388bb33cc2c553df867e4c5e6ca78a4ede9bb +JAXP_SHA256SUM = b088dd5d383f27b2ccd433eebcbf3f73c016b3359abdae2a5575455d56668141 +JAXWS_SHA256SUM = 86dfb4fda79de7459b17b6efac6b8d5d6fd7bb1175b7e4ff22ba2ce4a903c05a +JDK_SHA256SUM = 11a77a35661b2239e73c3fb1318fb6371d0cd7130594d1405df1cb1b17040ea6 +LANGTOOLS_SHA256SUM = c7c67f6805d05c0fa5ddd2a7e406a6adcd0823dd008005563f2b2a88d1f3e6b6 +OPENJDK_SHA256SUM = dce85d9bcc6e213240b6ad49755bf57fc60a515461664890efcce2ed615ca70b CACAO_VERSION = a567bcb7f589 CACAO_SHA256SUM = d49f79debc131a5694cae6ab3ba2864e7f3249ee8d9dc09aae8afdd4dc6b09f9 diff -r b5dcc4ea49a8 -r faad80f467c0 hotspot.map --- a/hotspot.map Wed Sep 26 12:05:38 2012 +0200 +++ b/hotspot.map Wed Oct 17 05:09:54 2012 +0100 @@ -1,3 +1,3 @@ # version url changeset sha256sum -default http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot ea39d76b3bde 25733b44590c950adc42a2e9c366b8a3992803c06dedcc16d2bf0d50fed54844 -zero http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot 47a867dd3005 9f9c2fb9eea9cc2e2d44f23d46615522b09ad0b5dbce2e448458a44e05161e3e +default http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot d2d0a106917c 872e9e0c36b9fd93e81ac131e60deadb0afa22aa77447150bb45ede77ee6db8b +zero http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot 767fdaea4155 a2a2c610e9ebb97a3c95be233533035cf4f59c4cc45a553ba09e52106fbad113 diff -r b5dcc4ea49a8 -r faad80f467c0 patches/boot/ecj-autoboxing.patch --- a/patches/boot/ecj-autoboxing.patch Wed Sep 26 12:05:38 2012 +0200 +++ b/patches/boot/ecj-autoboxing.patch Wed Oct 17 05:09:54 2012 +0100 @@ -243,6 +243,15 @@ return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7); return fallback.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7); } +@@ -1374,7 +1374,7 @@ + MH_checkCallerClass = IMPL_LOOKUP + .findStatic(THIS_CLASS, "checkCallerClass", + MethodType.methodType(boolean.class, Class.class, Class.class)); +- assert((boolean) MH_checkCallerClass.invokeExact(THIS_CLASS, THIS_CLASS)); ++ assert((Boolean) MH_checkCallerClass.invokeExact(THIS_CLASS, THIS_CLASS)); + } catch (Throwable ex) { + throw new InternalError(ex.toString()); + } diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/ToGeneric.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/ToGeneric.java --- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/ToGeneric.java 2011-06-11 00:38:08.000000000 +0100 +++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/ToGeneric.java 2011-07-12 15:12:13.214932157 +0100 @@ -285,3 +294,6 @@ else return (int) unboxLong(x, false); } +diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java +--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-10-17 03:17:03.331299684 +0100 ++++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-10-17 03:19:49.546110492 +0100 diff -r b5dcc4ea49a8 -r faad80f467c0 patches/boot/ecj-diamond.patch --- a/patches/boot/ecj-diamond.patch Wed Sep 26 12:05:38 2012 +0200 +++ b/patches/boot/ecj-diamond.patch Wed Oct 17 05:09:54 2012 +0100 @@ -6216,3 +6216,20 @@ List threads = new ArrayList(); for (int i = 0; i < threadCount; i++) { RandomCollector r = new RandomCollector(); +diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java openjdk-boot/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java 2012-10-17 02:42:13.610815469 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java 2012-10-17 02:43:02.995461481 +0100 +@@ -62,9 +62,10 @@ + */ + public final class DocumentHandler extends DefaultHandler { + private final AccessControlContext acc = AccessController.getContext(); +- private final Map> handlers = new HashMap<>(); +- private final Map environment = new HashMap<>(); +- private final List objects = new ArrayList<>(); ++ private final Map> handlers = ++ new HashMap>(); ++ private final Map environment = new HashMap(); ++ private final List objects = new ArrayList(); + + private Reference loader; + private ExceptionListener listener; diff -r b5dcc4ea49a8 -r faad80f467c0 patches/boot/ecj-stringswitch.patch --- a/patches/boot/ecj-stringswitch.patch Wed Sep 26 12:05:38 2012 +0200 +++ b/patches/boot/ecj-stringswitch.patch Wed Oct 17 05:09:54 2012 +0100 @@ -301,3 +301,153 @@ } throw new IllegalArgumentException( +diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java +--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2012-10-17 03:48:53.678554395 +0100 ++++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2012-10-17 04:20:20.203700764 +0100 +@@ -411,89 +411,84 @@ + static boolean isCallerSensitive(MemberName mem) { + assert(mem.isInvocable()); + Class defc = mem.getDeclaringClass(); +- switch (mem.getName()) { +- case "doPrivileged": ++ String memName = mem.getName(); ++ if ("doPrivileged".equals(memName)) { + return defc == java.security.AccessController.class; +- case "getUnsafe": ++ } else if ("getUnsafe".equals(memName)) { + return defc == sun.misc.Unsafe.class; +- case "lookup": ++ } else if ("lookup".equals(memName)) { + return defc == java.lang.invoke.MethodHandles.class; +- case "invoke": ++ } else if ("invoke".equals(memName)) { + return defc == java.lang.reflect.Method.class; +- case "get": +- case "getBoolean": +- case "getByte": +- case "getChar": +- case "getShort": +- case "getInt": +- case "getLong": +- case "getFloat": +- case "getDouble": +- case "set": +- case "setBoolean": +- case "setByte": +- case "setChar": +- case "setShort": +- case "setInt": +- case "setLong": +- case "setFloat": +- case "setDouble": ++ } else if ("get".equals(memName) || ++ "getBoolean".equals(memName) || ++ "getByte".equals(memName) || ++ "getChar".equals(memName) || ++ "getShort".equals(memName) || ++ "getInt".equals(memName) || ++ "getFloat".equals(memName) || ++ "getDouble".equals(memName) || ++ "set".equals(memName) || ++ "setBoolean".equals(memName) || ++ "setByte".equals(memName) || ++ "setChar".equals(memName) || ++ "setShort".equals(memName) || ++ "setInt".equals(memName) || ++ "setLong".equals(memName) || ++ "setFloat".equals(memName) || ++ "setDouble".equals(memName)) { + return defc == java.lang.reflect.Field.class; +- case "newInstance": ++ } else if ("newInstance".equals(memName)) { + if (defc == java.lang.reflect.Constructor.class) return true; + if (defc == java.lang.Class.class) return true; +- break; +- case "forName": +- case "getClassLoader": +- case "getClasses": +- case "getFields": +- case "getMethods": +- case "getConstructors": +- case "getDeclaredClasses": +- case "getDeclaredFields": +- case "getDeclaredMethods": +- case "getDeclaredConstructors": +- case "getField": +- case "getMethod": +- case "getConstructor": +- case "getDeclaredField": +- case "getDeclaredMethod": +- case "getDeclaredConstructor": ++ } else if ("forName".equals(memName) || ++ "getClassLoader".equals(memName) || ++ "getClasses".equals(memName) || ++ "getFields".equals(memName) || ++ "getMethods".equals(memName) || ++ "getConstructors".equals(memName) || ++ "getDeclaredClasses".equals(memName) || ++ "getDeclaredFields".equals(memName) || ++ "getDeclaredMethods".equals(memName) || ++ "getDeclaredConstructors".equals(memName) || ++ "getField".equals(memName) || ++ "getMethod".equals(memName) || ++ "getConstructor".equals(memName) || ++ "getDeclaredField".equals(memName) || ++ "getDeclaredMethod".equals(memName) || ++ "getDeclaredConstructor".equals(memName)) { + return defc == java.lang.Class.class; +- case "getConnection": +- case "getDriver": +- case "getDrivers": +- case "deregisterDriver": ++ } else if ("getConnection".equals(memName) || ++ "getDriver".equals(memName) || ++ "getDrivers".equals(memName) || ++ "deregisterDriver".equals(memName)) { + return defc == java.sql.DriverManager.class; +- case "newUpdater": ++ } else if ("newUpdater".equals(memName)) { + if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class) return true; + if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class) return true; + if (defc == java.util.concurrent.atomic.AtomicReferenceFieldUpdater.class) return true; +- break; +- case "getContextClassLoader": ++ } else if ("getContextClassLoader".equals(memName)) { + return defc == java.lang.Thread.class; +- case "getPackage": +- case "getPackages": ++ } else if ("getPackage".equals(memName) || ++ "getPackages".equals(memName)) { + return defc == java.lang.Package.class; +- case "getParent": +- case "getSystemClassLoader": ++ } else if ("getParent".equals(memName) || ++ "getSystemClassLoader".equals(memName)) { + return defc == java.lang.ClassLoader.class; +- case "load": +- case "loadLibrary": ++ } else if ("load".equals(memName) || ++ "loadLibrary".equals(memName)) { + if (defc == java.lang.Runtime.class) return true; + if (defc == java.lang.System.class) return true; +- break; +- case "getCallerClass": ++ } else if ("getCallerClass".equals(memName)) { + if (defc == sun.reflect.Reflection.class) return true; + if (defc == java.lang.System.class) return true; +- break; +- case "getCallerClassLoader": ++ } else if ("getCallerClassLoader".equals(memName)) { + return defc == java.lang.ClassLoader.class; +- case "getProxyClass": +- case "newProxyInstance": ++ } else if ("getProxyClass".equals(memName) || ++ "newProxyInstance".equals(memName)) { + return defc == java.lang.reflect.Proxy.class; +- case "getBundle": +- case "clearCache": ++ } else if ("getBundle".equals(memName) || ++ "clearCache".equals(memName)) { + return defc == java.util.ResourceBundle.class; + } + return false; diff -r b5dcc4ea49a8 -r faad80f467c0 patches/boot/ecj-trywithresources.patch --- a/patches/boot/ecj-trywithresources.patch Wed Sep 26 12:05:38 2012 +0200 +++ b/patches/boot/ecj-trywithresources.patch Wed Oct 17 05:09:54 2012 +0100 @@ -1056,3 +1056,23 @@ } catch (IOException x) { } return result; +diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java +--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-10-17 03:17:03.331299684 +0100 ++++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-10-17 03:18:04.192329905 +0100 +@@ -1401,10 +1401,14 @@ + java.net.URLConnection uconn = tClass.getResource(tResource).openConnection(); + int len = uconn.getContentLength(); + byte[] bytes = new byte[len]; +- try (java.io.InputStream str = uconn.getInputStream()) { ++ java.io.InputStream str = null; ++ try { ++ str = uconn.getInputStream(); + int nr = str.read(bytes); + if (nr != len) throw new java.io.IOException(tResource); +- } ++ } finally { ++ str.close(); ++ } + values[0] = bytes; + } catch (java.io.IOException ex) { + throw new InternalError(ex.toString()); From andrew at icedtea.classpath.org Tue Oct 16 21:28:40 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 04:28:40 +0000 Subject: /hg/release/icedtea7-2.3: 3 new changesets Message-ID: changeset 3c07883809a3 in /hg/release/icedtea7-2.3 details: http://icedtea.classpath.org/hg/release/icedtea7-2.3?cmd=changeset;node=3c07883809a3 author: Andrew John Hughes date: Wed Oct 17 05:11:39 2012 +0100 Update my e-mail address. 2011-10-17 Andrew John Hughes * AUTHORS: Update my e-mail address. * ChangeLog: Likewise. changeset 5b939f7d3704 in /hg/release/icedtea7-2.3 details: http://icedtea.classpath.org/hg/release/icedtea7-2.3?cmd=changeset;node=5b939f7d3704 author: Andrew John Hughes date: Wed Oct 17 05:21:13 2012 +0100 Update NEWS. 2011-10-17 Andrew John Hughes * NEWS: Updated. changeset 84228c050a0d in /hg/release/icedtea7-2.3 details: http://icedtea.classpath.org/hg/release/icedtea7-2.3?cmd=changeset;node=84228c050a0d author: Andrew John Hughes date: Wed Oct 17 05:28:21 2012 +0100 Prepare for 2.3.3 release. 2011-10-17 Andrew John Hughes * configure.ac: Bump to 2.3.3 proper. * NEWS: Add release date. diffstat: AUTHORS | 2 +- ChangeLog | 890 +++++++++++++++++++++++++++++----------------------------- NEWS | 34 ++- configure.ac | 2 +- 4 files changed, 487 insertions(+), 441 deletions(-) diffs (truncated from 3759 to 500 lines): diff -r faad80f467c0 -r 84228c050a0d AUTHORS --- a/AUTHORS Wed Oct 17 05:09:54 2012 +0100 +++ b/AUTHORS Wed Oct 17 05:28:21 2012 +0100 @@ -14,7 +14,7 @@ Kyle Galloway Dennis Gilmore Andrew Haley -Andrew John Hughes +Andrew John Hughes Tomas Hurka Ioana Ivan Matthias Klose diff -r faad80f467c0 -r 84228c050a0d ChangeLog --- a/ChangeLog Wed Oct 17 05:09:54 2012 +0100 +++ b/ChangeLog Wed Oct 17 05:28:21 2012 +0100 @@ -1,3 +1,17 @@ +2011-10-17 Andrew John Hughes + + * configure.ac: Bump to 2.3.3 proper. + * NEWS: Add release date. + +2011-10-17 Andrew John Hughes + + * NEWS: Updated. + +2011-10-17 Andrew John Hughes + + * AUTHORS: Update my e-mail address. + * ChangeLog: Likewise. + 2011-10-17 Andrew John Hughes * Makefile.am: @@ -43,7 +57,7 @@ * configure.ac: Remove the Xp header and library checks. -2011-09-03 Andrew John Hughes +2011-09-03 Andrew John Hughes * configure.ac: Bump to 2.3.3pre. * NEWS: Add new section. @@ -530,7 +544,7 @@ Extend with additional cases in HotSpot and the JDK. -2012-03-20 Andrew John Hughes +2012-03-20 Andrew John Hughes * acinclude.m4: (IT_FIND_COMPILER): Define only once and @@ -579,7 +593,7 @@ (versioning): Don't add a suffix if building the default project, 'icedtea'. -2012-05-25 Andrew John Hughes +2012-05-25 Andrew John Hughes * Makefile.am: (OPENJDK_VERSION): Bump to b10. @@ -609,13 +623,13 @@ generation application to fail, presumably due to variable moving from private to package-private). -2012-05-23 Andrew John Hughes +2012-05-23 Andrew John Hughes * Makefile.am: (extract-openjdk): Mirror replacement of '.' with '-' done by Mercurial server when creating tarball. -2012-05-23 Andrew John Hughes +2012-05-23 Andrew John Hughes (CORBA_CHANGESET): Bump to bring in typo fix. (CORBA_SHA256SUM): Likewise. @@ -623,16 +637,16 @@ digest cloning fix. (JDK_SHA256SUM): Likewise. -2012-05-23 Andrew John Hughes +2012-05-23 Andrew John Hughes * NEWS: Sync with 2.2 branch. -2012-05-23 Andrew John Hughes +2012-05-23 Andrew John Hughes * configure.ac: Bump to 2.3pre. * NEWS: Add 2.3 section. -2012-05-23 Andrew John Hughes +2012-05-23 Andrew John Hughes * patches/boot/corba-defs.patch: Removed. Makes changes which aren't needed @@ -650,7 +664,7 @@ Don't set JAVACFLAGS to point to non-existent rt.jar in {JDK_HOME}/lib. Point to just-built langtools instead. -2011-03-02 Andrew John Hughes +2011-03-02 Andrew John Hughes * Makefile.am: (icedtea): Explicitly set -j1 for the @@ -661,13 +675,13 @@ (icedtea-debug): Likewise. (icedtea-ecj): Likewise. -2012-05-21 Andrew John Hughes +2012-05-21 Andrew John Hughes (JDK_CHANGESET): Bump to bring in the aliasing and wrap mode fixes. (JDK_SHA256SUM): Likewise. -2012-05-21 Andrew John Hughes +2012-05-21 Andrew John Hughes * AUTHORS: Add Ralph Sennhauser. @@ -692,7 +706,7 @@ * pax-mark-vm.in: Script to PaX mark a JDK image. -2012-05-02 Andrew John Hughes +2012-05-02 Andrew John Hughes Bump to jdk7u4 b13. * Makefile.am: @@ -718,7 +732,7 @@ * patches/boot/ecj-multicatch.patch: Likewise. * patches/boot/ecj-trywithresources.patch: Likewise. -2012-04-23 Andrew John Hughes +2012-04-23 Andrew John Hughes * Makefile.am: (HOTSPOT_CHANGESET): Bump to bring in @@ -727,20 +741,20 @@ (ICEDTEA_ENV): Set ALT_STRIP_POLICY to no_strip. -2012-04-12 Andrew John Hughes +2012-04-12 Andrew John Hughes * Makefile.am: (download-openjdk): Fix syntax. (download-cacao): Likewise. (download-jamvm): Likewise. -2012-04-11 Andrew John Hughes +2012-04-11 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bump to include GCC 4.7 build fixes. (JDK_SHA256SUM): Likewise. -2012-04-11 Andrew John Hughes +2012-04-11 Andrew John Hughes * Makefile.am: (download-openjdk): Don't download unless @@ -752,13 +766,13 @@ --disable-downloading. * configure.ac: Call IT_CHECK_FOR_DOWNLOADING. -2012-04-06 Andrew John Hughes +2012-04-06 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bump to include generalied crypto tests. (JDK_SHA256SUM): Likewise. -2012-04-06 Andrew John Hughes +2012-04-06 Andrew John Hughes * acinclude.m4: (IT_CHECK_FOR_GTK): Work with glib >= 2.32 @@ -775,13 +789,13 @@ * test/tapset/jstaptest.pl: thread_start and thread_stop thread id can be any positive number. -2012-03-23 Andrew John Hughes +2012-03-23 Andrew John Hughes * patches/boot/pr39408.patch, * patches/cacao/launcher.patch: Regenerated. -2012-03-22 Andrew John Hughes +2012-03-22 Andrew John Hughes * patches/systemtap-alloc-size-workaround.patch: Removed; upstream. @@ -1073,17 +1087,17 @@ (HOTSPOT_CHANGESET): Add latest Zero HS22 fixes. (HOTSPOT_SHA256SUM): Likewise. -2012-02-15 Andrew John Hughes +2012-02-15 Andrew John Hughes * NEWS: Add 2.0.1 and 2.1.0 release notes. * configure.ac: Bump to 2.2pre. -2012-02-14 Andrew John Hughes +2012-02-14 Andrew John Hughes * NEWS: Update with OpenJDK fixes and add release date for 2.1. -2012-02-14 Andrew John Hughes +2012-02-14 Andrew John Hughes (HOTSPOT_CHANGESET): Add latest fixes: 7140882, 7049339 and 7091528. @@ -1104,20 +1118,20 @@ to work with latest OpenJDK ALT_HOTSPOT_IMPORT_PATH functionality. * patches/cacao/version.patch: Removed, replaced by upstream CACAO changeset 30edcde287d9. -2012-02-08 Andrew John Hughes +2012-02-08 Andrew John Hughes (HOTSPOT_CHANGESET): Bump to fix HotSpot merge issue. (HOTSPOT_SHA256SUM): Likewise. -2012-02-08 Andrew John Hughes +2012-02-08 Andrew John Hughes * Makefile.am: Move JDK_UPDATE_VERSION and COMBINED_VERSION to top of file with OPENJDK_VERSION. (JDK_UPDATE_VERSION): Set to 02 for u2. -2012-02-08 Andrew John Hughes +2012-02-08 Andrew John Hughes * Makefile.am: (CORBA_CHANGESET): Updated. @@ -1179,7 +1193,7 @@ (HOTSPOT_CHANGESET): Updated. (HOTSPOT_SHA256SUM): Updated. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * NEWS: Move recent JamVM changes to correct section. Sync with 2.0. @@ -1204,13 +1218,13 @@ (JAMVM_VERSION): Updated JamVM to 2011-10-07 revision. (JAMVM_SHA256SUM): Updated. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * NEWS: Set release date of 2.0 and add section for 2.1. * configure.ac: Bump to 2.1pre. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * patches/cacao/6714758.patch: Removed; upstream. @@ -1219,7 +1233,7 @@ (extract-cacao): Use gzip not bzip2. (extract-jamvm): Explicitly use gzip. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * Makefile.am: Bring in security updates. (CORBA_CHANGESET): Updated. @@ -1232,13 +1246,13 @@ after 7046823 is applied. * NEWS: Updated. -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes * acinclude.m4: (IT_CHECK_FOR_GIO): Require 2.26 and above for GSettings. -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes Bump changesets to bring in fix which turns off forced -Werror. @@ -1263,7 +1277,7 @@ * Makefile.am: Upgrade CACAO version, use .tar.gz archive -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes * NEWS: Cleanup. @@ -1291,14 +1305,14 @@ (CACAO_VERSION): Updated CACAO to 2011-08-08 revision. (CACAO_SHA256SUM): Updated. -2010-11-19 Andrew John Hughes +2010-11-19 Andrew John Hughes * Makefile.am: (CACAO_BASE_URL): Switch to using IcedTea server for CACAO drops too. (CACAO_URL): Likewise. -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes * Makefile.am: (ICEDTEA_BOOT_PATCHES): Only apply @@ -1310,20 +1324,20 @@ 1.7 bytecode. * configure.ac: Call IT_BYTECODE7_CHECK. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * Makefile.am: (EXTRA_DIST): Remove patch directories that no longer exist. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * acinclude.m4: (AC_CHECK_FOR_JDK): Look for IcedTea7 JDKs. Don't check for IcedTea6 JDKs when bootstrapping until PR716 is fixed. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes PR790: Include JAXP, JAF and JAXWS sources directly in OpenJDK tree, removing the need for drop tarballs. @@ -1378,7 +1392,7 @@ * acinclude.m4: Add devel package suggestions for epoll/xattr check failure. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * acinclude.m4: Always quote using '[' and ']' in macro calls. @@ -1388,7 +1402,7 @@ (IT_CHECK_FOR_CUPS): Likewise. (IT_CHECK_FOR_SYSCALLS): Likewise. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * acinclude.m4: (IT_CHECK_FOR_SYSCALLS): Include checks @@ -1414,7 +1428,7 @@ (JAMVM_VERSION): Updated JamVM to 2011-09-24 revision. (JAMVM_SHA256SUM): Updated. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes PR717: Remove all non-bootstrap non-conditional patches. @@ -1473,14 +1487,14 @@ Updated against upstream disable-intree-ec. * NEWS: Updated. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Include Damian's compilation fix for building without USE_SYSTEM_CUPS. (JDK_SHA256SUM): Likewise. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes * Makefile.am: (ICEDTEA_ENV): Set COMPILE_AGAINST_SYSCALLS @@ -1491,7 +1505,7 @@ *at). * configure.ac: Call IT_CHECK_FOR_SYSCALLS. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bump to bring in latest @@ -1512,21 +1526,21 @@ Add calls to IT_CHECK_FOR_GTK, IT_CHECK_FOR_GIO, IT_CHECK_FOR_FONTCONFIG and IT_CHECK_FOR_CUPS. -2011-09-09 Andrew John Hughes +2011-09-09 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bring in fix for another duplicate gboolean definition. (JDK_SHA256SUM): Likewise. -2011-09-08 Andrew John Hughes +2011-09-08 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bring in fix for duplicate gboolean definition. (JDK_SHA256SUM): Likewise. -2011-09-06 Andrew John Hughes +2011-09-06 Andrew John Hughes * patches/hotspot-gcc-pr36917.patch: Redundant, was removed from IcedTea6. @@ -1617,12 +1631,12 @@ (JAMVM_VERSION): Updated JamVM to 2011-08-08 revision. (JAMVM_SHA256SUM): Updated. -2011-08-03 Andrew John Hughes +2011-08-03 Andrew John Hughes * NEWS: Updated with changes from Pavel's HotSpot update. -2011-08-03 Andrew John Hughes +2011-08-03 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Updated to bring in @@ -1630,7 +1644,7 @@ (JDK_SHA256SUM): Likewise. * NEWS: Updated. -2011-08-03 Andrew John Hughes +2011-08-03 Andrew John Hughes * Makefile.am: Apply explicit-inner-class-headers patch as required. @@ -1669,7 +1683,7 @@ (JAMVM_VERSION): Updated JamVM to 2011-08-01 revision. (JAMVM_SHA256SUM): Updated. -2011-07-29 Andrew John Hughes +2011-07-29 Andrew John Hughes PR717: All non-bootstrap patches in IcedTea7 should be in the forest or dropped @@ -1711,7 +1725,7 @@ against new forest. * NEWS: Updated. -2011-07-28 Andrew John Hughes +2011-07-28 Andrew John Hughes Bring in new JDK build cleanups and HotSpot fixes for Zero/Shark. @@ -1749,7 +1763,7 @@ (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. -2011-07-13 Andrew John Hughes +2011-07-13 Andrew John Hughes * Makefile.am: (bootstrap-directory-stage1): Only use @@ -1759,7 +1773,7 @@ -Xbootclasspath and set JAVAH_SUPPORTS_X_OPTIONS if so. -2011-07-13 Andrew John Hughes +2011-07-13 Andrew John Hughes Bump to b147. * Makefile.am: @@ -1793,7 +1807,7 @@ * patches/boot/ecj-stringswitch.patch: Likewise and add new cases. -2011-07-12 Andrew John Hughes +2011-07-12 Andrew John Hughes * Makefile.am: (CORBA_SHA256SUM): Updated after removal of @@ -1814,14 +1828,14 @@ * HACKING: Updated. * NEWS: Updated. -2011-07-05 Andrew John Hughes +2011-07-05 Andrew John Hughes PR icedtea/751: (ICEDTEA_BOOT_PATCHES): Make application of javah.patch dependent on javah presenting with bug 40188. -2011-07-05 Andrew John Hughes From andrew at icedtea.classpath.org Tue Oct 16 22:19:20 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 05:19:20 +0000 Subject: /hg/release/icedtea7-2.2: Add 2012/10/16 security updates. Message-ID: changeset ecfaffefd61b in /hg/release/icedtea7-2.2 details: http://icedtea.classpath.org/hg/release/icedtea7-2.2?cmd=changeset;node=ecfaffefd61b author: Andrew John Hughes date: Wed Oct 17 06:19:02 2012 +0100 Add 2012/10/16 security updates. 2011-10-17 Andrew John Hughes * Makefile.am: (CORBA_CHANGESET): Update to IcedTea7 2.2 forest head; the tag icedtea-2.2.3. (JAXP_CHANGESET): Likewise. (JAXWS_CHANGESET): Likewise. (JDK_CHANGESET): Likewise. (HOTSPOT_CHANGESET): Likewise. (LANGTOOLS_CHANGESET): Likewise. (OPENJDK_CHANGESET): Likewise. (CORBA_SHA256SUM): Likewise. (JAXP_SHA256SUM): Likewise. (JAXWS_SHA256SUM): Likewise. (JDK_SHA256SUM): Likewise. (HOTSPOT_SHA256SUM): Likewise. (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. * patches/boot/ecj-autoboxing.patch: Add additional case in java.lang.invoke.MethodHandleImpl. * patches/boot/ecj-diamond.patch: Add additional case in com.sun.beans.decoder.DocumentHandler. * patches/boot/ecj-stringswitch.patch: Add additional case in java.lang.invoke.MethodHandleNatives. * patches/boot/ecj-trywithresources.patch: Add additional case in java.lang.invoke.MethodHandleImpl. diffstat: ChangeLog | 31 ++++++ Makefile.am | 29 +++-- patches/boot/ecj-autoboxing.patch | 12 ++ patches/boot/ecj-diamond.patch | 17 +++ patches/boot/ecj-stringswitch.patch | 150 ++++++++++++++++++++++++++++++++ patches/boot/ecj-trywithresources.patch | 20 ++++ 6 files changed, 245 insertions(+), 14 deletions(-) diffs (315 lines): diff -r 3c80f4c091b5 -r ecfaffefd61b ChangeLog --- a/ChangeLog Wed Sep 05 11:38:00 2012 +0200 +++ b/ChangeLog Wed Oct 17 06:19:02 2012 +0100 @@ -1,3 +1,34 @@ +2011-10-17 Andrew John Hughes + + * Makefile.am: + (CORBA_CHANGESET): Update to IcedTea7 2.2 forest head; + the tag icedtea-2.2.3. + (JAXP_CHANGESET): Likewise. + (JAXWS_CHANGESET): Likewise. + (JDK_CHANGESET): Likewise. + (HOTSPOT_CHANGESET): Likewise. + (LANGTOOLS_CHANGESET): Likewise. + (OPENJDK_CHANGESET): Likewise. + (CORBA_SHA256SUM): Likewise. + (JAXP_SHA256SUM): Likewise. + (JAXWS_SHA256SUM): Likewise. + (JDK_SHA256SUM): Likewise. + (HOTSPOT_SHA256SUM): Likewise. + (LANGTOOLS_SHA256SUM): Likewise. + (OPENJDK_SHA256SUM): Likewise. + * patches/boot/ecj-autoboxing.patch: + Add additional case in + java.lang.invoke.MethodHandleImpl. + * patches/boot/ecj-diamond.patch: + Add additional case in + com.sun.beans.decoder.DocumentHandler. + * patches/boot/ecj-stringswitch.patch: + Add additional case in + java.lang.invoke.MethodHandleNatives. + * patches/boot/ecj-trywithresources.patch: + Add additional case in + java.lang.invoke.MethodHandleImpl. + 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diff -r 3c80f4c091b5 -r ecfaffefd61b Makefile.am --- a/Makefile.am Wed Sep 05 11:38:00 2012 +0200 +++ b/Makefile.am Wed Oct 17 06:19:02 2012 +0100 @@ -4,21 +4,22 @@ JDK_UPDATE_VERSION = 05 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION) -CORBA_CHANGESET = 64c5506f4a4b -HOTSPOT_CHANGESET = f36619598d31 -JAXP_CHANGESET = d7e1594436a6 -JAXWS_CHANGESET = e029fce63568 -JDK_CHANGESET = 85680f91b6f9 -LANGTOOLS_CHANGESET = f5e3d40e7849 -OPENJDK_CHANGESET = 0fd1b10097bd +CORBA_CHANGESET = 12fee4f9ac22 +HOTSPOT_CHANGESET = 864418cd5667 +JAXP_CHANGESET = dc64245ac19d +JAXWS_CHANGESET = b41293d57940 +JDK_CHANGESET = 4cf358fd012a +LANGTOOLS_CHANGESET = e96efe42e3d5 +OPENJDK_CHANGESET = 32574ae3c2be -CORBA_SHA256SUM = b27f4fb21b5873594661b97a325454ad9448e5cd73864270f5f30c07ca082660 -HOTSPOT_SHA256SUM = 02b3b8e4814ac72140a921c7e08ac8967ae6f6904a9b49476bbc3e098d881153 -JAXP_SHA256SUM = 75bd17a9abfb110bde5950229fb343b16ac13916d78d87631b414cc6fc44d80b -JAXWS_SHA256SUM = 89b6b52b758785d465d1d14c9156872db26e37b5cf13e2b602c28ee9f0e3d56a -JDK_SHA256SUM = ca95c6c0c70f40c472f22d85092d664d77ab32dc4ef0ccc01a4ada937eb208ce -LANGTOOLS_SHA256SUM = 57033a023ed8fd3b6222fe7bcad6a240841af7f700ee03f210b86bde9c13f6e0 -OPENJDK_SHA256SUM = f0caa034ee9377dc6b0bd2d71a9489a89c48088be17938ba69e1167afa68932c +CORBA_SHA256SUM = bf314ffe9993f70ef9a0449b5c540883935b6326e28ee5afdc44f062039e0303 +HOTSPOT_SHA256SUM = 85b0ff446da7f05cd8e2f6902d86fcb109b347db858791e3afcf315ce5ef2942 +JAXP_SHA256SUM = 5003576ed427cae1dda7ccf7c1af042ea8f62ad668e176583a84fba989f77e32 +JAXWS_SHA256SUM = a3bf4ec265fd044a5abce35dfc51b1977826a21bd13abe05a8336f25e8a8dd21 +JDK_SHA256SUM = 5cd45b036269d35ec916e0b99977a87d2a2addefe9aa2058fbc05d0269cd9008 +LANGTOOLS_SHA256SUM = f70752c14ec19fec5fffdb38b3d3aaaefd551ec4dfd109947541b3f4176245a6 +OPENJDK_SHA256SUM = 6a5e1a497c0a309fc17954909ca5890bef15b61e8af877b7a07d0f754d6875a4 +HS21_SHA256SUM = a2a2c610e9ebb97a3c95be233533035cf4f59c4cc45a553ba09e52106fbad113 CACAO_VERSION = a567bcb7f589 CACAO_SHA256SUM = d49f79debc131a5694cae6ab3ba2864e7f3249ee8d9dc09aae8afdd4dc6b09f9 diff -r 3c80f4c091b5 -r ecfaffefd61b patches/boot/ecj-autoboxing.patch --- a/patches/boot/ecj-autoboxing.patch Wed Sep 05 11:38:00 2012 +0200 +++ b/patches/boot/ecj-autoboxing.patch Wed Oct 17 06:19:02 2012 +0100 @@ -243,6 +243,15 @@ return target.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7); return fallback.invokeExact(a0, a1, a2, a3, a4, a5, a6, a7); } +@@ -1374,7 +1374,7 @@ + MH_checkCallerClass = IMPL_LOOKUP + .findStatic(THIS_CLASS, "checkCallerClass", + MethodType.methodType(boolean.class, Class.class, Class.class)); +- assert((boolean) MH_checkCallerClass.invokeExact(THIS_CLASS, THIS_CLASS)); ++ assert((Boolean) MH_checkCallerClass.invokeExact(THIS_CLASS, THIS_CLASS)); + } catch (Throwable ex) { + throw new InternalError(ex.toString()); + } diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/ToGeneric.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/ToGeneric.java --- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/ToGeneric.java 2011-06-11 00:38:08.000000000 +0100 +++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/ToGeneric.java 2011-07-12 15:12:13.214932157 +0100 @@ -285,3 +294,6 @@ else return (int) unboxLong(x, false); } +diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java +--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-10-17 03:17:03.331299684 +0100 ++++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-10-17 03:19:49.546110492 +0100 diff -r 3c80f4c091b5 -r ecfaffefd61b patches/boot/ecj-diamond.patch --- a/patches/boot/ecj-diamond.patch Wed Sep 05 11:38:00 2012 +0200 +++ b/patches/boot/ecj-diamond.patch Wed Oct 17 06:19:02 2012 +0100 @@ -6042,6 +6042,23 @@ List threads = new ArrayList(); for (int i = 0; i < threadCount; i++) { RandomCollector r = new RandomCollector(); +diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java openjdk-boot/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java 2012-10-17 02:42:13.610815469 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java 2012-10-17 02:43:02.995461481 +0100 +@@ -62,9 +62,10 @@ + */ + public final class DocumentHandler extends DefaultHandler { + private final AccessControlContext acc = AccessController.getContext(); +- private final Map> handlers = new HashMap<>(); +- private final Map environment = new HashMap<>(); +- private final List objects = new ArrayList<>(); ++ private final Map> handlers = ++ new HashMap>(); ++ private final Map environment = new HashMap(); ++ private final List objects = new ArrayList(); + + private Reference loader; + private ExceptionListener listener; diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/x509/X509CertImpl.java openjdk-boot/jdk/src/share/classes/sun/security/x509/X509CertImpl.java --- openjdk-boot.orig/jdk/src/share/classes/sun/security/x509/X509CertImpl.java 2012-06-13 00:23:50.888084888 +0100 +++ openjdk-boot/jdk/src/share/classes/sun/security/x509/X509CertImpl.java 2012-06-13 00:24:25.328561965 +0100 diff -r 3c80f4c091b5 -r ecfaffefd61b patches/boot/ecj-stringswitch.patch --- a/patches/boot/ecj-stringswitch.patch Wed Sep 05 11:38:00 2012 +0200 +++ b/patches/boot/ecj-stringswitch.patch Wed Oct 17 06:19:02 2012 +0100 @@ -301,3 +301,153 @@ } throw new IllegalArgumentException( +diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java +--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2012-10-17 03:48:53.678554395 +0100 ++++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java 2012-10-17 04:20:20.203700764 +0100 +@@ -411,89 +411,84 @@ + static boolean isCallerSensitive(MemberName mem) { + assert(mem.isInvocable()); + Class defc = mem.getDeclaringClass(); +- switch (mem.getName()) { +- case "doPrivileged": ++ String memName = mem.getName(); ++ if ("doPrivileged".equals(memName)) { + return defc == java.security.AccessController.class; +- case "getUnsafe": ++ } else if ("getUnsafe".equals(memName)) { + return defc == sun.misc.Unsafe.class; +- case "lookup": ++ } else if ("lookup".equals(memName)) { + return defc == java.lang.invoke.MethodHandles.class; +- case "invoke": ++ } else if ("invoke".equals(memName)) { + return defc == java.lang.reflect.Method.class; +- case "get": +- case "getBoolean": +- case "getByte": +- case "getChar": +- case "getShort": +- case "getInt": +- case "getLong": +- case "getFloat": +- case "getDouble": +- case "set": +- case "setBoolean": +- case "setByte": +- case "setChar": +- case "setShort": +- case "setInt": +- case "setLong": +- case "setFloat": +- case "setDouble": ++ } else if ("get".equals(memName) || ++ "getBoolean".equals(memName) || ++ "getByte".equals(memName) || ++ "getChar".equals(memName) || ++ "getShort".equals(memName) || ++ "getInt".equals(memName) || ++ "getFloat".equals(memName) || ++ "getDouble".equals(memName) || ++ "set".equals(memName) || ++ "setBoolean".equals(memName) || ++ "setByte".equals(memName) || ++ "setChar".equals(memName) || ++ "setShort".equals(memName) || ++ "setInt".equals(memName) || ++ "setLong".equals(memName) || ++ "setFloat".equals(memName) || ++ "setDouble".equals(memName)) { + return defc == java.lang.reflect.Field.class; +- case "newInstance": ++ } else if ("newInstance".equals(memName)) { + if (defc == java.lang.reflect.Constructor.class) return true; + if (defc == java.lang.Class.class) return true; +- break; +- case "forName": +- case "getClassLoader": +- case "getClasses": +- case "getFields": +- case "getMethods": +- case "getConstructors": +- case "getDeclaredClasses": +- case "getDeclaredFields": +- case "getDeclaredMethods": +- case "getDeclaredConstructors": +- case "getField": +- case "getMethod": +- case "getConstructor": +- case "getDeclaredField": +- case "getDeclaredMethod": +- case "getDeclaredConstructor": ++ } else if ("forName".equals(memName) || ++ "getClassLoader".equals(memName) || ++ "getClasses".equals(memName) || ++ "getFields".equals(memName) || ++ "getMethods".equals(memName) || ++ "getConstructors".equals(memName) || ++ "getDeclaredClasses".equals(memName) || ++ "getDeclaredFields".equals(memName) || ++ "getDeclaredMethods".equals(memName) || ++ "getDeclaredConstructors".equals(memName) || ++ "getField".equals(memName) || ++ "getMethod".equals(memName) || ++ "getConstructor".equals(memName) || ++ "getDeclaredField".equals(memName) || ++ "getDeclaredMethod".equals(memName) || ++ "getDeclaredConstructor".equals(memName)) { + return defc == java.lang.Class.class; +- case "getConnection": +- case "getDriver": +- case "getDrivers": +- case "deregisterDriver": ++ } else if ("getConnection".equals(memName) || ++ "getDriver".equals(memName) || ++ "getDrivers".equals(memName) || ++ "deregisterDriver".equals(memName)) { + return defc == java.sql.DriverManager.class; +- case "newUpdater": ++ } else if ("newUpdater".equals(memName)) { + if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class) return true; + if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class) return true; + if (defc == java.util.concurrent.atomic.AtomicReferenceFieldUpdater.class) return true; +- break; +- case "getContextClassLoader": ++ } else if ("getContextClassLoader".equals(memName)) { + return defc == java.lang.Thread.class; +- case "getPackage": +- case "getPackages": ++ } else if ("getPackage".equals(memName) || ++ "getPackages".equals(memName)) { + return defc == java.lang.Package.class; +- case "getParent": +- case "getSystemClassLoader": ++ } else if ("getParent".equals(memName) || ++ "getSystemClassLoader".equals(memName)) { + return defc == java.lang.ClassLoader.class; +- case "load": +- case "loadLibrary": ++ } else if ("load".equals(memName) || ++ "loadLibrary".equals(memName)) { + if (defc == java.lang.Runtime.class) return true; + if (defc == java.lang.System.class) return true; +- break; +- case "getCallerClass": ++ } else if ("getCallerClass".equals(memName)) { + if (defc == sun.reflect.Reflection.class) return true; + if (defc == java.lang.System.class) return true; +- break; +- case "getCallerClassLoader": ++ } else if ("getCallerClassLoader".equals(memName)) { + return defc == java.lang.ClassLoader.class; +- case "getProxyClass": +- case "newProxyInstance": ++ } else if ("getProxyClass".equals(memName) || ++ "newProxyInstance".equals(memName)) { + return defc == java.lang.reflect.Proxy.class; +- case "getBundle": +- case "clearCache": ++ } else if ("getBundle".equals(memName) || ++ "clearCache".equals(memName)) { + return defc == java.util.ResourceBundle.class; + } + return false; diff -r 3c80f4c091b5 -r ecfaffefd61b patches/boot/ecj-trywithresources.patch --- a/patches/boot/ecj-trywithresources.patch Wed Sep 05 11:38:00 2012 +0200 +++ b/patches/boot/ecj-trywithresources.patch Wed Oct 17 06:19:02 2012 +0100 @@ -1038,3 +1038,23 @@ } catch (IOException x) { } return result; +diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java +--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-10-17 03:17:03.331299684 +0100 ++++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-10-17 03:18:04.192329905 +0100 +@@ -1401,10 +1401,14 @@ + java.net.URLConnection uconn = tClass.getResource(tResource).openConnection(); + int len = uconn.getContentLength(); + byte[] bytes = new byte[len]; +- try (java.io.InputStream str = uconn.getInputStream()) { ++ java.io.InputStream str = null; ++ try { ++ str = uconn.getInputStream(); + int nr = str.read(bytes); + if (nr != len) throw new java.io.IOException(tResource); +- } ++ } finally { ++ str.close(); ++ } + values[0] = bytes; + } catch (java.io.IOException ex) { + throw new InternalError(ex.toString()); From andrew at icedtea.classpath.org Tue Oct 16 23:21:31 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 06:21:31 +0000 Subject: /hg/release/icedtea7-2.2: 3 new changesets Message-ID: changeset 25c37f34eaaf in /hg/release/icedtea7-2.2 details: http://icedtea.classpath.org/hg/release/icedtea7-2.2?cmd=changeset;node=25c37f34eaaf author: Andrew John Hughes date: Wed Oct 17 07:18:40 2012 +0100 Update NEWS. 2011-10-17 Andrew John Hughes * NEWS: Updated. changeset ae35ec0bd849 in /hg/release/icedtea7-2.2 details: http://icedtea.classpath.org/hg/release/icedtea7-2.2?cmd=changeset;node=ae35ec0bd849 author: Andrew John Hughes date: Wed Oct 17 07:19:50 2012 +0100 Update my e-mail address. 2011-10-17 Andrew John Hughes * AUTHORS: Update my e-mail address. * ChangeLog: Likewise. changeset 5be85097f377 in /hg/release/icedtea7-2.2 details: http://icedtea.classpath.org/hg/release/icedtea7-2.2?cmd=changeset;node=5be85097f377 author: Andrew John Hughes date: Wed Oct 17 07:20:42 2012 +0100 Prepare for 2.2.3. 2011-10-17 Andrew John Hughes * configure.ac: Bump to 2.2.3 proper. * NEWS: Add release date. diffstat: AUTHORS | 2 +- ChangeLog | 906 +++++++++++++++++++++++++++++----------------------------- NEWS | 36 ++- configure.ac | 2 +- 4 files changed, 497 insertions(+), 449 deletions(-) diffs (truncated from 3797 to 500 lines): diff -r ecfaffefd61b -r 5be85097f377 AUTHORS --- a/AUTHORS Wed Oct 17 06:19:02 2012 +0100 +++ b/AUTHORS Wed Oct 17 07:20:42 2012 +0100 @@ -14,7 +14,7 @@ Kyle Galloway Dennis Gilmore Andrew Haley -Andrew John Hughes +Andrew John Hughes Tomas Hurka Ioana Ivan Matthias Klose diff -r ecfaffefd61b -r 5be85097f377 ChangeLog --- a/ChangeLog Wed Oct 17 06:19:02 2012 +0100 +++ b/ChangeLog Wed Oct 17 07:20:42 2012 +0100 @@ -1,3 +1,17 @@ +2011-10-17 Andrew John Hughes + + * configure.ac: Bump to 2.2.3 proper. + * NEWS: Add release date. + +2011-10-17 Andrew John Hughes + + * AUTHORS: Update my e-mail address. + * ChangeLog: Likewise. + +2011-10-17 Andrew John Hughes + + * NEWS: Updated. + 2011-10-17 Andrew John Hughes * Makefile.am: @@ -33,17 +47,17 @@ * configure.ac: Remove the Xp header and library checks. -2011-09-03 Andrew John Hughes +2011-09-03 Andrew John Hughes * configure.ac: Bump to 2.2.3pre. * NEWS: Add new section. -2011-08-31 Andrew John Hughes +2011-08-31 Andrew John Hughes * configure.ac: Set to 2.2.2. * NEWS: Set release date for 2.2.2. -2011-08-31 Andrew John Hughes +2011-08-31 Andrew John Hughes * Makefile.am: (CORBA_CHANGESET): Update to 2.2 forest head. @@ -63,7 +77,7 @@ * NEWS: List fixes brought in by forest update. -2011-06-13 Andrew John Hughes +2011-06-13 Andrew John Hughes * NEWS: Add section for 2.2.2. * configure.ac: Bump to 2.2.2pre. @@ -96,28 +110,28 @@ * patches/boot/ecj-diamond.patch: Add additional cases due to 7143872. -2012-05-30 Andrew John Hughes +2012-05-30 Andrew John Hughes * configure.ac: Bump to 2.2.1pre. * NEWS: Add 2.2.1 section. -2012-05-30 Andrew John Hughes +2012-05-30 Andrew John Hughes * Makefile.am: (OPENJDK_VERSION): Bump to b21 (latest in 2.2 tree). -2012-05-30 Andrew John Hughes +2012-05-30 Andrew John Hughes * configure.ac: Set to 2.2 proper. * NEWS: Set release date of 2.2 -2012-05-30 Andrew John Hughes +2012-05-30 Andrew John Hughes * NEWS: Update with changes in the forest. -2012-05-30 Andrew John Hughes +2012-05-30 Andrew John Hughes * Makefile.am: (EXTRA_DIST): Add test/tapset. @@ -125,7 +139,7 @@ (clean-local): Remove clean-jtreg-reports. (clean-jtreg): Remove test/jtreg if empty. -2012-05-30 Andrew John Hughes +2012-05-30 Andrew John Hughes Include 2.2 tag. * Makefile.am: @@ -144,7 +158,7 @@ (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. -2012-05-23 Andrew John Hughes +2012-05-23 Andrew John Hughes Use 2.2 forest. * Makefile.am: @@ -169,11 +183,11 @@ * patches/boot/ecj-diamond.patch: Adjust case in UntrustedCertificates.java. -2012-05-23 Andrew John Hughes - - * NEWS: Updated. - -2012-05-23 Andrew John Hughes +2012-05-23 Andrew John Hughes + + * NEWS: Updated. + +2012-05-23 Andrew John Hughes * patches/boot/corba-defs.patch: Removed. Makes changes which aren't needed @@ -191,7 +205,7 @@ Don't set JAVACFLAGS to point to non-existent rt.jar in {JDK_HOME}/lib. Point to just-built langtools instead. -2011-03-02 Andrew John Hughes +2011-03-02 Andrew John Hughes * Makefile.am: (icedtea): Explicitly set -j1 for the @@ -202,13 +216,13 @@ (icedtea-debug): Likewise. (icedtea-ecj): Likewise. -2012-05-21 Andrew John Hughes +2012-05-21 Andrew John Hughes (JDK_CHANGESET): Bump to bring in the aliasing and wrap mode fixes. (JDK_SHA256SUM): Likewise. -2012-05-21 Andrew John Hughes +2012-05-21 Andrew John Hughes * AUTHORS: Add Ralph Sennhauser. @@ -233,7 +247,7 @@ * pax-mark-vm.in: Script to PaX mark a JDK image. -2012-05-02 Andrew John Hughes +2012-05-02 Andrew John Hughes Bump to jdk7u4 b13. * Makefile.am: @@ -259,7 +273,7 @@ * patches/boot/ecj-multicatch.patch: Likewise. * patches/boot/ecj-trywithresources.patch: Likewise. -2012-04-23 Andrew John Hughes +2012-04-23 Andrew John Hughes * Makefile.am: (HOTSPOT_CHANGESET): Bump to bring in @@ -268,20 +282,20 @@ (ICEDTEA_ENV): Set ALT_STRIP_POLICY to no_strip. -2012-04-12 Andrew John Hughes +2012-04-12 Andrew John Hughes * Makefile.am: (download-openjdk): Fix syntax. (download-cacao): Likewise. (download-jamvm): Likewise. -2012-04-11 Andrew John Hughes +2012-04-11 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bump to include GCC 4.7 build fixes. (JDK_SHA256SUM): Likewise. -2012-04-11 Andrew John Hughes +2012-04-11 Andrew John Hughes * Makefile.am: (download-openjdk): Don't download unless @@ -293,13 +307,13 @@ --disable-downloading. * configure.ac: Call IT_CHECK_FOR_DOWNLOADING. -2012-04-06 Andrew John Hughes +2012-04-06 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bump to include generalied crypto tests. (JDK_SHA256SUM): Likewise. -2012-04-06 Andrew John Hughes +2012-04-06 Andrew John Hughes * acinclude.m4: (IT_CHECK_FOR_GTK): Work with glib >= 2.32 @@ -316,13 +330,13 @@ * test/tapset/jstaptest.pl: thread_start and thread_stop thread id can be any positive number. -2012-03-23 Andrew John Hughes +2012-03-23 Andrew John Hughes * patches/boot/pr39408.patch, * patches/cacao/launcher.patch: Regenerated. -2012-03-22 Andrew John Hughes +2012-03-22 Andrew John Hughes * patches/systemtap-alloc-size-workaround.patch: Removed; upstream. @@ -614,17 +628,17 @@ (HOTSPOT_CHANGESET): Add latest Zero HS22 fixes. (HOTSPOT_SHA256SUM): Likewise. -2012-02-15 Andrew John Hughes +2012-02-15 Andrew John Hughes * NEWS: Add 2.0.1 and 2.1.0 release notes. * configure.ac: Bump to 2.2pre. -2012-02-14 Andrew John Hughes +2012-02-14 Andrew John Hughes * NEWS: Update with OpenJDK fixes and add release date for 2.1. -2012-02-14 Andrew John Hughes +2012-02-14 Andrew John Hughes (HOTSPOT_CHANGESET): Add latest fixes: 7140882, 7049339 and 7091528. @@ -645,20 +659,20 @@ to work with latest OpenJDK ALT_HOTSPOT_IMPORT_PATH functionality. * patches/cacao/version.patch: Removed, replaced by upstream CACAO changeset 30edcde287d9. -2012-02-08 Andrew John Hughes +2012-02-08 Andrew John Hughes (HOTSPOT_CHANGESET): Bump to fix HotSpot merge issue. (HOTSPOT_SHA256SUM): Likewise. -2012-02-08 Andrew John Hughes +2012-02-08 Andrew John Hughes * Makefile.am: Move JDK_UPDATE_VERSION and COMBINED_VERSION to top of file with OPENJDK_VERSION. (JDK_UPDATE_VERSION): Set to 02 for u2. -2012-02-08 Andrew John Hughes +2012-02-08 Andrew John Hughes * Makefile.am: (CORBA_CHANGESET): Updated. @@ -720,7 +734,7 @@ (HOTSPOT_CHANGESET): Updated. (HOTSPOT_SHA256SUM): Updated. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * NEWS: Move recent JamVM changes to correct section. Sync with 2.0. @@ -745,13 +759,13 @@ (JAMVM_VERSION): Updated JamVM to 2011-10-07 revision. (JAMVM_SHA256SUM): Updated. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * NEWS: Set release date of 2.0 and add section for 2.1. * configure.ac: Bump to 2.1pre. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * patches/cacao/6714758.patch: Removed; upstream. @@ -760,7 +774,7 @@ (extract-cacao): Use gzip not bzip2. (extract-jamvm): Explicitly use gzip. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * Makefile.am: Bring in security updates. (CORBA_CHANGESET): Updated. @@ -773,13 +787,13 @@ after 7046823 is applied. * NEWS: Updated. -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes * acinclude.m4: (IT_CHECK_FOR_GIO): Require 2.26 and above for GSettings. -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes Bump changesets to bring in fix which turns off forced -Werror. @@ -804,7 +818,7 @@ * Makefile.am: Upgrade CACAO version, use .tar.gz archive -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes * NEWS: Cleanup. @@ -832,14 +846,14 @@ (CACAO_VERSION): Updated CACAO to 2011-08-08 revision. (CACAO_SHA256SUM): Updated. -2010-11-19 Andrew John Hughes +2010-11-19 Andrew John Hughes * Makefile.am: (CACAO_BASE_URL): Switch to using IcedTea server for CACAO drops too. (CACAO_URL): Likewise. -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes * Makefile.am: (ICEDTEA_BOOT_PATCHES): Only apply @@ -851,20 +865,20 @@ 1.7 bytecode. * configure.ac: Call IT_BYTECODE7_CHECK. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * Makefile.am: (EXTRA_DIST): Remove patch directories that no longer exist. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * acinclude.m4: (AC_CHECK_FOR_JDK): Look for IcedTea7 JDKs. Don't check for IcedTea6 JDKs when bootstrapping until PR716 is fixed. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes PR790: Include JAXP, JAF and JAXWS sources directly in OpenJDK tree, removing the need for drop tarballs. @@ -919,7 +933,7 @@ * acinclude.m4: Add devel package suggestions for epoll/xattr check failure. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * acinclude.m4: Always quote using '[' and ']' in macro calls. @@ -929,7 +943,7 @@ (IT_CHECK_FOR_CUPS): Likewise. (IT_CHECK_FOR_SYSCALLS): Likewise. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * acinclude.m4: (IT_CHECK_FOR_SYSCALLS): Include checks @@ -955,7 +969,7 @@ (JAMVM_VERSION): Updated JamVM to 2011-09-24 revision. (JAMVM_SHA256SUM): Updated. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes PR717: Remove all non-bootstrap non-conditional patches. @@ -1014,14 +1028,14 @@ Updated against upstream disable-intree-ec. * NEWS: Updated. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Include Damian's compilation fix for building without USE_SYSTEM_CUPS. (JDK_SHA256SUM): Likewise. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes * Makefile.am: (ICEDTEA_ENV): Set COMPILE_AGAINST_SYSCALLS @@ -1032,7 +1046,7 @@ *at). * configure.ac: Call IT_CHECK_FOR_SYSCALLS. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bump to bring in latest @@ -1053,21 +1067,21 @@ Add calls to IT_CHECK_FOR_GTK, IT_CHECK_FOR_GIO, IT_CHECK_FOR_FONTCONFIG and IT_CHECK_FOR_CUPS. -2011-09-09 Andrew John Hughes +2011-09-09 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bring in fix for another duplicate gboolean definition. (JDK_SHA256SUM): Likewise. -2011-09-08 Andrew John Hughes +2011-09-08 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bring in fix for duplicate gboolean definition. (JDK_SHA256SUM): Likewise. -2011-09-06 Andrew John Hughes +2011-09-06 Andrew John Hughes * patches/hotspot-gcc-pr36917.patch: Redundant, was removed from IcedTea6. @@ -1158,12 +1172,12 @@ (JAMVM_VERSION): Updated JamVM to 2011-08-08 revision. (JAMVM_SHA256SUM): Updated. -2011-08-03 Andrew John Hughes +2011-08-03 Andrew John Hughes * NEWS: Updated with changes from Pavel's HotSpot update. -2011-08-03 Andrew John Hughes +2011-08-03 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Updated to bring in @@ -1171,7 +1185,7 @@ (JDK_SHA256SUM): Likewise. * NEWS: Updated. -2011-08-03 Andrew John Hughes +2011-08-03 Andrew John Hughes * Makefile.am: Apply explicit-inner-class-headers patch as required. @@ -1210,7 +1224,7 @@ (JAMVM_VERSION): Updated JamVM to 2011-08-01 revision. (JAMVM_SHA256SUM): Updated. -2011-07-29 Andrew John Hughes +2011-07-29 Andrew John Hughes PR717: All non-bootstrap patches in IcedTea7 should be in the forest or dropped @@ -1252,7 +1266,7 @@ against new forest. * NEWS: Updated. -2011-07-28 Andrew John Hughes +2011-07-28 Andrew John Hughes Bring in new JDK build cleanups and HotSpot fixes for Zero/Shark. @@ -1290,7 +1304,7 @@ (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. From andrew at icedtea.classpath.org Tue Oct 16 23:44:29 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 06:44:29 +0000 Subject: /hg/release/icedtea7-2.1: 3 new changesets Message-ID: changeset 82725f53704e in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=82725f53704e author: Andrew John Hughes date: Wed Oct 17 07:42:22 2012 +0100 Add 2012/10/16 security updates and update NEWS. 2011-10-17 Andrew John Hughes * Makefile.am: (CORBA_CHANGESET): Update to IcedTea7 2.1 forest head; the tag icedtea-2.1.3. (JAXP_CHANGESET): Likewise. (JAXWS_CHANGESET): Likewise. (JDK_CHANGESET): Likewise. (HOTSPOT_CHANGESET): Likewise. (LANGTOOLS_CHANGESET): Likewise. (OPENJDK_CHANGESET): Likewise. (CORBA_SHA256SUM): Likewise. (JAXP_SHA256SUM): Likewise. (JAXWS_SHA256SUM): Likewise. (JDK_SHA256SUM): Likewise. (HOTSPOT_SHA256SUM): Likewise. (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. * NEWS: Updated. * patches/boot/ecj-autoboxing.patch: Add additional case in java.lang.invoke.MethodHandleImpl. * patches/boot/ecj-diamond.patch: Add additional case in com.sun.beans.decoder.DocumentHandler. * patches/boot/ecj-stringswitch.patch: Add additional case in java.lang.invoke.MethodHandleNatives. * patches/boot/ecj-trywithresources.patch: Add additional case in java.lang.invoke.MethodHandleImpl. changeset 24cca27b5ed6 in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=24cca27b5ed6 author: Andrew John Hughes date: Wed Oct 17 07:43:18 2012 +0100 Update my e-mail address. 2011-10-17 Andrew John Hughes * AUTHORS: Update my e-mail address. * ChangeLog: Likewise. changeset 9e95e25150ad in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=9e95e25150ad author: Andrew John Hughes date: Wed Oct 17 07:44:02 2012 +0100 Prepare for 2.1.3. 2011-10-17 Andrew John Hughes * configure.ac: Bump to 2.1.3 proper. * NEWS: Add release date. diffstat: AUTHORS | 2 +- ChangeLog | 896 ++++++++++++++++--------------- Makefile.am | 28 +- NEWS | 36 +- configure.ac | 2 +- patches/boot/ecj-autoboxing.patch | 12 + patches/boot/ecj-diamond.patch | 17 + patches/boot/ecj-stringswitch.patch | 150 +++++ patches/boot/ecj-trywithresources.patch | 20 + 9 files changed, 719 insertions(+), 444 deletions(-) diffs (truncated from 3965 to 500 lines): diff -r 812a19049ddb -r 9e95e25150ad AUTHORS --- a/AUTHORS Wed Sep 05 11:48:34 2012 +0200 +++ b/AUTHORS Wed Oct 17 07:44:02 2012 +0100 @@ -14,7 +14,7 @@ Kyle Galloway Dennis Gilmore Andrew Haley -Andrew John Hughes +Andrew John Hughes Tomas Hurka Ioana Ivan Matthias Klose diff -r 812a19049ddb -r 9e95e25150ad ChangeLog --- a/ChangeLog Wed Sep 05 11:48:34 2012 +0200 +++ b/ChangeLog Wed Oct 17 07:44:02 2012 +0100 @@ -1,18 +1,60 @@ +2011-10-17 Andrew John Hughes + + * configure.ac: Bump to 2.1.3 proper. + * NEWS: Add release date. + +2011-10-17 Andrew John Hughes + + * AUTHORS: Update my e-mail address. + * ChangeLog: Likewise. + +2011-10-17 Andrew John Hughes + + * Makefile.am: + (CORBA_CHANGESET): Update to IcedTea7 2.1 forest head; + the tag icedtea-2.1.3. + (JAXP_CHANGESET): Likewise. + (JAXWS_CHANGESET): Likewise. + (JDK_CHANGESET): Likewise. + (HOTSPOT_CHANGESET): Likewise. + (LANGTOOLS_CHANGESET): Likewise. + (OPENJDK_CHANGESET): Likewise. + (CORBA_SHA256SUM): Likewise. + (JAXP_SHA256SUM): Likewise. + (JAXWS_SHA256SUM): Likewise. + (JDK_SHA256SUM): Likewise. + (HOTSPOT_SHA256SUM): Likewise. + (LANGTOOLS_SHA256SUM): Likewise. + (OPENJDK_SHA256SUM): Likewise. + * NEWS: Updated. + * patches/boot/ecj-autoboxing.patch: + Add additional case in + java.lang.invoke.MethodHandleImpl. + * patches/boot/ecj-diamond.patch: + Add additional case in + com.sun.beans.decoder.DocumentHandler. + * patches/boot/ecj-stringswitch.patch: + Add additional case in + java.lang.invoke.MethodHandleNatives. + * patches/boot/ecj-trywithresources.patch: + Add additional case in + java.lang.invoke.MethodHandleImpl. + 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. -2011-09-03 Andrew John Hughes +2011-09-03 Andrew John Hughes * configure.ac: Bump to 2.1.3pre. * NEWS: Add new section. -2011-09-02 Andrew John Hughes +2011-09-02 Andrew John Hughes * configure.ac: Set to 2.1.2. * NEWS: Set release date for 2.1.2. -2011-08-31 Andrew John Hughes +2011-08-31 Andrew John Hughes * Makefile.am: (CORBA_CHANGESET): Bring in security updates @@ -32,7 +74,7 @@ (OPENJDK_SHA256SUM): Likewise. * NEWS: Updated with new fixes. -2011-06-13 Andrew John Hughes +2011-06-13 Andrew John Hughes * NEWS: Add section for 2.1.2. * configure.ac: Bump to 2.1.2pre. @@ -74,13 +116,13 @@ (HOTSPOT_CHANGESET): Sync to HEAD. (HOTSPOT_SHA256SUM): Likewise. -2012-04-06 Andrew John Hughes +2012-04-06 Andrew John Hughes * acinclude.m4: (IT_CHECK_FOR_GTK): Work with glib >= 2.32 by explicitly asking for gthread. -2012-03-29 Andrew John Hughes +2012-03-29 Andrew John Hughes * Makefile.am: (HOTSPOT_CHANGESET): Sync to HEAD. @@ -93,23 +135,23 @@ PR885: IcedTea7 does not build scripting support * patches/rhino.patch: Added 'script' to list of modules built. -2011-02-15 Andrew John Hughes +2011-02-15 Andrew John Hughes * NEWS: Add section for 2.1.1. * configure.ac: Bump to 2.1.1pre. -2012-02-15 Andrew John Hughes +2012-02-15 Andrew John Hughes * Makefile.am: (JDK_UPDATE_VERSION): Set to 03 for u3. -2012-02-15 Andrew John Hughes +2012-02-15 Andrew John Hughes * NEWS: Set release date for 2.1 and list security fixes. * configure.ac: Bump to 2.1 proper. -2012-02-15 Andrew John Hughes +2012-02-15 Andrew John Hughes Move to 2.1 release branch. * Makefile.am: @@ -130,12 +172,12 @@ (ICEDTEA_PREFIX): Set to 2.1. (ICEDTEA_HG_URL): Use release tree. -2012-02-14 Andrew John Hughes +2012-02-14 Andrew John Hughes * NEWS: Update with OpenJDK fixes and add release date for 2.1. -2012-02-14 Andrew John Hughes +2012-02-14 Andrew John Hughes (HOTSPOT_CHANGESET): Add latest fixes: 7140882, 7049339 and 7091528. @@ -156,20 +198,20 @@ to work with latest OpenJDK ALT_HOTSPOT_IMPORT_PATH functionality. * patches/cacao/version.patch: Removed, replaced by upstream CACAO changeset 30edcde287d9. -2012-02-08 Andrew John Hughes +2012-02-08 Andrew John Hughes (HOTSPOT_CHANGESET): Bump to fix HotSpot merge issue. (HOTSPOT_SHA256SUM): Likewise. -2012-02-08 Andrew John Hughes +2012-02-08 Andrew John Hughes * Makefile.am: Move JDK_UPDATE_VERSION and COMBINED_VERSION to top of file with OPENJDK_VERSION. (JDK_UPDATE_VERSION): Set to 02 for u2. -2012-02-08 Andrew John Hughes +2012-02-08 Andrew John Hughes * Makefile.am: (CORBA_CHANGESET): Updated. @@ -231,7 +273,7 @@ (HOTSPOT_CHANGESET): Updated. (HOTSPOT_SHA256SUM): Updated. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * NEWS: Move recent JamVM changes to correct section. Sync with 2.0. @@ -256,13 +298,13 @@ (JAMVM_VERSION): Updated JamVM to 2011-10-07 revision. (JAMVM_SHA256SUM): Updated. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * NEWS: Set release date of 2.0 and add section for 2.1. * configure.ac: Bump to 2.1pre. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * patches/cacao/6714758.patch: Removed; upstream. @@ -271,7 +313,7 @@ (extract-cacao): Use gzip not bzip2. (extract-jamvm): Explicitly use gzip. -2011-10-19 Andrew John Hughes +2011-10-19 Andrew John Hughes * Makefile.am: Bring in security updates. (CORBA_CHANGESET): Updated. @@ -284,13 +326,13 @@ after 7046823 is applied. * NEWS: Updated. -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes * acinclude.m4: (IT_CHECK_FOR_GIO): Require 2.26 and above for GSettings. -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes Bump changesets to bring in fix which turns off forced -Werror. @@ -315,7 +357,7 @@ * Makefile.am: Upgrade CACAO version, use .tar.gz archive -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes * NEWS: Cleanup. @@ -343,14 +385,14 @@ (CACAO_VERSION): Updated CACAO to 2011-08-08 revision. (CACAO_SHA256SUM): Updated. -2010-11-19 Andrew John Hughes +2010-11-19 Andrew John Hughes * Makefile.am: (CACAO_BASE_URL): Switch to using IcedTea server for CACAO drops too. (CACAO_URL): Likewise. -2011-09-30 Andrew John Hughes +2011-09-30 Andrew John Hughes * Makefile.am: (ICEDTEA_BOOT_PATCHES): Only apply @@ -362,20 +404,20 @@ 1.7 bytecode. * configure.ac: Call IT_BYTECODE7_CHECK. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * Makefile.am: (EXTRA_DIST): Remove patch directories that no longer exist. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * acinclude.m4: (AC_CHECK_FOR_JDK): Look for IcedTea7 JDKs. Don't check for IcedTea6 JDKs when bootstrapping until PR716 is fixed. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes PR790: Include JAXP, JAF and JAXWS sources directly in OpenJDK tree, removing the need for drop tarballs. @@ -430,7 +472,7 @@ * acinclude.m4: Add devel package suggestions for epoll/xattr check failure. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * acinclude.m4: Always quote using '[' and ']' in macro calls. @@ -440,7 +482,7 @@ (IT_CHECK_FOR_CUPS): Likewise. (IT_CHECK_FOR_SYSCALLS): Likewise. -2011-09-27 Andrew John Hughes +2011-09-27 Andrew John Hughes * acinclude.m4: (IT_CHECK_FOR_SYSCALLS): Include checks @@ -466,7 +508,7 @@ (JAMVM_VERSION): Updated JamVM to 2011-09-24 revision. (JAMVM_SHA256SUM): Updated. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes PR717: Remove all non-bootstrap non-conditional patches. @@ -525,14 +567,14 @@ Updated against upstream disable-intree-ec. * NEWS: Updated. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Include Damian's compilation fix for building without USE_SYSTEM_CUPS. (JDK_SHA256SUM): Likewise. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes * Makefile.am: (ICEDTEA_ENV): Set COMPILE_AGAINST_SYSCALLS @@ -543,7 +585,7 @@ *at). * configure.ac: Call IT_CHECK_FOR_SYSCALLS. -2011-09-21 Andrew John Hughes +2011-09-21 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bump to bring in latest @@ -564,21 +606,21 @@ Add calls to IT_CHECK_FOR_GTK, IT_CHECK_FOR_GIO, IT_CHECK_FOR_FONTCONFIG and IT_CHECK_FOR_CUPS. -2011-09-09 Andrew John Hughes +2011-09-09 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bring in fix for another duplicate gboolean definition. (JDK_SHA256SUM): Likewise. -2011-09-08 Andrew John Hughes +2011-09-08 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Bring in fix for duplicate gboolean definition. (JDK_SHA256SUM): Likewise. -2011-09-06 Andrew John Hughes +2011-09-06 Andrew John Hughes * patches/hotspot-gcc-pr36917.patch: Redundant, was removed from IcedTea6. @@ -669,12 +711,12 @@ (JAMVM_VERSION): Updated JamVM to 2011-08-08 revision. (JAMVM_SHA256SUM): Updated. -2011-08-03 Andrew John Hughes +2011-08-03 Andrew John Hughes * NEWS: Updated with changes from Pavel's HotSpot update. -2011-08-03 Andrew John Hughes +2011-08-03 Andrew John Hughes * Makefile.am: (JDK_CHANGESET): Updated to bring in @@ -682,7 +724,7 @@ (JDK_SHA256SUM): Likewise. * NEWS: Updated. -2011-08-03 Andrew John Hughes +2011-08-03 Andrew John Hughes * Makefile.am: Apply explicit-inner-class-headers patch as required. @@ -721,7 +763,7 @@ (JAMVM_VERSION): Updated JamVM to 2011-08-01 revision. (JAMVM_SHA256SUM): Updated. -2011-07-29 Andrew John Hughes +2011-07-29 Andrew John Hughes PR717: All non-bootstrap patches in IcedTea7 should be in the forest or dropped @@ -763,7 +805,7 @@ against new forest. * NEWS: Updated. -2011-07-28 Andrew John Hughes +2011-07-28 Andrew John Hughes Bring in new JDK build cleanups and HotSpot fixes for Zero/Shark. @@ -801,7 +843,7 @@ (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. -2011-07-13 Andrew John Hughes +2011-07-13 Andrew John Hughes * Makefile.am: (bootstrap-directory-stage1): Only use @@ -811,7 +853,7 @@ -Xbootclasspath and set JAVAH_SUPPORTS_X_OPTIONS if so. -2011-07-13 Andrew John Hughes +2011-07-13 Andrew John Hughes Bump to b147. * Makefile.am: @@ -845,7 +887,7 @@ * patches/boot/ecj-stringswitch.patch: Likewise and add new cases. -2011-07-12 Andrew John Hughes +2011-07-12 Andrew John Hughes * Makefile.am: (CORBA_SHA256SUM): Updated after removal of @@ -866,14 +908,14 @@ * HACKING: Updated. * NEWS: Updated. -2011-07-05 Andrew John Hughes +2011-07-05 Andrew John Hughes PR icedtea/751: (ICEDTEA_BOOT_PATCHES): Make application of javah.patch dependent on javah presenting with bug 40188. -2011-07-05 Andrew John Hughes +2011-07-05 Andrew John Hughes PR icedtea/751 * Makefile.am: @@ -890,7 +932,7 @@ * patches/boot/hotspot-jdk-dependency.patch: Include the *nix-specific code in solaris/classes. -2011-06-29 Andrew John Hughes +2011-06-29 Andrew John Hughes * acinclude.m4: (IT_FIND_JAVA): Check that the binary is also @@ -900,7 +942,7 @@ (IT_FIND_RMIC): Likewise. (IT_FIND_NATIVE2ASCII): Likewise. -2011-06-28 Andrew John Hughes +2011-06-28 Andrew John Hughes * Makefile.am, (HOTSPOT_CHANGESET): Update to bring in Linux 3 fix.. @@ -942,7 +984,7 @@ (stamps/patch-fsg.stamp): Depend on stamps/extract.stamp. Unbreak JamVM and CACAO builds by fixing the dependency chain. -2011-06-24 Andrew John Hughes +2011-06-24 Andrew John Hughes * patches/rmi_amd64.patch: Removed, upsteam (OpenJDK). @@ -1014,19 +1056,19 @@ (JAMVM_VERSION): Updated JamVM to 2011-04-28 revision. (JAMVM_SHA256SUM): Updated. -2011-05-27 Andrew John Hughes +2011-05-27 Andrew John Hughes * NEWS: Add 2.0. * configure.ac: Bump to 2.0pre. -2011-05-25 Andrew John Hughes +2011-05-25 Andrew John Hughes * NEWS: Updated with changes since 1.13 and added URL key from IcedTea6. * configure.ac: Bump to 1.14 proper. -2011-05-25 Andrew John Hughes +2011-05-25 Andrew John Hughes * Makefile.am: (ENDORSED_DIR): Removed. @@ -1052,7 +1094,7 @@ Remove addition of $(ENDORSED) to jvmti.make. -2011-05-25 Andrew John Hughes +2011-05-25 Andrew John Hughes Fix make distcheck. * Makefile.am: @@ -1064,12 +1106,12 @@ and use full path. (clean-add-jamvm-debug): Likewise for debug mode. -2011-05-25 Andrew John Hughes +2011-05-25 Andrew John Hughes From andrew at icedtea.classpath.org Wed Oct 17 00:21:20 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 07:21:20 +0000 Subject: /hg/release/icedtea7-forest-2.2/hotspot: 3 new changesets Message-ID: changeset faa9578346b9 in /hg/release/icedtea7-forest-2.2/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/hotspot?cmd=changeset;node=faa9578346b9 author: coleenp date: Wed Oct 17 08:20:10 2012 +0100 7158800: Improve storage of symbol tables Summary: Use an alternate version of hashing algorithm for symbol string tables and after a certain bucket size to improve performance Reviewed-by: pbk, kamg, dlong, kvn, fparain changeset fe641a4f943d in /hg/release/icedtea7-forest-2.2/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/hotspot?cmd=changeset;node=fe641a4f943d author: andrew date: Wed Oct 17 08:20:36 2012 +0100 Removed tag icedtea-2.2.3 changeset 1a3dc05d59c2 in /hg/release/icedtea7-forest-2.2/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.2/hotspot?cmd=changeset;node=1a3dc05d59c2 author: andrew date: Wed Oct 17 08:20:41 2012 +0100 Added tag icedtea-2.2.3 for changeset fe641a4f943d diffstat: .hgtags | 4 + src/share/vm/classfile/altHashing.cpp | 304 + src/share/vm/classfile/altHashing.hpp | 62 + src/share/vm/classfile/javaClasses.cpp | 22 +- src/share/vm/classfile/javaClasses.hpp | 24 +- src/share/vm/classfile/symbolTable.cpp | 153 +- src/share/vm/classfile/symbolTable.hpp | 38 +- src/share/vm/memory/dump.cpp | 6 +- src/share/vm/prims/jni.cpp | 2 + src/share/vm/runtime/globals.hpp | 3 + src/share/vm/runtime/init.cpp | 5 + src/share/vm/runtime/safepoint.cpp | 17 +- src/share/vm/utilities/hashtable.cpp | 51 +- src/share/vm/utilities/hashtable.hpp | 39 +- src/share/vm/utilities/hashtable.inline.hpp | 23 +- test/runtime/7158800/BadUtf8.java | 1254 + test/runtime/7158800/InternTest.java | 80 + test/runtime/7158800/Test7158800.sh | 91 + test/runtime/7158800/badstrings.txt | 30001 ++++++++++++++++++++++++++ 19 files changed, 32124 insertions(+), 55 deletions(-) diffs (truncated from 32604 to 500 lines): diff -r 864418cd5667 -r 1a3dc05d59c2 .hgtags --- a/.hgtags Tue Oct 16 21:31:10 2012 +0100 +++ b/.hgtags Wed Oct 17 08:20:41 2012 +0100 @@ -284,3 +284,7 @@ 158d5b869cf10d5817f236d3b68985990b0d4040 icedtea-2.2.1 7943ec1a82248f5f7ad998eac5168e0c0223827a icedtea-2.2.2 043ccbc6b82c6f5f9cc8e216cd41ea204d877a4a icedtea-2.2.3 +043ccbc6b82c6f5f9cc8e216cd41ea204d877a4a icedtea-2.2.3 +0000000000000000000000000000000000000000 icedtea-2.2.3 +0000000000000000000000000000000000000000 icedtea-2.2.3 +fe641a4f943d914e50b3a984eb9ab12b680d635a icedtea-2.2.3 diff -r 864418cd5667 -r 1a3dc05d59c2 src/share/vm/classfile/altHashing.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/vm/classfile/altHashing.cpp Wed Oct 17 08:20:41 2012 +0100 @@ -0,0 +1,304 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "classfile/altHashing.hpp" +#include "classfile/symbolTable.hpp" +#include "classfile/systemDictionary.hpp" +#include "oops/markOop.hpp" +#include "runtime/thread.hpp" + +// Get the hash code of the classes mirror if it exists, otherwise just +// return a random number, which is one of the possible hash code used for +// objects. We don't want to call the synchronizer hash code to install +// this value because it may safepoint. +intptr_t object_hash(klassOop k) { + intptr_t hc = k->java_mirror()->mark()->hash(); + return hc != markOopDesc::no_hash ? hc : os::random(); +} + +// Seed value used for each alternative hash calculated. +jint AltHashing::compute_seed() { + jlong nanos = os::javaTimeNanos(); + jlong now = os::javaTimeMillis(); + jint SEED_MATERIAL[8] = { + (jint) object_hash(SystemDictionary::String_klass()), + (jint) object_hash(SystemDictionary::System_klass()), + (jint) os::random(), // current thread isn't a java thread + (jint) (((julong)nanos) >> 32), + (jint) nanos, + (jint) (((julong)now) >> 32), + (jint) now, + (jint) (os::javaTimeNanos() >> 2) + }; + + return murmur3_32(SEED_MATERIAL, 8); +} + + +// Murmur3 hashing for Symbol +jint AltHashing::murmur3_32(jint seed, const jbyte* data, int len) { + jint h1 = seed; + int count = len; + int offset = 0; + + // body + while (count >= 4) { + jint k1 = (data[offset] & 0x0FF) + | (data[offset + 1] & 0x0FF) << 8 + | (data[offset + 2] & 0x0FF) << 16 + | data[offset + 3] << 24; + + count -= 4; + offset += 4; + + k1 *= 0xcc9e2d51; + k1 = Integer_rotateLeft(k1, 15); + k1 *= 0x1b873593; + + h1 ^= k1; + h1 = Integer_rotateLeft(h1, 13); + h1 = h1 * 5 + 0xe6546b64; + } + + // tail + + if (count > 0) { + jint k1 = 0; + + switch (count) { + case 3: + k1 ^= (data[offset + 2] & 0xff) << 16; + // fall through + case 2: + k1 ^= (data[offset + 1] & 0xff) << 8; + // fall through + case 1: + k1 ^= (data[offset] & 0xff); + // fall through + default: + k1 *= 0xcc9e2d51; + k1 = Integer_rotateLeft(k1, 15); + k1 *= 0x1b873593; + h1 ^= k1; + } + } + + // finalization + h1 ^= len; + + // finalization mix force all bits of a hash block to avalanche + h1 ^= ((unsigned int)h1) >> 16; + h1 *= 0x85ebca6b; + h1 ^= ((unsigned int)h1) >> 13; + h1 *= 0xc2b2ae35; + h1 ^= ((unsigned int)h1) >> 16; + + return h1; +} + +// Murmur3 hashing for Strings +jint AltHashing::murmur3_32(jint seed, const jchar* data, int len) { + jint h1 = seed; + + int off = 0; + int count = len; + + // body + while (count >= 2) { + jchar d1 = data[off++] & 0xFFFF; + jchar d2 = data[off++]; + jint k1 = (d1 | d2 << 16); + + count -= 2; + + k1 *= 0xcc9e2d51; + k1 = Integer_rotateLeft(k1, 15); + k1 *= 0x1b873593; + + h1 ^= k1; + h1 = Integer_rotateLeft(h1, 13); + h1 = h1 * 5 + 0xe6546b64; + } + + // tail + + if (count > 0) { + int k1 = data[off]; + + k1 *= 0xcc9e2d51; + k1 = Integer_rotateLeft(k1, 15); + k1 *= 0x1b873593; + h1 ^= k1; + } + + // finalization + h1 ^= len * 2; // (Character.SIZE / Byte.SIZE); + + // finalization mix force all bits of a hash block to avalanche + h1 ^= ((unsigned int)h1) >> 16; + h1 *= 0x85ebca6b; + h1 ^= ((unsigned int)h1) >> 13; + h1 *= 0xc2b2ae35; + h1 ^= ((unsigned int)h1) >> 16; + + return h1; +} + +// Hash used for the seed. +jint AltHashing::murmur3_32(jint seed, const int* data, int len) { + jint h1 = seed; + + int off = 0; + int end = len; + + // body + while (off < end) { + jint k1 = data[off++]; + + k1 *= 0xcc9e2d51; + k1 = Integer_rotateLeft(k1, 15); + k1 *= 0x1b873593; + + h1 ^= k1; + h1 = Integer_rotateLeft(h1, 13); + h1 = h1 * 5 + 0xe6546b64; + } + + // tail (always empty, as body is always 32-bit chunks) + + // finalization + + h1 ^= len * 4; // (Integer.SIZE / Byte.SIZE); + + // finalization mix force all bits of a hash block to avalanche + h1 ^= ((juint)h1) >> 16; + h1 *= 0x85ebca6b; + h1 ^= ((juint)h1) >> 13; + h1 *= 0xc2b2ae35; + h1 ^= ((juint)h1) >> 16; + + return h1; +} + +jint AltHashing::murmur3_32(const int* data, int len) { + return murmur3_32(0, data, len); +} + +#ifndef PRODUCT +// Overloaded versions for internal test. +jint AltHashing::murmur3_32(const jbyte* data, int len) { + return murmur3_32(0, data, len); +} + +jint AltHashing::murmur3_32(const jchar* data, int len) { + return murmur3_32(0, data, len); +} + +// Internal test for alternate hashing. Translated from JDK version +// test/sun/misc/Hashing.java +static const jbyte ONE_BYTE[] = { (jbyte) 0x80}; +static const jbyte TWO_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81}; +static const jchar ONE_CHAR[] = { (jchar) 0x8180}; +static const jbyte THREE_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82}; +static const jbyte FOUR_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83}; +static const jchar TWO_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382}; +static const jint ONE_INT[] = { 0x83828180}; +static const jbyte SIX_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83, (jbyte) 0x84, (jbyte) 0x85}; +static const jchar THREE_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382, (jchar) 0x8584}; +static const jbyte EIGHT_BYTE[] = { + (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, + (jbyte) 0x83, (jbyte) 0x84, (jbyte) 0x85, + (jbyte) 0x86, (jbyte) 0x87}; +static const jchar FOUR_CHAR[] = { + (jchar) 0x8180, (jchar) 0x8382, + (jchar) 0x8584, (jchar) 0x8786}; + +static const jint TWO_INT[] = { 0x83828180, 0x87868584}; + +static const juint MURMUR3_32_X86_CHECK_VALUE = 0xB0F57EE3; + +void AltHashing::testMurmur3_32_ByteArray() { + // printf("testMurmur3_32_ByteArray\n"); + + jbyte* vector = new jbyte[256]; + jbyte* hashes = new jbyte[4 * 256]; + + for (int i = 0; i < 256; i++) { + vector[i] = (jbyte) i; + } + + // Hash subranges {}, {0}, {0,1}, {0,1,2}, ..., {0,...,255} + for (int i = 0; i < 256; i++) { + jint hash = murmur3_32(256 - i, vector, i); + hashes[i * 4] = (jbyte) hash; + hashes[i * 4 + 1] = (jbyte) (((juint)hash) >> 8); + hashes[i * 4 + 2] = (jbyte) (((juint)hash) >> 16); + hashes[i * 4 + 3] = (jbyte) (((juint)hash) >> 24); + } + + // hash to get const result. + juint final_hash = murmur3_32(hashes, 4*256); + + assert (MURMUR3_32_X86_CHECK_VALUE == final_hash, + err_msg( + "Calculated hash result not as expected. Expected %08X got %08X\n", + MURMUR3_32_X86_CHECK_VALUE, + final_hash)); +} + +void AltHashing::testEquivalentHashes() { + jint jbytes, jchars, ints; + + // printf("testEquivalentHashes\n"); + + jbytes = murmur3_32(TWO_BYTE, 2); + jchars = murmur3_32(ONE_CHAR, 1); + assert (jbytes == jchars, + err_msg("Hashes did not match. b:%08x != c:%08x\n", jbytes, jchars)); + + jbytes = murmur3_32(FOUR_BYTE, 4); + jchars = murmur3_32(TWO_CHAR, 2); + ints = murmur3_32(ONE_INT, 1); + assert ((jbytes == jchars) && (jbytes == ints), + err_msg("Hashes did not match. b:%08x != c:%08x != i:%08x\n", jbytes, jchars, ints)); + + jbytes = murmur3_32(SIX_BYTE, 6); + jchars = murmur3_32(THREE_CHAR, 3); + assert (jbytes == jchars, + err_msg("Hashes did not match. b:%08x != c:%08x\n", jbytes, jchars)); + + jbytes = murmur3_32(EIGHT_BYTE, 8); + jchars = murmur3_32(FOUR_CHAR, 4); + ints = murmur3_32(TWO_INT, 2); + assert ((jbytes == jchars) && (jbytes == ints), + err_msg("Hashes did not match. b:%08x != c:%08x != i:%08x\n", jbytes, jchars, ints)); +} + +// Returns true if the alternate hashcode is correct +void AltHashing::test_alt_hash() { + testMurmur3_32_ByteArray(); + testEquivalentHashes(); +} +#endif // PRODUCT diff -r 864418cd5667 -r 1a3dc05d59c2 src/share/vm/classfile/altHashing.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/vm/classfile/altHashing.hpp Wed Oct 17 08:20:41 2012 +0100 @@ -0,0 +1,62 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_VM_CLASSFILE_ALTHASHING_HPP +#define SHARE_VM_CLASSFILE_ALTHASHING_HPP + +#include "prims/jni.h" +#include "classfile/symbolTable.hpp" + +/** + * Hashing utilities. + * + * Implementation of Murmur3 hashing. + * This code was translated from src/share/classes/sun/misc/Hashing.java + * code in the JDK. + */ + +class AltHashing : AllStatic { + + // utility function copied from java/lang/Integer + static jint Integer_rotateLeft(jint i, int distance) { + return (i << distance) | (((juint)i) >> (32-distance)); + } + static jint murmur3_32(const int* data, int len); + static jint murmur3_32(jint seed, const int* data, int len); + +#ifndef PRODUCT + // Hashing functions used for internal testing + static jint murmur3_32(const jbyte* data, int len); + static jint murmur3_32(const jchar* data, int len); + static void testMurmur3_32_ByteArray(); + static void testEquivalentHashes(); +#endif // PRODUCT + + public: + static jint compute_seed(); + static jint murmur3_32(jint seed, const jbyte* data, int len); + static jint murmur3_32(jint seed, const jchar* data, int len); + NOT_PRODUCT(static void test_alt_hash();) +}; +#endif // SHARE_VM_CLASSFILE_ALTHASHING_HPP diff -r 864418cd5667 -r 1a3dc05d59c2 src/share/vm/classfile/javaClasses.cpp --- a/src/share/vm/classfile/javaClasses.cpp Tue Oct 16 21:31:10 2012 +0100 +++ b/src/share/vm/classfile/javaClasses.cpp Wed Oct 17 08:20:41 2012 +0100 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "classfile/altHashing.hpp" #include "classfile/javaClasses.hpp" #include "classfile/symbolTable.hpp" #include "classfile/vmSymbols.hpp" @@ -327,13 +328,26 @@ return result; } -unsigned int java_lang_String::hash_string(oop java_string) { +unsigned int java_lang_String::to_hash(oop java_string) { + int length = java_lang_String::length(java_string); + // Zero length string will hash to zero with String.toHash() function. + if (length == 0) return 0; + typeArrayOop value = java_lang_String::value(java_string); int offset = java_lang_String::offset(java_string); + return java_lang_String::to_hash(value->char_at_addr(offset), length); +} + +unsigned int java_lang_String::hash_string(oop java_string) { int length = java_lang_String::length(java_string); - - if (length == 0) return 0; - return hash_string(value->char_at_addr(offset), length); + // Zero length string doesn't hash necessarily hash to zero. + if (length == 0) { + return StringTable::hash_string(NULL, 0); + } + + typeArrayOop value = java_lang_String::value(java_string); + int offset = java_lang_String::offset(java_string); + return StringTable::hash_string(value->char_at_addr(offset), length); } Symbol* java_lang_String::as_symbol(Handle java_string, TRAPS) { diff -r 864418cd5667 -r 1a3dc05d59c2 src/share/vm/classfile/javaClasses.hpp --- a/src/share/vm/classfile/javaClasses.hpp Tue Oct 16 21:31:10 2012 +0100 +++ b/src/share/vm/classfile/javaClasses.hpp Wed Oct 17 08:20:41 2012 +0100 @@ -110,20 +110,16 @@ static jchar* as_unicode_string(oop java_string, int& length); // Compute the hash value for a java.lang.String object which would - // contain the characters passed in. This hash value is used for at - // least two purposes. + // contain the characters passed in. // - // (a) As the hash value used by the StringTable for bucket selection - // and comparison (stored in the HashtableEntry structures). This - // is used in the String.intern() method. + // As the hash value used by the String object itself, in + // String.hashCode(). This value is normally calculated in Java code + // in the String.hashCode method(), but is precomputed for String + // objects in the shared archive file. + // hash P(31) from Kernighan & Ritchie // - // (b) As the hash value used by the String object itself, in - // String.hashCode(). This value is normally calculate in Java code - // in the String.hashCode method(), but is precomputed for String - // objects in the shared archive file. - // - // For this reason, THIS ALGORITHM MUST MATCH String.hashCode(). - static unsigned int hash_string(jchar* s, int len) { + // For this reason, THIS ALGORITHM MUST MATCH String.toHash(). + template static unsigned int to_hash(T* s, int len) { unsigned int h = 0; while (len-- > 0) { h = 31*h + (unsigned int) *s; @@ -131,6 +127,10 @@ } return h; } + static unsigned int to_hash(oop java_string); + + // This is the string hash code used by the StringTable, which may be + // the same as String.toHash or an alternate hash code. static unsigned int hash_string(oop java_string); static bool equals(oop java_string, jchar* chars, int len); diff -r 864418cd5667 -r 1a3dc05d59c2 src/share/vm/classfile/symbolTable.cpp --- a/src/share/vm/classfile/symbolTable.cpp Tue Oct 16 21:31:10 2012 +0100 +++ b/src/share/vm/classfile/symbolTable.cpp Wed Oct 17 08:20:41 2012 +0100 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "classfile/altHashing.hpp" #include "classfile/javaClasses.hpp" #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" @@ -33,10 +34,13 @@ #include "oops/oop.inline2.hpp" #include "runtime/mutexLocker.hpp" #include "utilities/hashtable.inline.hpp" +#include "utilities/numberSeq.hpp" // -------------------------------------------------------------------------- SymbolTable* SymbolTable::_the_table = NULL; +bool SymbolTable::_needs_rehashing = false; +jint SymbolTable::_seed = 0; Symbol* SymbolTable::allocate_symbol(const u1* name, int len, TRAPS) { // Don't allow symbols to be created which cannot fit in a Symbol*. @@ -120,12 +124,41 @@ } } +unsigned int SymbolTable::new_hash(Symbol* sym) { From andrew at icedtea.classpath.org Wed Oct 17 00:51:43 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 07:51:43 +0000 Subject: /hg/release/icedtea7-2.2: S7158800: Improve storage of symbol ta... Message-ID: changeset e0645102f9be in /hg/release/icedtea7-2.2 details: http://icedtea.classpath.org/hg/release/icedtea7-2.2?cmd=changeset;node=e0645102f9be author: Andrew John Hughes date: Wed Oct 17 08:51:31 2012 +0100 S7158800: Improve storage of symbol tables 2011-10-17 Andrew John Hughes * Makefile.am: (HOTSPOT_CHANGESET): Update to bring in S7158800. (HOTSPOT_SHA256SUM): Likewise. * NEWS: Move S7158800 to backports now it's actually included... diffstat: ChangeLog | 9 +++++++++ Makefile.am | 4 ++-- NEWS | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diffs (55 lines): diff -r 5be85097f377 -r e0645102f9be ChangeLog --- a/ChangeLog Wed Oct 17 07:20:42 2012 +0100 +++ b/ChangeLog Wed Oct 17 08:51:31 2012 +0100 @@ -1,3 +1,12 @@ +2011-10-17 Andrew John Hughes + + * Makefile.am: + (HOTSPOT_CHANGESET): Update to bring in + S7158800. + (HOTSPOT_SHA256SUM): Likewise. + * NEWS: Move S7158800 to backports now it's + actually included... + 2011-10-17 Andrew John Hughes * configure.ac: Bump to 2.2.3 proper. diff -r 5be85097f377 -r e0645102f9be Makefile.am --- a/Makefile.am Wed Oct 17 07:20:42 2012 +0100 +++ b/Makefile.am Wed Oct 17 08:51:31 2012 +0100 @@ -5,7 +5,7 @@ COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION) CORBA_CHANGESET = 12fee4f9ac22 -HOTSPOT_CHANGESET = 864418cd5667 +HOTSPOT_CHANGESET = 1a3dc05d59c2 JAXP_CHANGESET = dc64245ac19d JAXWS_CHANGESET = b41293d57940 JDK_CHANGESET = 4cf358fd012a @@ -13,7 +13,7 @@ OPENJDK_CHANGESET = 32574ae3c2be CORBA_SHA256SUM = bf314ffe9993f70ef9a0449b5c540883935b6326e28ee5afdc44f062039e0303 -HOTSPOT_SHA256SUM = 85b0ff446da7f05cd8e2f6902d86fcb109b347db858791e3afcf315ce5ef2942 +HOTSPOT_SHA256SUM = 7a54b49cfd6ae6a4cc8aaba042f96e1622cf88f6ba0ffc61bbc36cc164a5d096 JAXP_SHA256SUM = 5003576ed427cae1dda7ccf7c1af042ea8f62ad668e176583a84fba989f77e32 JAXWS_SHA256SUM = a3bf4ec265fd044a5abce35dfc51b1977826a21bd13abe05a8336f25e8a8dd21 JDK_SHA256SUM = 5cd45b036269d35ec916e0b99977a87d2a2addefe9aa2058fbc05d0269cd9008 diff -r 5be85097f377 -r e0645102f9be NEWS --- a/NEWS Wed Oct 17 07:20:42 2012 +0100 +++ b/NEWS Wed Oct 17 08:51:31 2012 +0100 @@ -35,13 +35,13 @@ - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance - S7196190, CVE-2012-5088: Improve method of handling MethodHandles - S7198296, CVE-2012-5089: Refactor classloader usage - - S7158800: Improve storage of symbol tables - S7158801: Improve VM CompileOnly option - S7158804: Improve config file parsing - S7198606, CVE-2012-4416: Improve VM optimization * Backports - S7175845: "jar uf" changes file permissions unexpectedly - S7177216: native2ascii changes file permissions of input file + - S7158800: Improve storage of symbol tables * Bug fixes - Remove merge artefact. - Remove the Xp header and library checks. From andrew at icedtea.classpath.org Wed Oct 17 00:52:44 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 07:52:44 +0000 Subject: /hg/release/icedtea7-forest-2.1/hotspot: 3 new changesets Message-ID: changeset d28c14c79ddf in /hg/release/icedtea7-forest-2.1/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot?cmd=changeset;node=d28c14c79ddf author: andrew date: Wed Oct 17 08:21:35 2012 +0100 Removed tag icedtea-2.1.3 changeset 96ba7edfedfa in /hg/release/icedtea7-forest-2.1/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot?cmd=changeset;node=96ba7edfedfa author: coleenp date: Wed Oct 17 08:52:25 2012 +0100 7158800: Improve storage of symbol tables Summary: Use an alternate version of hashing algorithm for symbol string tables and after a certain bucket size to improve performance Reviewed-by: pbk, kamg, dlong, kvn, fparain changeset a456d0771ba0 in /hg/release/icedtea7-forest-2.1/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot?cmd=changeset;node=a456d0771ba0 author: andrew date: Wed Oct 17 08:52:30 2012 +0100 Added tag icedtea-2.1.3 for changeset 96ba7edfedfa diffstat: .hgtags | 4 + src/share/vm/classfile/altHashing.cpp | 304 + src/share/vm/classfile/altHashing.hpp | 62 + src/share/vm/classfile/javaClasses.cpp | 22 +- src/share/vm/classfile/javaClasses.hpp | 24 +- src/share/vm/classfile/symbolTable.cpp | 153 +- src/share/vm/classfile/symbolTable.hpp | 38 +- src/share/vm/memory/dump.cpp | 6 +- src/share/vm/prims/jni.cpp | 1 + src/share/vm/runtime/globals.hpp | 3 + src/share/vm/runtime/init.cpp | 5 + src/share/vm/runtime/safepoint.cpp | 17 +- src/share/vm/utilities/hashtable.cpp | 51 +- src/share/vm/utilities/hashtable.hpp | 39 +- src/share/vm/utilities/hashtable.inline.hpp | 23 +- test/runtime/7158800/BadUtf8.java | 1254 + test/runtime/7158800/InternTest.java | 80 + test/runtime/7158800/Test7158800.sh | 91 + test/runtime/7158800/badstrings.txt | 30001 ++++++++++++++++++++++++++ 19 files changed, 32123 insertions(+), 55 deletions(-) diffs (truncated from 32596 to 500 lines): diff -r 767fdaea4155 -r a456d0771ba0 .hgtags --- a/.hgtags Tue Oct 16 21:33:00 2012 +0100 +++ b/.hgtags Wed Oct 17 08:52:30 2012 +0100 @@ -221,3 +221,7 @@ 8b7c4c5f6ba9a0a7e8114d886a574d99827934a1 icedtea-2.1.1 fbe959dad801cae4c21edcd4afdc0e030f1d07b4 icedtea-2.1.2 5da7e3791b0d3b2930dffa33e51c73fb93697a41 icedtea-2.1.3 +5da7e3791b0d3b2930dffa33e51c73fb93697a41 icedtea-2.1.3 +0000000000000000000000000000000000000000 icedtea-2.1.3 +0000000000000000000000000000000000000000 icedtea-2.1.3 +96ba7edfedfab0ed332b24cdb161e73e3add5482 icedtea-2.1.3 diff -r 767fdaea4155 -r a456d0771ba0 src/share/vm/classfile/altHashing.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/vm/classfile/altHashing.cpp Wed Oct 17 08:52:30 2012 +0100 @@ -0,0 +1,304 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "classfile/altHashing.hpp" +#include "classfile/symbolTable.hpp" +#include "classfile/systemDictionary.hpp" +#include "oops/markOop.hpp" +#include "runtime/thread.hpp" + +// Get the hash code of the classes mirror if it exists, otherwise just +// return a random number, which is one of the possible hash code used for +// objects. We don't want to call the synchronizer hash code to install +// this value because it may safepoint. +intptr_t object_hash(klassOop k) { + intptr_t hc = k->java_mirror()->mark()->hash(); + return hc != markOopDesc::no_hash ? hc : os::random(); +} + +// Seed value used for each alternative hash calculated. +jint AltHashing::compute_seed() { + jlong nanos = os::javaTimeNanos(); + jlong now = os::javaTimeMillis(); + jint SEED_MATERIAL[8] = { + (jint) object_hash(SystemDictionary::String_klass()), + (jint) object_hash(SystemDictionary::System_klass()), + (jint) os::random(), // current thread isn't a java thread + (jint) (((julong)nanos) >> 32), + (jint) nanos, + (jint) (((julong)now) >> 32), + (jint) now, + (jint) (os::javaTimeNanos() >> 2) + }; + + return murmur3_32(SEED_MATERIAL, 8); +} + + +// Murmur3 hashing for Symbol +jint AltHashing::murmur3_32(jint seed, const jbyte* data, int len) { + jint h1 = seed; + int count = len; + int offset = 0; + + // body + while (count >= 4) { + jint k1 = (data[offset] & 0x0FF) + | (data[offset + 1] & 0x0FF) << 8 + | (data[offset + 2] & 0x0FF) << 16 + | data[offset + 3] << 24; + + count -= 4; + offset += 4; + + k1 *= 0xcc9e2d51; + k1 = Integer_rotateLeft(k1, 15); + k1 *= 0x1b873593; + + h1 ^= k1; + h1 = Integer_rotateLeft(h1, 13); + h1 = h1 * 5 + 0xe6546b64; + } + + // tail + + if (count > 0) { + jint k1 = 0; + + switch (count) { + case 3: + k1 ^= (data[offset + 2] & 0xff) << 16; + // fall through + case 2: + k1 ^= (data[offset + 1] & 0xff) << 8; + // fall through + case 1: + k1 ^= (data[offset] & 0xff); + // fall through + default: + k1 *= 0xcc9e2d51; + k1 = Integer_rotateLeft(k1, 15); + k1 *= 0x1b873593; + h1 ^= k1; + } + } + + // finalization + h1 ^= len; + + // finalization mix force all bits of a hash block to avalanche + h1 ^= ((unsigned int)h1) >> 16; + h1 *= 0x85ebca6b; + h1 ^= ((unsigned int)h1) >> 13; + h1 *= 0xc2b2ae35; + h1 ^= ((unsigned int)h1) >> 16; + + return h1; +} + +// Murmur3 hashing for Strings +jint AltHashing::murmur3_32(jint seed, const jchar* data, int len) { + jint h1 = seed; + + int off = 0; + int count = len; + + // body + while (count >= 2) { + jchar d1 = data[off++] & 0xFFFF; + jchar d2 = data[off++]; + jint k1 = (d1 | d2 << 16); + + count -= 2; + + k1 *= 0xcc9e2d51; + k1 = Integer_rotateLeft(k1, 15); + k1 *= 0x1b873593; + + h1 ^= k1; + h1 = Integer_rotateLeft(h1, 13); + h1 = h1 * 5 + 0xe6546b64; + } + + // tail + + if (count > 0) { + int k1 = data[off]; + + k1 *= 0xcc9e2d51; + k1 = Integer_rotateLeft(k1, 15); + k1 *= 0x1b873593; + h1 ^= k1; + } + + // finalization + h1 ^= len * 2; // (Character.SIZE / Byte.SIZE); + + // finalization mix force all bits of a hash block to avalanche + h1 ^= ((unsigned int)h1) >> 16; + h1 *= 0x85ebca6b; + h1 ^= ((unsigned int)h1) >> 13; + h1 *= 0xc2b2ae35; + h1 ^= ((unsigned int)h1) >> 16; + + return h1; +} + +// Hash used for the seed. +jint AltHashing::murmur3_32(jint seed, const int* data, int len) { + jint h1 = seed; + + int off = 0; + int end = len; + + // body + while (off < end) { + jint k1 = data[off++]; + + k1 *= 0xcc9e2d51; + k1 = Integer_rotateLeft(k1, 15); + k1 *= 0x1b873593; + + h1 ^= k1; + h1 = Integer_rotateLeft(h1, 13); + h1 = h1 * 5 + 0xe6546b64; + } + + // tail (always empty, as body is always 32-bit chunks) + + // finalization + + h1 ^= len * 4; // (Integer.SIZE / Byte.SIZE); + + // finalization mix force all bits of a hash block to avalanche + h1 ^= ((juint)h1) >> 16; + h1 *= 0x85ebca6b; + h1 ^= ((juint)h1) >> 13; + h1 *= 0xc2b2ae35; + h1 ^= ((juint)h1) >> 16; + + return h1; +} + +jint AltHashing::murmur3_32(const int* data, int len) { + return murmur3_32(0, data, len); +} + +#ifndef PRODUCT +// Overloaded versions for internal test. +jint AltHashing::murmur3_32(const jbyte* data, int len) { + return murmur3_32(0, data, len); +} + +jint AltHashing::murmur3_32(const jchar* data, int len) { + return murmur3_32(0, data, len); +} + +// Internal test for alternate hashing. Translated from JDK version +// test/sun/misc/Hashing.java +static const jbyte ONE_BYTE[] = { (jbyte) 0x80}; +static const jbyte TWO_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81}; +static const jchar ONE_CHAR[] = { (jchar) 0x8180}; +static const jbyte THREE_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82}; +static const jbyte FOUR_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83}; +static const jchar TWO_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382}; +static const jint ONE_INT[] = { 0x83828180}; +static const jbyte SIX_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83, (jbyte) 0x84, (jbyte) 0x85}; +static const jchar THREE_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382, (jchar) 0x8584}; +static const jbyte EIGHT_BYTE[] = { + (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, + (jbyte) 0x83, (jbyte) 0x84, (jbyte) 0x85, + (jbyte) 0x86, (jbyte) 0x87}; +static const jchar FOUR_CHAR[] = { + (jchar) 0x8180, (jchar) 0x8382, + (jchar) 0x8584, (jchar) 0x8786}; + +static const jint TWO_INT[] = { 0x83828180, 0x87868584}; + +static const juint MURMUR3_32_X86_CHECK_VALUE = 0xB0F57EE3; + +void AltHashing::testMurmur3_32_ByteArray() { + // printf("testMurmur3_32_ByteArray\n"); + + jbyte* vector = new jbyte[256]; + jbyte* hashes = new jbyte[4 * 256]; + + for (int i = 0; i < 256; i++) { + vector[i] = (jbyte) i; + } + + // Hash subranges {}, {0}, {0,1}, {0,1,2}, ..., {0,...,255} + for (int i = 0; i < 256; i++) { + jint hash = murmur3_32(256 - i, vector, i); + hashes[i * 4] = (jbyte) hash; + hashes[i * 4 + 1] = (jbyte) (((juint)hash) >> 8); + hashes[i * 4 + 2] = (jbyte) (((juint)hash) >> 16); + hashes[i * 4 + 3] = (jbyte) (((juint)hash) >> 24); + } + + // hash to get const result. + juint final_hash = murmur3_32(hashes, 4*256); + + assert (MURMUR3_32_X86_CHECK_VALUE == final_hash, + err_msg( + "Calculated hash result not as expected. Expected %08X got %08X\n", + MURMUR3_32_X86_CHECK_VALUE, + final_hash)); +} + +void AltHashing::testEquivalentHashes() { + jint jbytes, jchars, ints; + + // printf("testEquivalentHashes\n"); + + jbytes = murmur3_32(TWO_BYTE, 2); + jchars = murmur3_32(ONE_CHAR, 1); + assert (jbytes == jchars, + err_msg("Hashes did not match. b:%08x != c:%08x\n", jbytes, jchars)); + + jbytes = murmur3_32(FOUR_BYTE, 4); + jchars = murmur3_32(TWO_CHAR, 2); + ints = murmur3_32(ONE_INT, 1); + assert ((jbytes == jchars) && (jbytes == ints), + err_msg("Hashes did not match. b:%08x != c:%08x != i:%08x\n", jbytes, jchars, ints)); + + jbytes = murmur3_32(SIX_BYTE, 6); + jchars = murmur3_32(THREE_CHAR, 3); + assert (jbytes == jchars, + err_msg("Hashes did not match. b:%08x != c:%08x\n", jbytes, jchars)); + + jbytes = murmur3_32(EIGHT_BYTE, 8); + jchars = murmur3_32(FOUR_CHAR, 4); + ints = murmur3_32(TWO_INT, 2); + assert ((jbytes == jchars) && (jbytes == ints), + err_msg("Hashes did not match. b:%08x != c:%08x != i:%08x\n", jbytes, jchars, ints)); +} + +// Returns true if the alternate hashcode is correct +void AltHashing::test_alt_hash() { + testMurmur3_32_ByteArray(); + testEquivalentHashes(); +} +#endif // PRODUCT diff -r 767fdaea4155 -r a456d0771ba0 src/share/vm/classfile/altHashing.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/vm/classfile/altHashing.hpp Wed Oct 17 08:52:30 2012 +0100 @@ -0,0 +1,62 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_VM_CLASSFILE_ALTHASHING_HPP +#define SHARE_VM_CLASSFILE_ALTHASHING_HPP + +#include "prims/jni.h" +#include "classfile/symbolTable.hpp" + +/** + * Hashing utilities. + * + * Implementation of Murmur3 hashing. + * This code was translated from src/share/classes/sun/misc/Hashing.java + * code in the JDK. + */ + +class AltHashing : AllStatic { + + // utility function copied from java/lang/Integer + static jint Integer_rotateLeft(jint i, int distance) { + return (i << distance) | (((juint)i) >> (32-distance)); + } + static jint murmur3_32(const int* data, int len); + static jint murmur3_32(jint seed, const int* data, int len); + +#ifndef PRODUCT + // Hashing functions used for internal testing + static jint murmur3_32(const jbyte* data, int len); + static jint murmur3_32(const jchar* data, int len); + static void testMurmur3_32_ByteArray(); + static void testEquivalentHashes(); +#endif // PRODUCT + + public: + static jint compute_seed(); + static jint murmur3_32(jint seed, const jbyte* data, int len); + static jint murmur3_32(jint seed, const jchar* data, int len); + NOT_PRODUCT(static void test_alt_hash();) +}; +#endif // SHARE_VM_CLASSFILE_ALTHASHING_HPP diff -r 767fdaea4155 -r a456d0771ba0 src/share/vm/classfile/javaClasses.cpp --- a/src/share/vm/classfile/javaClasses.cpp Tue Oct 16 21:33:00 2012 +0100 +++ b/src/share/vm/classfile/javaClasses.cpp Wed Oct 17 08:52:30 2012 +0100 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "classfile/altHashing.hpp" #include "classfile/javaClasses.hpp" #include "classfile/symbolTable.hpp" #include "classfile/vmSymbols.hpp" @@ -324,13 +325,26 @@ return result; } -unsigned int java_lang_String::hash_string(oop java_string) { +unsigned int java_lang_String::to_hash(oop java_string) { + int length = java_lang_String::length(java_string); + // Zero length string will hash to zero with String.toHash() function. + if (length == 0) return 0; + typeArrayOop value = java_lang_String::value(java_string); int offset = java_lang_String::offset(java_string); + return java_lang_String::to_hash(value->char_at_addr(offset), length); +} + +unsigned int java_lang_String::hash_string(oop java_string) { int length = java_lang_String::length(java_string); - - if (length == 0) return 0; - return hash_string(value->char_at_addr(offset), length); + // Zero length string doesn't hash necessarily hash to zero. + if (length == 0) { + return StringTable::hash_string(NULL, 0); + } + + typeArrayOop value = java_lang_String::value(java_string); + int offset = java_lang_String::offset(java_string); + return StringTable::hash_string(value->char_at_addr(offset), length); } Symbol* java_lang_String::as_symbol(Handle java_string, TRAPS) { diff -r 767fdaea4155 -r a456d0771ba0 src/share/vm/classfile/javaClasses.hpp --- a/src/share/vm/classfile/javaClasses.hpp Tue Oct 16 21:33:00 2012 +0100 +++ b/src/share/vm/classfile/javaClasses.hpp Wed Oct 17 08:52:30 2012 +0100 @@ -110,20 +110,16 @@ static jchar* as_unicode_string(oop java_string, int& length); // Compute the hash value for a java.lang.String object which would - // contain the characters passed in. This hash value is used for at - // least two purposes. + // contain the characters passed in. // - // (a) As the hash value used by the StringTable for bucket selection - // and comparison (stored in the HashtableEntry structures). This - // is used in the String.intern() method. + // As the hash value used by the String object itself, in + // String.hashCode(). This value is normally calculated in Java code + // in the String.hashCode method(), but is precomputed for String + // objects in the shared archive file. + // hash P(31) from Kernighan & Ritchie // - // (b) As the hash value used by the String object itself, in - // String.hashCode(). This value is normally calculate in Java code - // in the String.hashCode method(), but is precomputed for String - // objects in the shared archive file. - // - // For this reason, THIS ALGORITHM MUST MATCH String.hashCode(). - static unsigned int hash_string(jchar* s, int len) { + // For this reason, THIS ALGORITHM MUST MATCH String.toHash(). + template static unsigned int to_hash(T* s, int len) { unsigned int h = 0; while (len-- > 0) { h = 31*h + (unsigned int) *s; @@ -131,6 +127,10 @@ } return h; } + static unsigned int to_hash(oop java_string); + + // This is the string hash code used by the StringTable, which may be + // the same as String.toHash or an alternate hash code. static unsigned int hash_string(oop java_string); static bool equals(oop java_string, jchar* chars, int len); diff -r 767fdaea4155 -r a456d0771ba0 src/share/vm/classfile/symbolTable.cpp --- a/src/share/vm/classfile/symbolTable.cpp Tue Oct 16 21:33:00 2012 +0100 +++ b/src/share/vm/classfile/symbolTable.cpp Wed Oct 17 08:52:30 2012 +0100 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "classfile/altHashing.hpp" #include "classfile/javaClasses.hpp" #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" @@ -33,10 +34,13 @@ #include "oops/oop.inline2.hpp" #include "runtime/mutexLocker.hpp" #include "utilities/hashtable.inline.hpp" +#include "utilities/numberSeq.hpp" // -------------------------------------------------------------------------- SymbolTable* SymbolTable::_the_table = NULL; +bool SymbolTable::_needs_rehashing = false; +jint SymbolTable::_seed = 0; Symbol* SymbolTable::allocate_symbol(const u1* name, int len, TRAPS) { // Don't allow symbols to be created which cannot fit in a Symbol*. @@ -120,12 +124,41 @@ } } +unsigned int SymbolTable::new_hash(Symbol* sym) { From andrew at icedtea.classpath.org Wed Oct 17 01:14:42 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 08:14:42 +0000 Subject: /hg/release/icedtea7-2.1: S7158800: Improve storage of symbol ta... Message-ID: changeset f8309d7b8f61 in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=f8309d7b8f61 author: Andrew John Hughes date: Wed Oct 17 09:14:19 2012 +0100 S7158800: Improve storage of symbol tables 2011-10-17 Andrew John Hughes * Makefile.am: (HOTSPOT_CHANGESET): Update to bring in S7158800. (HOTSPOT_SHA256SUM): Likewise. * NEWS: Add S7158800 diffstat: ChangeLog | 8 ++++++++ Makefile.am | 4 ++-- NEWS | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diffs (47 lines): diff -r 9e95e25150ad -r f8309d7b8f61 ChangeLog --- a/ChangeLog Wed Oct 17 07:44:02 2012 +0100 +++ b/ChangeLog Wed Oct 17 09:14:19 2012 +0100 @@ -1,3 +1,11 @@ +2011-10-17 Andrew John Hughes + + * Makefile.am: + (HOTSPOT_CHANGESET): Update to bring in + S7158800. + (HOTSPOT_SHA256SUM): Likewise. + * NEWS: Add S7158800 + 2011-10-17 Andrew John Hughes * configure.ac: Bump to 2.1.3 proper. diff -r 9e95e25150ad -r f8309d7b8f61 Makefile.am --- a/Makefile.am Wed Oct 17 07:44:02 2012 +0100 +++ b/Makefile.am Wed Oct 17 09:14:19 2012 +0100 @@ -5,7 +5,7 @@ COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION) CORBA_CHANGESET = 79ee8535bc51 -HOTSPOT_CHANGESET = 767fdaea4155 +HOTSPOT_CHANGESET = a456d0771ba0 JAXP_CHANGESET = 77e7219c7424 JAXWS_CHANGESET = d92eda447bca JDK_CHANGESET = d7ecb57d3c61 @@ -13,7 +13,7 @@ OPENJDK_CHANGESET = f89009ada191 CORBA_SHA256SUM = f61dad8d484e4a9e645b7fb73da87bc44f9986a074629154f37ed46be05f5b84 -HOTSPOT_SHA256SUM = a2a2c610e9ebb97a3c95be233533035cf4f59c4cc45a553ba09e52106fbad113 +HOTSPOT_SHA256SUM = 09a64fca0beff0759ef1b461d63ed6a00e43032972781bb3a55e49d8b93f67d0 JAXP_SHA256SUM = 9cfbc0efaface20f7188870b9bf5b0ebc73d745cd9a49d013cd4e81ba223ccdc JAXWS_SHA256SUM = 6d0858d46b68d6e8488e70d1675e5b656aeb4ef51e8ee4e330e77219f92c1c0c JDK_SHA256SUM = 11146763409098a42dd9896f3fb7e7324a58c5cff5298009eb347ad26abeed51 diff -r 9e95e25150ad -r f8309d7b8f61 NEWS --- a/NEWS Wed Oct 17 07:44:02 2012 +0100 +++ b/NEWS Wed Oct 17 09:14:19 2012 +0100 @@ -42,6 +42,7 @@ - S7175845: "jar uf" changes file permissions unexpectedly - S7177216: native2ascii changes file permissions of input file - S7106773: 512 bits RSA key cannot work with SHA384 and SHA512 + - S7158800: Improve storage of symbol tables * Bug fixes - Remove merge artefact. - Remove the Xp header and library checks. From andrew at icedtea.classpath.org Wed Oct 17 01:17:12 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 08:17:12 +0000 Subject: /hg/release/icedtea7-2.3: Include S7158800 when building Zero us... Message-ID: changeset a45882b17791 in /hg/release/icedtea7-2.3 details: http://icedtea.classpath.org/hg/release/icedtea7-2.3?cmd=changeset;node=a45882b17791 author: Andrew John Hughes date: Wed Oct 17 09:16:59 2012 +0100 Include S7158800 when building Zero using 2.1's HotSpot. 2011-10-17 Andrew John Hughes * NEWS: Drop S7176337 which is only part of the 6 updates. * hotspot.map: Update zero so the version of 2.1 with S7158800 included is brought in. diffstat: ChangeLog | 7 +++++++ NEWS | 1 - hotspot.map | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diffs (33 lines): diff -r 84228c050a0d -r a45882b17791 ChangeLog --- a/ChangeLog Wed Oct 17 05:28:21 2012 +0100 +++ b/ChangeLog Wed Oct 17 09:16:59 2012 +0100 @@ -1,3 +1,10 @@ +2011-10-17 Andrew John Hughes + + * NEWS: Drop S7176337 which is only + part of the 6 updates. + * hotspot.map: Update zero so the version + of 2.1 with S7158800 included is brought in. + 2011-10-17 Andrew John Hughes * configure.ac: Bump to 2.3.3 proper. diff -r 84228c050a0d -r a45882b17791 NEWS --- a/NEWS Wed Oct 17 05:28:21 2012 +0100 +++ b/NEWS Wed Oct 17 09:16:59 2012 +0100 @@ -38,7 +38,6 @@ - S7158800: Improve storage of symbol tables - S7158801: Improve VM CompileOnly option - S7158804: Improve config file parsing - - S7176337: Additional changes needed for 7158801 fix - S7198606, CVE-2012-4416: Improve VM optimization * Bug fixes - Remove merge artefact. diff -r 84228c050a0d -r a45882b17791 hotspot.map --- a/hotspot.map Wed Oct 17 05:28:21 2012 +0100 +++ b/hotspot.map Wed Oct 17 09:16:59 2012 +0100 @@ -1,3 +1,3 @@ # version url changeset sha256sum default http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot d2d0a106917c 872e9e0c36b9fd93e81ac131e60deadb0afa22aa77447150bb45ede77ee6db8b -zero http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot 767fdaea4155 a2a2c610e9ebb97a3c95be233533035cf4f59c4cc45a553ba09e52106fbad113 +zero http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot a456d0771ba0 09a64fca0beff0759ef1b461d63ed6a00e43032972781bb3a55e49d8b93f67d0 From andrew at icedtea.classpath.org Wed Oct 17 02:21:56 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 09:21:56 +0000 Subject: /hg/release/icedtea7-2.1: Added tag icedtea-2.1.3 for changeset ... Message-ID: changeset 1246100b6871 in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=1246100b6871 author: Andrew John Hughes date: Wed Oct 17 10:21:42 2012 +0100 Added tag icedtea-2.1.3 for changeset f8309d7b8f61 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r f8309d7b8f61 -r 1246100b6871 .hgtags --- a/.hgtags Wed Oct 17 09:14:19 2012 +0100 +++ b/.hgtags Wed Oct 17 10:21:42 2012 +0100 @@ -39,3 +39,4 @@ 328ab29b4c9d64f8b0422eaf0c3dcebfb8fd8c30 icedtea-2.1 5ce34ab2682058ad20bfba084ee6d05e84bd56c4 icedtea-2.1.1 9ade3410b04a47726a2f4ae677905dccc6930599 icedtea-2.1.2 +f8309d7b8f6194920e3b9b003e726820195220b5 icedtea-2.1.3 From ptisnovs at icedtea.classpath.org Wed Oct 17 06:00:41 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 17 Oct 2012 13:00:41 +0000 Subject: /hg/rhino-tests: Make the test src/org/RhinoTests/SimpleBindings... Message-ID: changeset a9ef7cd38b16 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=a9ef7cd38b16 author: Pavel Tisnovsky date: Wed Oct 17 15:03:26 2012 +0200 Make the test src/org/RhinoTests/SimpleBindingsClassTest.java compatible with JDK 7. diffstat: ChangeLog | 5 ++ src/org/RhinoTests/SimpleBindingsClassTest.java | 58 ++++++++++++++++++------ 2 files changed, 47 insertions(+), 16 deletions(-) diffs (108 lines): diff -r 0a793f171324 -r a9ef7cd38b16 ChangeLog --- a/ChangeLog Tue Oct 16 13:13:13 2012 +0200 +++ b/ChangeLog Wed Oct 17 15:03:26 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-17 Pavel Tisnovsky + + * src/org/RhinoTests/SimpleBindingsClassTest.java: + Make this test compatible with JDK 7. + 2012-10-16 Pavel Tisnovsky * src/org/RhinoTests/ScriptContextClassTest.java: diff -r 0a793f171324 -r a9ef7cd38b16 src/org/RhinoTests/SimpleBindingsClassTest.java --- a/src/org/RhinoTests/SimpleBindingsClassTest.java Tue Oct 16 13:13:13 2012 +0200 +++ b/src/org/RhinoTests/SimpleBindingsClassTest.java Wed Oct 17 15:03:26 2012 +0200 @@ -278,6 +278,9 @@ Map testedConstructors_jdk6 = new HashMap(); Map testedConstructors_jdk7 = new HashMap(); + testedConstructors_jdk6.put("public javax.script.SimpleBindings(java.util.Map)", "javax.script.SimpleBindings"); + testedConstructors_jdk6.put("public javax.script.SimpleBindings()", "javax.script.SimpleBindings"); + testedConstructors_jdk7.put("public javax.script.SimpleBindings(java.util.Map)", "javax.script.SimpleBindings"); testedConstructors_jdk7.put("public javax.script.SimpleBindings()", "javax.script.SimpleBindings"); @@ -308,6 +311,9 @@ Map testedConstructors_jdk6 = new HashMap(); Map testedConstructors_jdk7 = new HashMap(); + testedConstructors_jdk6.put("public javax.script.SimpleBindings(java.util.Map)", "javax.script.SimpleBindings"); + testedConstructors_jdk6.put("public javax.script.SimpleBindings()", "javax.script.SimpleBindings"); + testedConstructors_jdk7.put("public javax.script.SimpleBindings(java.util.Map)", "javax.script.SimpleBindings"); testedConstructors_jdk7.put("public javax.script.SimpleBindings()", "javax.script.SimpleBindings"); @@ -378,6 +384,28 @@ protected void testGetMethods() { // following methods should be inherited final String[] methodsThatShouldExists_jdk6 = { + "public boolean java.lang.Object.equals(java.lang.Object)", + "public boolean javax.script.SimpleBindings.containsKey(java.lang.Object)", + "public boolean javax.script.SimpleBindings.containsValue(java.lang.Object)", + "public boolean javax.script.SimpleBindings.isEmpty()", + "public final native java.lang.Class java.lang.Object.getClass()", + "public final native void java.lang.Object.notify()", + "public final native void java.lang.Object.notifyAll()", + "public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException", + "public final void java.lang.Object.wait() throws java.lang.InterruptedException", + "public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException", + "public int javax.script.SimpleBindings.size()", + "public java.lang.Object javax.script.SimpleBindings.get(java.lang.Object)", + "public java.lang.Object javax.script.SimpleBindings.put(java.lang.Object,java.lang.Object)", + "public java.lang.Object javax.script.SimpleBindings.put(java.lang.String,java.lang.Object)", + "public java.lang.Object javax.script.SimpleBindings.remove(java.lang.Object)", + "public java.lang.String java.lang.Object.toString()", + "public java.util.Collection javax.script.SimpleBindings.values()", + "public java.util.Set javax.script.SimpleBindings.entrySet()", + "public java.util.Set javax.script.SimpleBindings.keySet()", + "public native int java.lang.Object.hashCode()", + "public void javax.script.SimpleBindings.clear()", + "public void javax.script.SimpleBindings.putAll(java.util.Map)", }; final String[] methodsThatShouldExists_jdk7 = { @@ -414,22 +442,6 @@ } String[] methodsThatShouldExists = getJavaVersion() < 7 ? methodsThatShouldExists_jdk6 : methodsThatShouldExists_jdk7; // check if all required methods really exists - Constructor[] constructors = this.simpleBindingsClass.getDeclaredConstructors(); - assertEquals(constructors.length, 2, "only 2 constructors should be set"); - String constructorName; - String constructorString; - constructorName = constructors[0].getName(); - constructorString = constructors[0].toString(); - assertEquals(constructorName, "javax.script.SimpleBindings", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.SimpleBindings(java.util.Map)", - "wrong constructor.toString() " + constructorName); - constructorName = constructors[1].getName(); - constructorString = constructors[1].toString(); - assertEquals(constructorName, "javax.script.SimpleBindings", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.SimpleBindings()", - "wrong constructor.toString() " + constructorName); for (String methodThatShouldExists : methodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), "method " + methodThatShouldExists + " not found"); @@ -442,6 +454,20 @@ protected void testGetDeclaredMethods() { // following methods should be declared final String[] declaredMethodsThatShouldExists_jdk6 = { + "private void javax.script.SimpleBindings.checkKey(java.lang.Object)", + "public boolean javax.script.SimpleBindings.containsKey(java.lang.Object)", + "public boolean javax.script.SimpleBindings.containsValue(java.lang.Object)", + "public boolean javax.script.SimpleBindings.isEmpty()", + "public int javax.script.SimpleBindings.size()", + "public java.lang.Object javax.script.SimpleBindings.get(java.lang.Object)", + "public java.lang.Object javax.script.SimpleBindings.put(java.lang.Object,java.lang.Object)", + "public java.lang.Object javax.script.SimpleBindings.put(java.lang.String,java.lang.Object)", + "public java.lang.Object javax.script.SimpleBindings.remove(java.lang.Object)", + "public java.util.Collection javax.script.SimpleBindings.values()", + "public java.util.Set javax.script.SimpleBindings.entrySet()", + "public java.util.Set javax.script.SimpleBindings.keySet()", + "public void javax.script.SimpleBindings.clear()", + "public void javax.script.SimpleBindings.putAll(java.util.Map)", }; final String[] declaredMethodsThatShouldExists_jdk7 = { From andrew at icedtea.classpath.org Wed Oct 17 08:56:08 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 15:56:08 +0000 Subject: /hg/release/icedtea7-2.2: Added tag icedtea-2.2.3 for changeset ... Message-ID: changeset acb3a9d6be33 in /hg/release/icedtea7-2.2 details: http://icedtea.classpath.org/hg/release/icedtea7-2.2?cmd=changeset;node=acb3a9d6be33 author: Andrew John Hughes date: Wed Oct 17 16:56:03 2012 +0100 Added tag icedtea-2.2.3 for changeset e0645102f9be diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r e0645102f9be -r acb3a9d6be33 .hgtags --- a/.hgtags Wed Oct 17 08:51:31 2012 +0100 +++ b/.hgtags Wed Oct 17 16:56:03 2012 +0100 @@ -36,3 +36,4 @@ 2833d66bbe167cb9e184a67559aec7ae655f9e75 icedtea-2.2 3ae81734f023f89f4b69bdfbd0cbd3601003a397 icedtea-2.2.1 760e7996f6dd1c325b03a024c60747571b7dc899 icedtea-2.2.2 +e0645102f9be06f1d691c4d9033c1b8684b2ad1e icedtea-2.2.3 From andrew at icedtea.classpath.org Wed Oct 17 09:03:35 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 17 Oct 2012 16:03:35 +0000 Subject: /hg/release/icedtea7-2.3: Added tag icedtea-2.3.3 for changeset ... Message-ID: changeset 23117feffda5 in /hg/release/icedtea7-2.3 details: http://icedtea.classpath.org/hg/release/icedtea7-2.3?cmd=changeset;node=23117feffda5 author: Andrew John Hughes date: Wed Oct 17 17:03:22 2012 +0100 Added tag icedtea-2.3.3 for changeset a45882b17791 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r a45882b17791 -r 23117feffda5 .hgtags --- a/.hgtags Wed Oct 17 09:16:59 2012 +0100 +++ b/.hgtags Wed Oct 17 17:03:22 2012 +0100 @@ -36,3 +36,4 @@ 60c41b88775a8043ff4922278eb0e801c330e8fe icedtea-2.3-branchpoint 91b44f61a68f01e85d074a5c14862443740eb0af icedtea-2.3.1 a7c86c0471bd7a5cae44eef484fe09ca9e94d07c icedtea-2.3.2 +a45882b177918373cfa9edeee75f23f06ffa8095 icedtea-2.3.3 From gnu.andrew at redhat.com Wed Oct 17 09:18:00 2012 From: gnu.andrew at redhat.com (Andrew John Hughes) Date: Wed, 17 Oct 2012 17:18:00 +0100 Subject: [SECURITY] IcedTea 2.1.3, 2.2.3 & 2.3.3 for OpenJDK7 Released! Message-ID: <20121017161800.GA13063@rivendell.middle-earth.co.uk> The IcedTea project provides a harness to build the source code from OpenJDK7 using Free Software build tools, along with additional features such as a PulseAudio sound driver and support for alternative virtual machines. A new set of security releases is now available: * IcedTea7 2.1.3 * IcedTea7 2.2.3 * IcedTea7 2.3.3 All updates contain the following security fixes: * S6631398, CVE-2012-3216: FilePermission improved path checking * S7093490: adjust package access in rmiregistry * S7143535, CVE-2012-5068: ScriptEngine corrected permissions * S7158796, CVE-2012-5070: Tighten properties checking in EnvHelp * S7158807: Revise stack management with volatile call sites * S7163198, CVE-2012-5076: Tightened package accessibility * S7167656, CVE-2012-5077: Multiple Seeders are being created * S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types * S7169887, CVE-2012-5074: Tightened package accessibility * S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector * S7172522, CVE-2012-5072: Improve DomainCombiner checking * S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC * S7189103, CVE-2012-5069: Executors needs to maintain state * S7189490: More improvements to DomainCombiner checking * S7189567, CVE-2012-5085: java net obselete protocol * S7192975, CVE-2012-5071: Issue with JMX reflection * S7195194, CVE-2012-5084: Better data validation for Swing * S7195549, CVE-2012-5087: Better bean object persistence * S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved * S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance * S7196190, CVE-2012-5088: Improve method of handling MethodHandles * S7198296, CVE-2012-5089: Refactor classloader usage * S7158801: Improve VM CompileOnly option * S7158804: Improve config file parsing * S7198606, CVE-2012-4416: Improve VM optimization We believe that the 2.3.3 release takes IcedTea beyond u9[*], providing security updates from u7 and u9 on top of an OpenJDK7 u6 base, along with additional IcedTea patches to allow builds against system libraries and to support more estoric architectures. Please note support for alternative VM solutions (CACAO, Shark, Zero) may be lacking in this release, as there has been little time for testing non-standard builds, and Zero is known to not work with 2.2.x (and only with 2.3.x via using the HotSpot from 2.1.x). Patches are welcome; please contact the mailing list (distro-pkg-dev at openjdk.java.net) and/or file bugs (http://icedtea.classpath.org/bugzilla) under the appropriate component. An update release may follow to correct issues with these builds, if necessary, but we deem it important to get the security updates out for mainstream builds as quickly as possible without further delay. Full details of each release can be found below. What?s New? ?????? New in release 2.1.3 (2012-10-17): * Security fixes - S6631398, CVE-2012-3216: FilePermission improved path checking - S7093490: adjust package access in rmiregistry - S7143535, CVE-2012-5068: ScriptEngine corrected permissions - S7158796, CVE-2012-5070: Tighten properties checking in EnvHelp - S7158807: Revise stack management with volatile call sites - S7163198, CVE-2012-5076: Tightened package accessibility - S7167656, CVE-2012-5077: Multiple Seeders are being created - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types - S7169887, CVE-2012-5074: Tightened package accessibility - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector - S7172522, CVE-2012-5072: Improve DomainCombiner checking - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC - S7189103, CVE-2012-5069: Executors needs to maintain state - S7189490: More improvements to DomainCombiner checking - S7189567, CVE-2012-5085: java net obselete protocol - S7192975, CVE-2012-5071: Issue with JMX reflection - S7195194, CVE-2012-5084: Better data validation for Swing - S7195549, CVE-2012-5087: Better bean object persistence - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance - S7196190, CVE-2012-5088: Improve method of handling MethodHandles - S7198296, CVE-2012-5089: Refactor classloader usage - S7158801: Improve VM CompileOnly option - S7158804: Improve config file parsing - S7198606, CVE-2012-4416: Improve VM optimization * Backports - S7175845: "jar uf" changes file permissions unexpectedly - S7177216: native2ascii changes file permissions of input file - S7106773: 512 bits RSA key cannot work with SHA384 and SHA512 - S7158800: Improve storage of symbol tables * Bug fixes - Remove merge artefact. - Remove the Xp header and library checks. New in release 2.2.3 (2012-10-17): * Security fixes - S6631398, CVE-2012-3216: FilePermission improved path checking - S7093490: adjust package access in rmiregistry - S7143535, CVE-2012-5068: ScriptEngine corrected permissions - S7158796, CVE-2012-5070: Tighten properties checking in EnvHelp - S7158807: Revise stack management with volatile call sites - S7163198, CVE-2012-5076: Tightened package accessibility - S7167656, CVE-2012-5077: Multiple Seeders are being created - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types - S7169887, CVE-2012-5074: Tightened package accessibility - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector - S7172522, CVE-2012-5072: Improve DomainCombiner checking - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC - S7189103, CVE-2012-5069: Executors needs to maintain state - S7189490: More improvements to DomainCombiner checking - S7189567, CVE-2012-5085: java net obselete protocol - S7192975, CVE-2012-5071: Issue with JMX reflection - S7195194, CVE-2012-5084: Better data validation for Swing - S7195549, CVE-2012-5087: Better bean object persistence - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance - S7196190, CVE-2012-5088: Improve method of handling MethodHandles - S7198296, CVE-2012-5089: Refactor classloader usage - S7158801: Improve VM CompileOnly option - S7158804: Improve config file parsing - S7198606, CVE-2012-4416: Improve VM optimization * Backports - S7175845: "jar uf" changes file permissions unexpectedly - S7177216: native2ascii changes file permissions of input file - S7158800: Improve storage of symbol tables * Bug fixes - Remove merge artefact. - Remove the Xp header and library checks. New in release 2.3.3 (2012-10-17): * Security fixes - S6631398, CVE-2012-3216: FilePermission improved path checking - S7093490: adjust package access in rmiregistry - S7143535, CVE-2012-5068: ScriptEngine corrected permissions - S7158796, CVE-2012-5070: Tighten properties checking in EnvHelp - S7158807: Revise stack management with volatile call sites - S7163198, CVE-2012-5076: Tightened package accessibility - S7167656, CVE-2012-5077: Multiple Seeders are being created - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types - S7169887, CVE-2012-5074: Tightened package accessibility - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector - S7172522, CVE-2012-5072: Improve DomainCombiner checking - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC - S7189103, CVE-2012-5069: Executors needs to maintain state - S7189490: More improvements to DomainCombiner checking - S7189567, CVE-2012-5085: java net obselete protocol - S7192975, CVE-2012-5071: Issue with JMX reflection - S7195194, CVE-2012-5084: Better data validation for Swing - S7195549, CVE-2012-5087: Better bean object persistence - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance - S7196190, CVE-2012-5088: Improve method of handling MethodHandles - S7198296, CVE-2012-5089: Refactor classloader usage - S7158800: Improve storage of symbol tables - S7158801: Improve VM CompileOnly option - S7158804: Improve config file parsing - S7198606, CVE-2012-4416: Improve VM optimization * Bug fixes - Remove merge artefact. - Remove the Xp header and library checks. * JamVM - PR1155: Do not put version number in libjvm.so SONAME The tarballs can be downloaded from: * http://icedtea.classpath.org/download/source/icedtea-2.1.3.tar.gz * http://icedtea.classpath.org/download/source/icedtea-2.2.3.tar.gz * http://icedtea.classpath.org/download/source/icedtea-2.3.3.tar.gz SHA256 checksums: 1929e57eb6718d30735e1e04e9e129457f845f7d7a8404b2b028740d0779ddb6 icedtea-2.1.3.tar.gz 4397ef71a0d729521be70f920bfc3fb6aec3455f1619b538cea75df512df1a16 icedtea-2.2.3.tar.gz e5ac5564e00c4a8d7b3376ed6de91b18a2587c8abdad802ccc92c780765b1073 icedtea-2.3.3.tar.gz Each tarball is accompanied by a digital signature (available at the above URL + '.sig'). This is produced using my public key. See details below. The following people helped with these releases: * Elliott Baron (creation of reproducers for S7163198/S7169887 & S7186286, checking S7189103 & S7189567) * Deepak Bhole (creation of reproducer for S7093490) * Andrew John Hughes (applying all security patches, backports & bug fixes, reproducer runs, release management) * Omair Majid (creation of reproducers for S7167656, S7172522, S7195549 & S7195917) * Chris Phillips (checking S7143535, S7169884 & S7198606 reproducers) * Roman Kennke (creation of reproducers for S7158796, S7192975 & S7198296) * Pavel Tisnovsky (additional reproducer runs) * Mario Torre (creation of reproducers for S6631398, S7195919 & S7196190, checking S7195194 reproducer) * Jon VanAlten (creation of reproducer for S7158801, checking S7158800, S7158804 & S7158807) We would also like to thank the bug reporters and testers! To get started: $ tar xzf icedtea-${ver}.tar.gz Full build requirements and instructions are in INSTALL: $ mkdir icedtea6-build $ cd icedtea6-build $ ../icedtea6-${ver}/configure [--enable-zero --enable-pulse-java --enable-systemtap ...] $ make Happy hacking! * It is difficult to make authoritative statements about u9 as the release is proprietary. Oracle still do not provide GPL binaries based on OpenJDK. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121017/8ab7e638/attachment.bin From ahughes at redhat.com Wed Oct 17 09:42:58 2012 From: ahughes at redhat.com (Andrew Hughes) Date: Wed, 17 Oct 2012 12:42:58 -0400 (EDT) Subject: [SECURITY] IcedTea 2.1.3, 2.2.3 & 2.3.3 for OpenJDK7 Released! In-Reply-To: <20121017161800.GA13063@rivendell.middle-earth.co.uk> Message-ID: <2124710591.1810512.1350492178374.JavaMail.root@redhat.com> ----- Original Message ----- > The IcedTea project provides a harness to build the source code from > OpenJDK7 using Free Software build tools, along with additional > features such as a PulseAudio sound driver and support for > alternative > virtual machines. > > A new set of security releases is now available: > > * IcedTea7 2.1.3 > * IcedTea7 2.2.3 > * IcedTea7 2.3.3 > > All updates contain the following security fixes: > > * S6631398, CVE-2012-3216: FilePermission improved path checking > * S7093490: adjust package access in rmiregistry > * S7143535, CVE-2012-5068: ScriptEngine corrected permissions > * S7158796, CVE-2012-5070: Tighten properties checking in EnvHelp > * S7158807: Revise stack management with volatile call sites > * S7163198, CVE-2012-5076: Tightened package accessibility > * S7167656, CVE-2012-5077: Multiple Seeders are being created > * S7169884, CVE-2012-5073: LogManager checks do not work correctly > for sub-types > * S7169887, CVE-2012-5074: Tightened package accessibility > * S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI > connector > * S7172522, CVE-2012-5072: Improve DomainCombiner checking > * S7186286, CVE-2012-5081: TLS implementation to better adhere to > RFC > * S7189103, CVE-2012-5069: Executors needs to maintain state > * S7189490: More improvements to DomainCombiner checking > * S7189567, CVE-2012-5085: java net obselete protocol > * S7192975, CVE-2012-5071: Issue with JMX reflection > * S7195194, CVE-2012-5084: Better data validation for Swing > * S7195549, CVE-2012-5087: Better bean object persistence > * S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should > be improved > * S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without > needing to create instance > * S7196190, CVE-2012-5088: Improve method of handling MethodHandles > * S7198296, CVE-2012-5089: Refactor classloader usage > * S7158801: Improve VM CompileOnly option > * S7158804: Improve config file parsing > * S7198606, CVE-2012-4416: Improve VM optimization > > We believe that the 2.3.3 release takes IcedTea beyond u9[*], > providing security > updates from u7 and u9 on top of an OpenJDK7 u6 base, along with > additional > IcedTea patches to allow builds against system libraries and to > support more > estoric architectures. > > Please note support for alternative VM solutions (CACAO, Shark, Zero) > may be > lacking in this release, as there has been little time for testing > non-standard > builds, and Zero is known to not work with 2.2.x (and only with 2.3.x > via > using the HotSpot from 2.1.x). Patches are welcome; please contact > the mailing > list (distro-pkg-dev at openjdk.java.net) and/or file > bugs (http://icedtea.classpath.org/bugzilla) under the appropriate > component. > An update release may follow to correct issues with these builds, if > necessary, > but we deem it important to get the security updates out for > mainstream builds > as quickly as possible without further delay. > > Full details of each release can be found below. > > What?s New? > ?????? > > New in release 2.1.3 (2012-10-17): > > * Security fixes > - S6631398, CVE-2012-3216: FilePermission improved path checking > - S7093490: adjust package access in rmiregistry > - S7143535, CVE-2012-5068: ScriptEngine corrected permissions > - S7158796, CVE-2012-5070: Tighten properties checking in EnvHelp > - S7158807: Revise stack management with volatile call sites > - S7163198, CVE-2012-5076: Tightened package accessibility > - S7167656, CVE-2012-5077: Multiple Seeders are being created > - S7169884, CVE-2012-5073: LogManager checks do not work correctly > for sub-types > - S7169887, CVE-2012-5074: Tightened package accessibility > - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX > RMI connector > - S7172522, CVE-2012-5072: Improve DomainCombiner checking > - S7186286, CVE-2012-5081: TLS implementation to better adhere to > RFC > - S7189103, CVE-2012-5069: Executors needs to maintain state > - S7189490: More improvements to DomainCombiner checking > - S7189567, CVE-2012-5085: java net obselete protocol > - S7192975, CVE-2012-5071: Issue with JMX reflection > - S7195194, CVE-2012-5084: Better data validation for Swing > - S7195549, CVE-2012-5087: Better bean object persistence > - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should > be improved > - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without > needing to create instance > - S7196190, CVE-2012-5088: Improve method of handling MethodHandles > - S7198296, CVE-2012-5089: Refactor classloader usage > - S7158801: Improve VM CompileOnly option > - S7158804: Improve config file parsing > - S7198606, CVE-2012-4416: Improve VM optimization > * Backports > - S7175845: "jar uf" changes file permissions unexpectedly > - S7177216: native2ascii changes file permissions of input file > - S7106773: 512 bits RSA key cannot work with SHA384 and SHA512 > - S7158800: Improve storage of symbol tables > * Bug fixes > - Remove merge artefact. > - Remove the Xp header and library checks. > > New in release 2.2.3 (2012-10-17): > > * Security fixes > - S6631398, CVE-2012-3216: FilePermission improved path checking > - S7093490: adjust package access in rmiregistry > - S7143535, CVE-2012-5068: ScriptEngine corrected permissions > - S7158796, CVE-2012-5070: Tighten properties checking in EnvHelp > - S7158807: Revise stack management with volatile call sites > - S7163198, CVE-2012-5076: Tightened package accessibility > - S7167656, CVE-2012-5077: Multiple Seeders are being created > - S7169884, CVE-2012-5073: LogManager checks do not work correctly > for sub-types > - S7169887, CVE-2012-5074: Tightened package accessibility > - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX > RMI connector > - S7172522, CVE-2012-5072: Improve DomainCombiner checking > - S7186286, CVE-2012-5081: TLS implementation to better adhere to > RFC > - S7189103, CVE-2012-5069: Executors needs to maintain state > - S7189490: More improvements to DomainCombiner checking > - S7189567, CVE-2012-5085: java net obselete protocol > - S7192975, CVE-2012-5071: Issue with JMX reflection > - S7195194, CVE-2012-5084: Better data validation for Swing > - S7195549, CVE-2012-5087: Better bean object persistence > - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should > be improved > - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without > needing to create instance > - S7196190, CVE-2012-5088: Improve method of handling MethodHandles > - S7198296, CVE-2012-5089: Refactor classloader usage > - S7158801: Improve VM CompileOnly option > - S7158804: Improve config file parsing > - S7198606, CVE-2012-4416: Improve VM optimization > * Backports > - S7175845: "jar uf" changes file permissions unexpectedly > - S7177216: native2ascii changes file permissions of input file > - S7158800: Improve storage of symbol tables > * Bug fixes > - Remove merge artefact. > - Remove the Xp header and library checks. > > New in release 2.3.3 (2012-10-17): > > * Security fixes > - S6631398, CVE-2012-3216: FilePermission improved path checking > - S7093490: adjust package access in rmiregistry > - S7143535, CVE-2012-5068: ScriptEngine corrected permissions > - S7158796, CVE-2012-5070: Tighten properties checking in EnvHelp > - S7158807: Revise stack management with volatile call sites > - S7163198, CVE-2012-5076: Tightened package accessibility > - S7167656, CVE-2012-5077: Multiple Seeders are being created > - S7169884, CVE-2012-5073: LogManager checks do not work correctly > for sub-types > - S7169887, CVE-2012-5074: Tightened package accessibility > - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX > RMI connector > - S7172522, CVE-2012-5072: Improve DomainCombiner checking > - S7186286, CVE-2012-5081: TLS implementation to better adhere to > RFC > - S7189103, CVE-2012-5069: Executors needs to maintain state > - S7189490: More improvements to DomainCombiner checking > - S7189567, CVE-2012-5085: java net obselete protocol > - S7192975, CVE-2012-5071: Issue with JMX reflection > - S7195194, CVE-2012-5084: Better data validation for Swing > - S7195549, CVE-2012-5087: Better bean object persistence > - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should > be improved > - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without > needing to create instance > - S7196190, CVE-2012-5088: Improve method of handling MethodHandles > - S7198296, CVE-2012-5089: Refactor classloader usage > - S7158800: Improve storage of symbol tables > - S7158801: Improve VM CompileOnly option > - S7158804: Improve config file parsing > - S7198606, CVE-2012-4416: Improve VM optimization > * Bug fixes > - Remove merge artefact. > - Remove the Xp header and library checks. > * JamVM > - PR1155: Do not put version number in libjvm.so SONAME > > The tarballs can be downloaded from: > > * http://icedtea.classpath.org/download/source/icedtea-2.1.3.tar.gz > * http://icedtea.classpath.org/download/source/icedtea-2.2.3.tar.gz > * http://icedtea.classpath.org/download/source/icedtea-2.3.3.tar.gz > > SHA256 checksums: > > 1929e57eb6718d30735e1e04e9e129457f845f7d7a8404b2b028740d0779ddb6 > icedtea-2.1.3.tar.gz > 4397ef71a0d729521be70f920bfc3fb6aec3455f1619b538cea75df512df1a16 > icedtea-2.2.3.tar.gz > e5ac5564e00c4a8d7b3376ed6de91b18a2587c8abdad802ccc92c780765b1073 > icedtea-2.3.3.tar.gz > > Each tarball is accompanied by a digital signature (available at the > above URL + '.sig'). This is produced using my public key. See > details below. > > The following people helped with these releases: > > * Elliott Baron (creation of reproducers for S7163198/S7169887 & > S7186286, checking S7189103 & S7189567) > * Deepak Bhole (creation of reproducer for S7093490) > * Andrew John Hughes (applying all security patches, backports & bug > fixes, reproducer runs, release management) > * Omair Majid (creation of reproducers for S7167656, S7172522, > S7195549 & S7195917) > * Chris Phillips (checking S7143535, S7169884 & S7198606 reproducers) > * Roman Kennke (creation of reproducers for S7158796, S7192975 & > S7198296) > * Pavel Tisnovsky (additional reproducer runs) > * Mario Torre (creation of reproducers for S6631398, S7195919 & > S7196190, checking S7195194 reproducer) > * Jon VanAlten (creation of reproducer for S7158801, checking > S7158800, S7158804 & S7158807) > > We would also like to thank the bug reporters and testers! > > To get started: > > $ tar xzf icedtea-${ver}.tar.gz > > Full build requirements and instructions are in INSTALL: > > $ mkdir icedtea6-build > $ cd icedtea6-build > $ ../icedtea6-${ver}/configure [--enable-zero --enable-pulse-java > --enable-systemtap ...] > $ make > > Happy hacking! > > * It is difficult to make authoritative statements about u9 as the > release > is proprietary. Oracle still do not provide GPL binaries based on > OpenJDK. > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > PGP Key: 248BDC07 (https://keys.indymedia.org/) > Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 > Thanks also to Severin Gehwolf for doing the work with Elliott Baron credited above. Sorry, just didn't have my nickname decoder ring handy at the time... -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From adomurad at redhat.com Wed Oct 17 13:18:21 2012 From: adomurad at redhat.com (Adam Domurad) Date: Wed, 17 Oct 2012 16:18:21 -0400 Subject: [PATCH] Reproducer for PR1186 In-Reply-To: <50749D80.9040203@redhat.com> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <50749D80.9040203@redhat.com> Message-ID: <507F128D.7070001@redhat.com> On 10/09/2012 05:56 PM, Omair Majid wrote: > On 10/09/2012 01:52 PM, Omair Majid wrote: >> Fix attached. > A functional test is attached too. > > Thanks, > Omair Good patch+reproducer. Feel free to push. Thanks. From stefan at complang.tuwien.ac.at Wed Oct 17 14:23:04 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Wed, 17 Oct 2012 23:23:04 +0200 Subject: RFC: PR1176: Added --with-cacao-src-dir option Message-ID: Hi, this is the first part of makefile synchronization. I'd really like to see this go in. It would also help get CACAO's buildbot off the ground. Cheers https://bitbucket.org/Ringdingcoder/icedtea7/changeset/36af76cba7dea4538f9183ab437369be17d01749 2012-10-17 Stefan Ring * configure.ac: Added --with-cacao-src-dir option, along the lines of Mercurial rev 66ad418c7b91 from icedtea6. * acinclude.m4: New macro IT_WITH_CACAO_SRC_DIR. * Makefile.am: Copy CACAO sources when USE_ALT_CACAO_SRC_DIR is used. diff -r 67d42446bc250967387ebb973857c0e01d6fc487 -r 36af76cba7dea4538f9183ab437369be17d01749 Makefile.am --- a/Makefile.am Wed Sep 26 14:52:49 2012 +0100 +++ b/Makefile.am Wed Oct 17 23:13:04 2012 +0200 @@ -1068,6 +1068,8 @@ stamps/download-cacao.stamp: if BUILD_CACAO if !USE_SYSTEM_CACAO +if USE_ALT_CACAO_SRC_DIR +else if USE_ALT_CACAO_SRC_ZIP ln -sf $(ALT_CACAO_SRC_ZIP) $(CACAO_SRC_ZIP) endif @@ -1089,6 +1091,7 @@ fi endif endif +endif mkdir -p stamps touch $@ @@ -1268,6 +1271,14 @@ stamps/extract-cacao.stamp: stamps/download-cacao.stamp if BUILD_CACAO if !USE_SYSTEM_CACAO +if USE_ALT_CACAO_SRC_DIR + set -e ; \ + if ! test -d cacao/cacao ; \ + then \ + mkdir cacao ; \ + cp -rL $(ALT_CACAO_SRC_DIR) cacao/cacao ; \ + fi +else set -e ; \ if ! test -d cacao/cacao ; \ then \ @@ -1280,6 +1291,7 @@ fi endif endif +endif mkdir -p stamps touch $@ diff -r 67d42446bc250967387ebb973857c0e01d6fc487 -r 36af76cba7dea4538f9183ab437369be17d01749 acinclude.m4 --- a/acinclude.m4 Wed Sep 26 14:52:49 2012 +0100 +++ b/acinclude.m4 Wed Oct 17 23:13:04 2012 +0200 @@ -805,7 +805,7 @@ AC_MSG_ERROR([Invalid CACAO source zip specified: ${ALT_CACAO_SRC_ZIP}]) fi ], - [ + [ ALT_CACAO_SRC_ZIP="not specified" ]) AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test "x${ALT_CACAO_SRC_ZIP}" != "xnot specified") @@ -813,6 +813,27 @@ AC_SUBST(ALT_CACAO_SRC_ZIP) ]) +AC_DEFUN([IT_WITH_CACAO_SRC_DIR], +[ + AC_MSG_CHECKING(for a CACAO source directory) + AC_ARG_WITH([cacao-src-dir], + [AS_HELP_STRING(--with-cacao-src-dir,specify the location of the CACAO sources)], + [ + ALT_CACAO_SRC_DIR=${withval} + if test "x${ALT_CACAO_SRC_DIR}" = "xno"; then + ALT_CACAO_SRC_DIR="not specified" + elif ! test -d ${ALT_CACAO_SRC_DIR} ; then + AC_MSG_ERROR([Invalid CACAO source dir specified: ${ALT_CACAO_SRC_DIR}]) + fi + ], + [ + ALT_CACAO_SRC_DIR="not specified" + ]) + AM_CONDITIONAL(USE_ALT_CACAO_SRC_DIR, test "x${ALT_CACAO_SRC_DIR}" != "xnot specified") + AC_MSG_RESULT(${ALT_CACAO_SRC_DIR}) + AC_SUBST(ALT_CACAO_SRC_DIR) +]) + AC_DEFUN([IT_ENABLE_HG], [ AC_REQUIRE([IT_WITH_PROJECT]) diff -r 67d42446bc250967387ebb973857c0e01d6fc487 -r 36af76cba7dea4538f9183ab437369be17d01749 configure.ac --- a/configure.ac Wed Sep 26 14:52:49 2012 +0100 +++ b/configure.ac Wed Oct 17 23:13:04 2012 +0200 @@ -148,6 +148,7 @@ IT_ENABLE_CACAO IT_WITH_CACAO_HOME IT_WITH_CACAO_SRC_ZIP +IT_WITH_CACAO_SRC_DIR IT_ENABLE_JAMVM IT_WITH_JAMVM_SRC_ZIP From ptisnovs at icedtea.classpath.org Thu Oct 18 01:34:28 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 18 Oct 2012 08:34:28 +0000 Subject: /hg/gfx-test: Ten new tests added to the test suite src/org/gfxt... Message-ID: changeset 43a3d3f76330 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=43a3d3f76330 author: Pavel Tisnovsky date: Thu Oct 18 10:37:07 2012 +0200 Ten new tests added to the test suite src/org/gfxtest/testsuites/BitBltScaleImage.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltScaleImage.java | 204 +++++++++++++++++++++++ 2 files changed, 209 insertions(+), 0 deletions(-) diffs (226 lines): diff -r 4b537533c9fe -r 43a3d3f76330 ChangeLog --- a/ChangeLog Tue Oct 16 15:08:28 2012 +0200 +++ b/ChangeLog Thu Oct 18 10:37:07 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-18 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltScaleImage.java: + Ten new tests added to this test suite. + 2012-10-16 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltBasicTests.java: diff -r 4b537533c9fe -r 43a3d3f76330 src/org/gfxtest/testsuites/BitBltScaleImage.java --- a/src/org/gfxtest/testsuites/BitBltScaleImage.java Tue Oct 16 15:08:28 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltScaleImage.java Thu Oct 18 10:37:07 2012 +0200 @@ -419,6 +419,210 @@ } /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to a double size in both dimensions. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRScaleTwoTimes(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH * 2, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT * 2); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one half size in both dimensions. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRScaleOneHalf(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH / 2, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT / 2); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one third size in both dimensions. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRScaleOneThird(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH / 3, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT / 3); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to two thirds size in both dimensions. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRScaleTwoThirds(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH * 2 / 3, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT *2 / 3); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to a double size in horizontal dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRHScaleTwoTimes(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH * 2, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one half size in horizontal dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRHScaleOneHalf(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH / 2, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one third size in horizontal dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRHScaleOneThird(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH / 3, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to two thirds size in horizontal dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRHScaleTwoThirds(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH * 2 / 3, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to a double size in vertical dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRVScaleTwoTimes(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT * 2); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one half size in vertical dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRVScaleOneHalf(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT / 2); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one third size in vertical dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRVScaleOneThird(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT / 3); + } + + /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to two thirds size in vertical dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageType3ByteBGRVScaleTwoThirds(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT *2 / 3); + } + + /** * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_BYTE_BINARY. * The image is scaled to a double size in both dimensions. * From ptisnovs at icedtea.classpath.org Thu Oct 18 01:52:57 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 18 Oct 2012 08:52:57 +0000 Subject: /hg/rhino-tests: Added five new tests to the test suite src/org/... Message-ID: changeset bff3d4a426f4 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=bff3d4a426f4 author: Pavel Tisnovsky date: Thu Oct 18 10:55:40 2012 +0200 Added five new tests to the test suite src/org/RhinoTests/ScriptEngineClassTest.java. diffstat: ChangeLog | 5 ++ src/org/RhinoTests/ScriptEngineClassTest.java | 54 +++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 0 deletions(-) diffs (76 lines): diff -r a9ef7cd38b16 -r bff3d4a426f4 ChangeLog --- a/ChangeLog Wed Oct 17 15:03:26 2012 +0200 +++ b/ChangeLog Thu Oct 18 10:55:40 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-18 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptEngineClassTest.java: + Added five new tests to this test suite. + 2012-10-17 Pavel Tisnovsky * src/org/RhinoTests/SimpleBindingsClassTest.java: diff -r a9ef7cd38b16 -r bff3d4a426f4 src/org/RhinoTests/ScriptEngineClassTest.java --- a/src/org/RhinoTests/ScriptEngineClassTest.java Wed Oct 17 15:03:26 2012 +0200 +++ b/src/org/RhinoTests/ScriptEngineClassTest.java Thu Oct 18 10:55:40 2012 +0200 @@ -136,6 +136,60 @@ } /** + * Test for method javax.script.ScriptEngine.getClass().isAnnotation() + */ + protected void testIsAnnotation() { + assertFalse(this.scriptEngineClass.isAnnotation(), + "Method ScriptEngine.getClass().isAnnotation() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptEngine.getClass().isAnnotationPresent() + */ + protected void testIsAnnotationPresent() { + assertFalse(this.scriptEngineClass.isAnnotationPresent(java.lang.annotation.Annotation.class), + "Method ScriptEngine.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value"); + assertFalse(this.scriptEngineClass.isAnnotationPresent(java.lang.annotation.Documented.class), + "Method ScriptEngine.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value"); + assertFalse(this.scriptEngineClass.isAnnotationPresent(java.lang.annotation.Inherited.class), + "Method ScriptEngine.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value"); + assertFalse(this.scriptEngineClass.isAnnotationPresent(java.lang.annotation.Retention.class), + "Method ScriptEngine.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value"); + assertFalse(this.scriptEngineClass.isAnnotationPresent(java.lang.annotation.Target.class), + "Method ScriptEngine.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value"); + assertFalse(this.scriptEngineClass.isAnnotationPresent(java.lang.Deprecated.class), + "Method ScriptEngine.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value"); + assertFalse(this.scriptEngineClass.isAnnotationPresent(java.lang.Override.class), + "Method ScriptEngine.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value"); + assertFalse(this.scriptEngineClass.isAnnotationPresent(java.lang.SuppressWarnings.class), + "Method ScriptEngine.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value"); + } + + /** + * Test for method javax.script.ScriptEngine.getClass().isAnonymousClass() + */ + protected void testIsAnonymousClass() { + assertFalse(this.scriptEngineClass.isAnonymousClass(), + "Method ScriptEngine.getClass().isAnonymousClass() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptEngine.getClass().isArray() + */ + protected void testIsArray() { + assertFalse(this.scriptEngineClass.isArray(), + "Method ScriptEngine.getClass().isArray() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptEngine.getClass().isEnum() + */ + protected void testIsEnum() { + assertFalse(this.scriptEngineClass.isEnum(), + "Method ScriptEngine.getClass().isEnum() returns wrong value"); + } + + /** * Test for method javax.script.ScriptEngine.getClass().getInterfaces() */ protected void testGetInterfaces() { From andrew.zhogin at gmail.com Thu Oct 18 01:55:48 2012 From: andrew.zhogin at gmail.com (Andrew Zhogin) Date: Thu, 18 Oct 2012 15:55:48 +0700 Subject: Fwd: zero-shark ldc bugfix In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Andrew Zhogin Date: Thu, Oct 11, 2012 at 6:19 PM Subject: zero-shark ldc bugfix To: zero-dev at openjdk.java.net Hi. I found problem with shark code generation for ldc* opcodes. Crash example (launch with -Xcomp): import java.text.*; import java.util.Locale; import java.util.Currency; import sun.util.LocaleServiceProviderPool; import java.util.spi.CurrencyNameProvider; public class test { public static void main(String[] args) { LocaleServiceProviderPool.getPool(CurrencyNameProvider.class); } } In SharkConstant constructor: already mirrored unloaded-class object is not expected and is_loaded is set to true. Java-mirror object for klass is not "is_klass", just an object. Here is patch in attachment. -- Best regards, Andrew Zhogin. -------------- next part -------------- A non-text attachment was scrubbed... Name: 2491.patch Type: application/octet-stream Size: 2482 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121018/a79eaee9/2491.patch From jvanek at redhat.com Thu Oct 18 06:36:37 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 18 Oct 2012 15:36:37 +0200 Subject: [fyi][icedtea-web]Refactoring of reproducers as agreed in April In-Reply-To: <5075BAEB.3060203@redhat.com> References: <4FEB549E.40402@redhat.com> <4FEB5F21.9020902@redhat.com> <4FEC4648.8050307@redhat.com> <4FEC7631.2040405@redhat.com> <4FEC7BE9.8020609@redhat.com> <4FEC83BB.3050807@redhat.com> <4FEDA48E.9040104@redhat.com> <4FEDD0BA.6040207@redhat.com> <4FF1A346.2080000@redhat.com> <4FF30809.7070606@redhat.com> <5075BAEB.3060203@redhat.com> Message-ID: <508005E5.1060705@redhat.com> On 10/10/2012 08:14 PM, Omair Majid wrote: > On 07/03/2012 10:56 AM, Jiri Vanek wrote: >> Hi. Updated renaming patch. Please chheck that I did not screw any >> renaming :-/ >> > > They look okay to me; I don't see typos. I assume you used a program to > perform automatic renaming, right? Thank you very much for review. Assuming the one bellow do ot belongs to patch, ok for head and 1.3? > >> diff -r cbb73b27594b netx-dist-tests-whitelist >> --- a/netx-dist-tests-whitelist Tue Jul 03 16:42:52 2012 +0200 >> +++ b/netx-dist-tests-whitelist Tue Jul 03 16:53:39 2012 +0200 >> @@ -1,1 +1,1 @@ >> -.* >> +.*esource.*est* > > I don't follow what this is doing. Could you explain or add a comment in > the file? Sorry, Did not belongs to patch. It is regex for launching Resource Tests:) This file should be for ever containing *. . J. > > Thanks, > Omair From jvanek at redhat.com Thu Oct 18 06:46:31 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 18 Oct 2012 15:46:31 +0200 Subject: [icedtea-web][rfc] Fix to AppletBaseURL reproducer In-Reply-To: <507DC3E4.4010907@redhat.com> References: <507853E1.70905@redhat.com> <507DBBEA.4030507@redhat.com> <507DC272.1010405@redhat.com> <507DC3E4.4010907@redhat.com> Message-ID: <50800837.7040000@redhat.com> On 10/16/2012 10:30 PM, Omair Majid wrote: > On 10/16/2012 04:24 PM, Adam Domurad wrote: >> I would argue that the 'xception' matcher is overly broad and a test >> weakness. Currently there is a NPE while looking up the security context >> - which I think is caused by this exit() call. > > I am surprised. This test is running inside a browser right? Could you > take a look into why NPE is happening when you have some time? > >> However, there's a lot of >> things that can cause exceptions on shutdown, I think (Jiri may know >> better here.) This is why I'm in favour of changing 'xception' to the >> appropriate exception, or getting rid of it if its just a catch-all. > > I don't really like the idea of 'appropriate exception'. If an exception > happens (and not just looged to stdout), things are not working as > desired and the test should fail. What is an appropriate exception? Who > determines if an exception is appropriate? > > Does it really matter what exception is causing things to not function? > > That said, I am aware of errors like ThreadDeath causing exceptions in > random places (such as in locking code) that really cant be worked > around in icedtea-web. > >> Updated patch attached, with 'xception' matcher still removed. > > Looks fine to me, though it includes unrelated changes from another patch. > I had similar feelings as Omair when I was writing *xception. However it really is appearing as bad idea. The main reason is occasional "random" exception thrown from browser. I assume this is happening because of killing it so many times. I'm looking forward whamagic will do Pavels "window closer". Thank you both for elaborating on this issue. J. From omajid at redhat.com Thu Oct 18 08:24:00 2012 From: omajid at redhat.com (Omair Majid) Date: Thu, 18 Oct 2012 11:24:00 -0400 Subject: [fyi][icedtea-web]Refactoring of reproducers as agreed in April In-Reply-To: <508005E5.1060705@redhat.com> References: <4FEB549E.40402@redhat.com> <4FEB5F21.9020902@redhat.com> <4FEC4648.8050307@redhat.com> <4FEC7631.2040405@redhat.com> <4FEC7BE9.8020609@redhat.com> <4FEC83BB.3050807@redhat.com> <4FEDA48E.9040104@redhat.com> <4FEDD0BA.6040207@redhat.com> <4FF1A346.2080000@redhat.com> <4FF30809.7070606@redhat.com> <5075BAEB.3060203@redhat.com> <508005E5.1060705@redhat.com> Message-ID: <50801F10.8090503@redhat.com> On 10/18/2012 09:36 AM, Jiri Vanek wrote: > On 10/10/2012 08:14 PM, Omair Majid wrote: >> On 07/03/2012 10:56 AM, Jiri Vanek wrote: >>> Hi. Updated renaming patch. Please chheck that I did not screw any >>> renaming :-/ >>> >> >> They look okay to me; I don't see typos. I assume you used a program to >> perform automatic renaming, right? > > Thank you very much for review. Assuming the one bellow do ot belongs to > patch, ok for head and 1.3? Yeah, sounds okay to me. Could you please push to head and let it bake for a few days before adding to 1.3? >> >>> diff -r cbb73b27594b netx-dist-tests-whitelist >>> --- a/netx-dist-tests-whitelist Tue Jul 03 16:42:52 2012 +0200 >>> +++ b/netx-dist-tests-whitelist Tue Jul 03 16:53:39 2012 +0200 >>> @@ -1,1 +1,1 @@ >>> -.* >>> +.*esource.*est* >> >> I don't follow what this is doing. Could you explain or add a comment in >> the file? > Sorry, Did not belongs to patch. It is regex for launching Resource Tests:) > This file should be for ever containing *. . Ah.. So this is what I should be modifying if I want to run just a single reproducer? All this time I have just been deleting all the reproducers I did not want to run :) Cheers, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From adomurad at redhat.com Thu Oct 18 09:30:20 2012 From: adomurad at redhat.com (Adam Domurad) Date: Thu, 18 Oct 2012 12:30:20 -0400 Subject: [rfc] [icedtea-web] Reproducer for clipboard (reopened PR708) In-Reply-To: <4FC4E990.6090200@redhat.com> References: <4FC4E990.6090200@redhat.com> Message-ID: <50802E9C.60809@redhat.com> On 05/29/2012 11:21 AM, Jiri Vanek wrote: > 2012-05-29 Jiri Vanek > > Added clipboard reproducers > * > tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy1.jnlp: > Jnlp to invoke manual copying to clipboard on signed app, please note > the delayed death of application > * > tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy2.jnlp: > Jnlp to invoke jtextfield like copying signed app, please note the > delayed death of application > * > tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste1.jnlp: > Jnlp to invoke manual pasting on signed application > * > tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste2.jnlp: > Jnlp to invoke jtextfield like pasting on signed application > * > tests/jnlp_tests/signed/ClipboardContentSigned/srcs/ClipboardContentSigned.java: > Application which is trying to access clipboard by various ways. > * > tests/jnlp_tests/signed/ClipboardContentSigned/testcases/ClipboardContentSignedTests.java: > Automated tests for four above jnlps. > * > tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentCopy1.jnlp: > Jnlp to invoke manual copying to clipboard on unsigned app, please > note > the delayed death of application > * > tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentCopy2.jnlp: > Jnlp to invoke jtextfield like copying unsigned app, please note the > delayed death of application > * > tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentPaste1.jnlp: > Jnlp to invoke manual pasting on unsigned application > * > tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentPaste2.jnlp: > Jnlp to invoke jtextfield like pasting on unsigned application > * > tests/jnlp_tests/simple/ClipboardContent/srcs/ClipboardContent.java: > Application which is trying to access clipboard by various ways. > * > tests/jnlp_tests/simple/ClipboardContent/testcases/ClipboardContentTests.java: > Automated tests for first and third of above four jnlps. The tests of > second and fourth is disabled due to necessary manual interaction > > Hi all ! whatever happens in PR708 this reproducers should remains > green ;) > > There is one part of in testcases which may be unclear to reviewer, > and it is parallel run of copier (test/application) and paster > (application/test). In way that test have copied to clipboard and > javaws have paste from it, then there is no issue, because test is > eternal running clipboard owner (who is waiting for his javaws to > finish) so javaws can paste without problems. > The problem occurred when javaws copied to clipboard and test have to > read from it. In this case I had to make javaws run in parallel with > test for a while (I have 10seconds timeout, and test is NOT waiting > for it to time-out, I just neede to have clipboard owner > (javaws)alive, until I test the value. The issue is that when (java > as) clipboard owner ends, everything it puts to clipboard die with it. > > I was on doubt just to test access to clipboard and so get rid of this > paralelisation but it did not seems to me enough. I would rather test > the real value in clipboard. > > > So rfc! Best regards > J. > Hi Jiri, I remember looking at this a while back, sorry for letting it sit for so long (although you should have pinged it meanwhile :). Thanks for tackling this, comments inline. > diff -r 526df16b6e27 > tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy1.jnlp > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy1.jnlp > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,58 @@ > + > + > + > + > + ClipboardContentSignedCopy1 > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> > + ClipboardContentSignedCopy1 > + > + > + > + > + > + > + > + copy1 > + 10 > + > + > + > + > + > diff -r 526df16b6e27 > tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy2.jnlp > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy2.jnlp > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,58 @@ > + > + > + > + > + ClipboardContentSignedCopy2 > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> > + ClipboardContentSignedCopy2 > + > + > + > + > + > + > + > + copy2 > + 10 > + > + > + > + > + > diff -r 526df16b6e27 > tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste1.jnlp > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste1.jnlp > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,57 @@ > + > + > + > + > + ClipboardContentSignedPaste1 > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> > + ClipboardContentSignedPaste1 > + > + > + > + > + > + > + > + paste1 > + > + > + > + > + > diff -r 526df16b6e27 > tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste2.jnlp > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste2.jnlp > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,57 @@ > + > + > + > + > + ClipboardContentSignedPaste2 > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> > + ClipboardContentSignedPaste2 > + > + > + > + > + > + > + > + paste2 > + > + > + > + > + > diff -r 526df16b6e27 > tests/jnlp_tests/signed/ClipboardContentSigned/srcs/ClipboardContentSigned.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/signed/ClipboardContentSigned/srcs/ClipboardContentSigned.java > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,183 @@ > +/* ClipboardContentSigned.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import java.awt.Toolkit; > +import java.awt.datatransfer.Clipboard; > +import java.awt.datatransfer.DataFlavor; > +import java.awt.datatransfer.StringSelection; > +import java.awt.datatransfer.Transferable; > +import java.awt.datatransfer.UnsupportedFlavorException; > +import java.io.IOException; > +import java.lang.reflect.InvocationTargetException; > +import java.util.concurrent.TimeUnit; > +import javax.swing.JFrame; > +import javax.swing.JPanel; > +import javax.swing.JTextField; > +import javax.swing.SwingUtilities; > +import javax.swing.text.JTextComponent; > + > +public class ClipboardContentSigned extends JPanel { > + > + private static final String contentC = "COPY#$REPRODUCER"; > + private static final String contentP = "PASTE#$REPRODUCER"; > + > + private static class LocalFrame extends JFrame { > + > + JTextField t; > + > + public LocalFrame(String str) { > + super(); > + t = new JTextField(str); > + this.add(t); > + this.setSize(100, 100); > + this.pack(); > + t.selectAll(); > + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); > + } > + > + public void run() throws InterruptedException { > + SwingUtilities.invokeLater(new Runnable() { > + > + @Override > + public void run() { > + setVisible(true); > + > + } > + }); > + while (!this.isVisible()) { > + Thread.sleep(100); > + } > + } > + > + public JTextField getT() { > + return t; > + } > + } > + > + public void putToClipboard1(String str) { > + Toolkit toolkit = Toolkit.getDefaultToolkit(); > + Clipboard clipboard = toolkit.getSystemClipboard(); > + StringSelection strSel = new StringSelection(str); > + clipboard.setContents(strSel, null); > + printFlavors(); > + } > + > + public void putToClipboard2(final String str) throws > InterruptedException, NoSuchMethodException, IllegalAccessException, > UnsupportedFlavorException, IllegalArgumentException, > InvocationTargetException, IOException { > + final LocalFrame lf = new LocalFrame(str); > + lf.run(); > + ((JTextComponent) (lf.getT())).copy(); > + printFlavors(); > + lf.dispose(); > + } > + > + public String pasteFromClipboard2() throws InterruptedException, > NoSuchMethodException, IllegalAccessException, > UnsupportedFlavorException, IllegalArgumentException, > InvocationTargetException, IOException { > + final LocalFrame lf = new LocalFrame("xxx"); > + lf.run(); > + ((JTextComponent) (lf.getT())).paste(); > + printFlavors(); > + String s = lf.getT().getText(); > + lf.dispose(); > + return s; > + } > + > + private void printFlavors() { > +//jsut for debuging jsut -> just, debuging -> debugging. > +// Toolkit toolkit = Toolkit.getDefaultToolkit(); > +// Clipboard clipboard = toolkit.getSystemClipboard(); > +// Transferable clipData = clipboard.getContents(clipboard); > +// DataFlavor[] cd = clipData.getTransferDataFlavors(); > +// for (DataFlavor dataFlavor : cd) { > +// System.out.println(dataFlavor.getMimeType()); > +// } > + } > + > + public String pasteFromClipboard1() throws > UnsupportedFlavorException, IOException { > + Toolkit toolkit = Toolkit.getDefaultToolkit(); > + Clipboard clipboard = toolkit.getSystemClipboard(); > + Transferable clipData = clipboard.getContents(clipboard); > + printFlavors(); > + String s = (String) (clipData.getTransferData( > + DataFlavor.stringFlavor)); > + return s; > + } > + > + public static void main(String[] args) throws Exception { > + ClipboardContentSigned cl = new ClipboardContentSigned(); > + if (args.length == 0) { > + throw new IllegalArgumentException("at least copy1|2 or > paste1|2 must be as argument (+mandatory number giving use timeout in > seconds before termination)"); > + } else if (args.length == 1) { > + cl.proceeed(args[0]); > + } else { > + cl.proceeed(args[0], args[1]); > + } > + > + } > + > + public void proceeed(String arg) throws Exception { > + proceeed(arg, 0); > + } > + > + public void proceeed(String arg, String keepAliveFor) throws > Exception { > + proceeed(arg, Long.valueOf(keepAliveFor)); > + } > + > + public void proceeed(String arg, long timeOut) throws Exception { > + if (arg.equals("copy1")) { > + System.out.println(this.getClass().getName() + " copying1 > to clipboard " + contentC); > + putToClipboard1(contentC); > + System.out.println(this.getClass().getName() + " copied1 > to clipboard " + pasteFromClipboard1()); > + } else if (arg.equals("paste1")) { > + System.out.println(this.getClass().getName() + " pasting1 > from clipboard "); > + String nwContent = pasteFromClipboard1(); > + System.out.println(this.getClass().getName() + " pasted1 > from clipboard " + nwContent); > + } else if (arg.equals("copy2")) { > + System.out.println(this.getClass().getName() + " copying2 > to clipboard " + contentC); > + putToClipboard2(contentC); > + System.out.println(this.getClass().getName() + " copied2 > to clipboard " + pasteFromClipboard2()); > + } else if (arg.equals("paste2")) { > + System.out.println(this.getClass().getName() + " pasting2 > from clipboard "); > + String nwContent = pasteFromClipboard2(); > + System.out.println(this.getClass().getName() + " pasted2 > from clipboard " + nwContent); > + } else { > + throw new IllegalArgumentException("supported copy1|2 > paste1|2"); > + } > + long start = System.nanoTime(); > + while (TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - > start) < timeOut) { > + Thread.sleep(500); > + } > + } > +} > diff -r 526df16b6e27 > tests/jnlp_tests/signed/ClipboardContentSigned/testcases/ClipboardContentSignedTests.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/signed/ClipboardContentSigned/testcases/ClipboardContentSignedTests.java > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,263 @@ > +/* ClipboardContentSignedTests.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import java.awt.Toolkit; > +import java.awt.datatransfer.Clipboard; > +import java.awt.datatransfer.DataFlavor; > +import java.awt.datatransfer.StringSelection; > +import java.awt.datatransfer.Transferable; > +import java.awt.datatransfer.UnsupportedFlavorException; > +import java.io.IOException; > +import java.util.Arrays; > +import java.util.Collections; > +import java.util.List; > +import net.sourceforge.jnlp.ContentReaderListener; > +import net.sourceforge.jnlp.ServerAccess; > +import net.sourceforge.jnlp.ServerAccess.ProcessResult; Since this has been deprecated, use the new location, s'il vous pla?t. > +import net.sourceforge.jnlp.annotations.Bug; > +import net.sourceforge.jnlp.annotations.NeedsDisplay; > +import org.junit.Assert; > + > +import org.junit.Test; > + > +public class ClipboardContentSignedTests { > + > + private static final String contentC = "COPY#$REPRODUCER"; > + private static final String contentP = "PASTE#$REPRODUCER"; > + private static final String emptyContent = "empty content"; > + private static ServerAccess server = new ServerAccess(); > + private static final List l = > Collections.unmodifiableList(Arrays.asList(new String[]{"-Xtrustall"})); I don't like this 'l' being used to describe this list (yes, I know that its everywhere :D), but, do as you will. > + > + public static void putToClipboard(String str) { > + Toolkit toolkit = Toolkit.getDefaultToolkit(); > + Clipboard clipboard = toolkit.getSystemClipboard(); > + StringSelection strSel = new StringSelection(str); > + clipboard.setContents(strSel, null); > + } > + > + public static String pasteFromClipboard() throws > UnsupportedFlavorException, IOException { > + Toolkit toolkit = Toolkit.getDefaultToolkit(); > + Clipboard clipboard = toolkit.getSystemClipboard(); > + Transferable clipData = clipboard.getContents(clipboard); > + String s = (String) (clipData.getTransferData( > + DataFlavor.stringFlavor)); > + return s; > + } > + > + @Test > + public void assertClipboardIsWorking() throws Exception { > + putToClipboard(emptyContent); > + Assert.assertEquals("Clipboard must contains new value, did > not", emptyContent, pasteFromClipboard()); > + putToClipboard(contentC); > + Assert.assertEquals("Clipboard must contains new value, did > not", contentC, pasteFromClipboard()); > + } > + > + private static class AsyncJavaws implements Runnable { The copypasting of the helper classes between ClipboardContentTest and ClipboardContentSignedTest is pretty hard for me to accept ... Do you think these are general enough to be pushed into 'test extensions' ? It would also keep intent of the tests clear. I'd be happy if you had other solutions. Perhaps you should have only one testing class, and have the signed/unsigned components be 'resources'? (Custom reproducer could handle this on one test, but its probably better to have custom reproducers always be 'specially prepared' tests) > + > + private final boolean headless; > + private final String url; > + private ProcessResult result; > + private ContentReaderListener contentReaderListener; > + private ContentReaderListener errorReaderListener; > + > + public AsyncJavaws(String url, boolean headless, > ContentReaderListener contentReaderListener, ContentReaderListener > errorReaderListener) { > + this.url = url; > + this.headless = headless; > + this.contentReaderListener = contentReaderListener; > + this.errorReaderListener = errorReaderListener; > + } > + > + @Override > + public void run() { > + try { > + if (headless) { > + result = server.executeJavawsHeadless(l, url, > contentReaderListener, errorReaderListener); This method signature doesn't exist now, can you either add 'null' to the end, or add a new delegate with the patch ? > + } else { > + result = server.executeJavaws(l, url, > contentReaderListener, errorReaderListener); > + } > + } catch (Exception ex) { > + if (result == null) { > + result = new ProcessResult("", ex.getMessage(), > null, true, 1, ex); > + } > + throw new RuntimeException(ex); > + } > + } > + > + public ProcessResult getResult() { > + return result; > + } > + } > + > + private static class WaitingForStringProcess implements > ContentReaderListener, Runnable { > + > + private final boolean headless; > + private final String url; > + private StringBuilder output = new StringBuilder(); > + private StringBuilder err = new StringBuilder(); > + private AsyncJavaws aj; > + ContentReaderListener errListener = new ContentReaderListener() { > + > + @Override > + public void charReaded(char ch) { > + err.append(ch); > + } > + > + @Override > + public void lineReaded(String s) { > + } > + }; > + private final String waitingFor; > + private boolean canRun = true; > + > + public WaitingForStringProcess(String url, boolean headless, > String waitingFor) { > + this.url = url; > + this.headless = headless; > + this.waitingFor = waitingFor; > + Assert.assertNotNull(waitingFor); > + Assert.assertNotNull(url); > + } > + > + @Override > + public void charReaded(char ch) { > + output.append(ch); > + } > + > + @Override > + public void lineReaded(String s) { > + if (s.contains(waitingFor)) { > + canRun = false; > + } > + } > + > + @Override > + public void run() { > + aj = new AsyncJavaws(url, headless, this, errListener); > + ServerAccess.logOutputReprint("Starting tread with " + > url + " and waiting for result or string " + waitingFor); tread -> thread > + new Thread(aj).start(); > + while (canRun && aj.getResult() == null) { > + try { > + Thread.sleep(100); > + } catch (InterruptedException ex) { > + ServerAccess.logErrorReprint("itteration > interrupted"); > + throw new RuntimeException(ex); > + } > + } > + if (aj.getResult() != null) { > + ServerAccess.logOutputReprint("Waiting done. Ressult > have been delivered"); Ressult -> result > + } > + if (!canRun) { > + ServerAccess.logOutputReprint("Waiting done. String " > + waitingFor + " delivered"); > + } > + } > + > + public String getErr() { > + return err.toString(); > + } > + > + public String getOutput() { > + return output.toString(); > + } > + > + public AsyncJavaws getAj() { I prefer the more verbose getAsyncJavaws() (if nothing else, Java coding is great typing practice :), especially if it becomes a general test-extension. If it stays within this test file, I can live with it. > + return aj; > + } > + } > + > + @Test > + @Bug(id = "PR708") > + public void ClipboardContentSignedTestCopy1() throws Exception { > + putToClipboard(emptyContent); > + Assert.assertEquals("Clipboard must contains new value, did > not", emptyContent, pasteFromClipboard()); > + WaitingForStringProcess wfsp = new > WaitingForStringProcess("/ClipboardContentSignedCopy1.jnlp", true, > "copied"); > + wfsp.run(); > + String ss = pasteFromClipboard(); > + Assert.assertEquals("Clipboard must contains new value, did > not", contentC, ss); > + String s = "xception"; I'm assuming no problems exist for javaws and matching 'xception'. Can you extract 's' as a meaningfully named constant ? Eg, XCEPTION would do fine. > + Assert.assertFalse("ClipboardContentSignedCopy stderr should not > contains " + s + " but did ", wfsp.getErr().contains(s)); > + } > + > + @Test > + @Bug(id = "PR708") > + @NeedsDisplay > + public void ClipboardContentSignedTestCopy2() throws Exception { > + putToClipboard(emptyContent); > + Assert.assertEquals("Clipboard must contains new value, did > not", emptyContent, pasteFromClipboard()); > + WaitingForStringProcess wfsp = new > WaitingForStringProcess("/ClipboardContentSignedCopy2.jnlp", false, > "copied"); > + wfsp.run(); > + String ss = pasteFromClipboard(); > + Assert.assertEquals("Clipboard must contains new value, did > not", contentC, ss); > + String s = "xception"; > + Assert.assertFalse("ClipboardContentSignedCopy stderr should > not contains " + s + " but did ", wfsp.getErr().contains(s)); > + > + } > + > + @Test > + @Bug(id = "PR708") > + public void ClipboardContentSignedTestPaste1() throws Exception { > + //necessery errasing > + putToClipboard(emptyContent); > + Assert.assertEquals("Clipboard must contains new value, did > not", emptyContent, pasteFromClipboard()); > + //now put the tested data > + putToClipboard(contentP); > + Assert.assertEquals("Clipboard must contains new value, did > not", contentP, pasteFromClipboard()); > + ServerAccess.ProcessResult pr = > server.executeJavawsHeadless(l, "/ClipboardContentSignedPaste1.jnlp"); > + Assert.assertTrue("ClipboardContentSignedTestPaste stdout > should contains " + contentP + " but didn't", > pr.stdout.contains(contentP)); > + String s = "xception"; > + Assert.assertFalse("ClipboardContentSignedTestPaste stderr > shouldnot contains " + s + " but did ", pr.stderr.contains(s)); > + Assert.assertFalse(pr.wasTerminated); > + Assert.assertEquals((Integer) 0, pr.returnValue); > + } > + > + @Test > + @Bug(id = "PR708") > + @NeedsDisplay > + public void ClipboardContentSignedTestPaste2() throws Exception { > + //necessery errasing > + putToClipboard(emptyContent); > + Assert.assertEquals("Clipboard must contains new value, did > not", emptyContent, pasteFromClipboard()); contains -> contain > + //now put the tested data > + putToClipboard(contentP); > + Assert.assertEquals("Clipboard must contains new value, did > not", contentP, pasteFromClipboard()); > + Assert.assertEquals("Clipboard must contains new value, did > not", contentP, pasteFromClipboard()); > + ServerAccess.ProcessResult pr = server.executeJavaws(l, > "/ClipboardContentSignedPaste2.jnlp"); > + Assert.assertTrue("ClipboardContentSignedTestPaste stdout > should contains " + contentP + " but didn't", > pr.stdout.contains(contentP)); > + String s = "xception"; > + Assert.assertFalse("ClipboardContentSignedTestPaste stderr > shouldnot contains " + s + " but did ", pr.stderr.contains(s)); shouldnot contains -> should not contain > + Assert.assertFalse(pr.wasTerminated); > + Assert.assertEquals((Integer) 0, pr.returnValue); > + } > +} > diff -r 526df16b6e27 > tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentCopy1.jnlp > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentCopy1.jnlp > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,58 @@ > + > + > + > + > + ClipboardContentCopy1 > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> > + ClipboardContentCopy1 > + > + > + > + > + > + > + > + copy1 > + 10 > + > + > + > + > + > diff -r 526df16b6e27 > tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentCopy2.jnlp > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentCopy2.jnlp > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,58 @@ > + > + > + > + > + ClipboardContentCopy2 > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> > + ClipboardContentCopy2 > + > + > + > + > + > + > + > + copy2 > + 10 > + > + > + > + > + > diff -r 526df16b6e27 > tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentPaste1.jnlp > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentPaste1.jnlp > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,57 @@ > + > + > + > + > + ClipboardContentPaste1 > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> > + ClipboardContentPaste1 > + > + > + > + > + > + > + > + paste1 > + > + > + > + > + > diff -r 526df16b6e27 > tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentPaste2.jnlp > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentPaste2.jnlp > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,57 @@ > + > + > + > + > + ClipboardContentPaste2 > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> > + ClipboardContentPaste2 > + > + > + > + > + > + > + > + paste2 > + > + > + > + > + > diff -r 526df16b6e27 > tests/jnlp_tests/simple/ClipboardContent/srcs/ClipboardContent.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/simple/ClipboardContent/srcs/ClipboardContent.java > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,183 @@ > +/* ClipboardContent.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import java.awt.Toolkit; > +import java.awt.datatransfer.Clipboard; > +import java.awt.datatransfer.DataFlavor; > +import java.awt.datatransfer.StringSelection; > +import java.awt.datatransfer.Transferable; > +import java.awt.datatransfer.UnsupportedFlavorException; > +import java.io.IOException; > +import java.lang.reflect.InvocationTargetException; > +import java.util.concurrent.TimeUnit; > +import javax.swing.JFrame; > +import javax.swing.JPanel; > +import javax.swing.JTextField; > +import javax.swing.SwingUtilities; > +import javax.swing.text.JTextComponent; > + > +public class ClipboardContent extends JPanel { > + > + private static final String contentC = "COPY#$REPRODUCER"; > + private static final String contentP = "PASTE#$REPRODUCER"; > + > + private static class LocalFrame extends JFrame { > + > + JTextField t; > + > + public LocalFrame(String str) { > + super(); > + t = new JTextField(str); > + this.add(t); > + this.setSize(100, 100); > + this.pack(); > + t.selectAll(); > + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); > + } > + > + public void run() throws InterruptedException { > + SwingUtilities.invokeLater(new Runnable() { > + > + @Override > + public void run() { > + setVisible(true); > + > + } > + }); > + while (!this.isVisible()) { > + Thread.sleep(100); > + } > + } > + > + public JTextField getT() { > + return t; > + } > + } > + > + public void putToClipboard1(String str) { > + Toolkit toolkit = Toolkit.getDefaultToolkit(); > + Clipboard clipboard = toolkit.getSystemClipboard(); > + StringSelection strSel = new StringSelection(str); > + clipboard.setContents(strSel, null); > + printFlavors(); > + } > + > + public void putToClipboard2(final String str) throws > InterruptedException, NoSuchMethodException, IllegalAccessException, > UnsupportedFlavorException, IllegalArgumentException, > InvocationTargetException, IOException { > + final LocalFrame lf = new LocalFrame(str); > + lf.run(); > + ((JTextComponent) (lf.getT())).copy(); > + printFlavors(); > + lf.dispose(); > + } > + > + public String pasteFromClipboard2() throws InterruptedException, > NoSuchMethodException, IllegalAccessException, > UnsupportedFlavorException, IllegalArgumentException, > InvocationTargetException, IOException { > + final LocalFrame lf = new LocalFrame("xxx"); > + lf.run(); > + ((JTextComponent) (lf.getT())).paste(); > + printFlavors(); > + String s = lf.getT().getText(); > + lf.dispose(); > + return s; > + } > + > + private void printFlavors() { > +//jsut for debuging > +// Toolkit toolkit = Toolkit.getDefaultToolkit(); > +// Clipboard clipboard = toolkit.getSystemClipboard(); > +// Transferable clipData = clipboard.getContents(clipboard); > +// DataFlavor[] cd = clipData.getTransferDataFlavors(); > +// for (DataFlavor dataFlavor : cd) { > +// System.out.println(dataFlavor.getMimeType()); > +// } > + } > + > + public String pasteFromClipboard1() throws > UnsupportedFlavorException, IOException { > + Toolkit toolkit = Toolkit.getDefaultToolkit(); > + Clipboard clipboard = toolkit.getSystemClipboard(); > + Transferable clipData = clipboard.getContents(clipboard); > + printFlavors(); > + String s = (String) (clipData.getTransferData( > + DataFlavor.stringFlavor)); > + return s; > + } > + > + public static void main(String[] args) throws Exception { > + ClipboardContent cl = new ClipboardContent(); > + if (args.length == 0) { > + throw new IllegalArgumentException("at least copy1|2 or > paste1|2 must be as argument (+mandatory number giving use timeout in > seconds before termination)"); > + } else if (args.length == 1) { > + cl.proceeed(args[0]); > + } else { > + cl.proceeed(args[0], args[1]); > + } > + > + } > + > + public void proceeed(String arg) throws Exception { proceeed -> proceed ? Unless you have a reason for three e's :) > + proceeed(arg, 0); > + } > + > + public void proceeed(String arg, String keepAliveFor) throws > Exception { > + proceeed(arg, Long.valueOf(keepAliveFor)); > + } > + > + public void proceeed(String arg, long timeOut) throws Exception { > + if (arg.equals("copy1")) { > + System.out.println(this.getClass().getName() + " copying1 > to clipboard " + contentC); > + putToClipboard1(contentC); > + System.out.println(this.getClass().getName() + " copied1 > to clipboard " + pasteFromClipboard1()); > + } else if (arg.equals("paste1")) { > + System.out.println(this.getClass().getName() + " pasting1 > from clipboard "); > + String nwContent = pasteFromClipboard1(); > + System.out.println(this.getClass().getName() + " pasted1 > from clipboard " + nwContent); > + } else if (arg.equals("copy2")) { > + System.out.println(this.getClass().getName() + " copying2 > to clipboard " + contentC); > + putToClipboard2(contentC); > + System.out.println(this.getClass().getName() + " copied2 > to clipboard " + pasteFromClipboard2()); > + } else if (arg.equals("paste2")) { > + System.out.println(this.getClass().getName() + " pasting2 > from clipboard "); > + String nwContent = pasteFromClipboard2(); > + System.out.println(this.getClass().getName() + " pasted2 > from clipboard " + nwContent); > + } else { > + throw new IllegalArgumentException("supported copy1|2 > paste1|2"); > + } > + long start = System.nanoTime(); > + while (TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - > start) < timeOut) { > + Thread.sleep(500); > + } > + } > +} > diff -r 526df16b6e27 > tests/jnlp_tests/simple/ClipboardContent/testcases/ClipboardContentTests.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/jnlp_tests/simple/ClipboardContent/testcases/ClipboardContentTests.java > Tue May 29 17:20:14 2012 +0200 > @@ -0,0 +1,265 @@ > +/* ClipboardContentTests.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import java.awt.Toolkit; > +import java.awt.datatransfer.Clipboard; > +import java.awt.datatransfer.DataFlavor; > +import java.awt.datatransfer.StringSelection; > +import java.awt.datatransfer.Transferable; > +import java.awt.datatransfer.UnsupportedFlavorException; > +import java.io.IOException; > +import java.util.Arrays; > +import java.util.Collections; > +import java.util.List; > +import net.sourceforge.jnlp.ContentReaderListener; > +import net.sourceforge.jnlp.ServerAccess; > +import net.sourceforge.jnlp.ServerAccess.ProcessResult; > +import net.sourceforge.jnlp.annotations.Bug; > +import net.sourceforge.jnlp.annotations.NeedsDisplay; > +import org.junit.Assert; > + > +import org.junit.Test; > + > +public class ClipboardContentTests { > + > + private static final String contentC = "COPY#$REPRODUCER"; > + private static final String contentP = "PASTE#$REPRODUCER"; > + private static final String emptyContent = "empty content"; > + private static ServerAccess server = new ServerAccess(); > + private static final List l = > Collections.unmodifiableList(Arrays.asList(new String[]{"-Xtrustall"})); > + > + public static void putToClipboard(String str) { > + Toolkit toolkit = Toolkit.getDefaultToolkit(); > + Clipboard clipboard = toolkit.getSystemClipboard(); > + StringSelection strSel = new StringSelection(str); > + clipboard.setContents(strSel, null); > + } Its not an issue at all, but the 'public' is a little funny for something that has no external existence :) > + > + public static String pasteFromClipboard() throws > UnsupportedFlavorException, IOException { > + Toolkit toolkit = Toolkit.getDefaultToolkit(); > + Clipboard clipboard = toolkit.getSystemClipboard(); > + Transferable clipData = clipboard.getContents(clipboard); > + String s = (String) (clipData.getTransferData( > + DataFlavor.stringFlavor)); > + return s; > + } > + > + @Test > + public void assertClipboardIsWorking() throws Exception { > + putToClipboard(emptyContent); > + Assert.assertEquals(emptyContent, pasteFromClipboard()); > + putToClipboard(contentC); > + Assert.assertEquals(contentC, pasteFromClipboard()); > + } > +[ ... Duplicate classes snipped for own sanity ...] > + > + @Test > + @Bug(id = "PR708") > + public void ClipboardContentTestCopy1() throws Exception { > + putToClipboard(emptyContent); > + Assert.assertEquals("Clipboard must contains new value, did > not", emptyContent, pasteFromClipboard()); > + WaitingForStringProcess wfsp = new > WaitingForStringProcess("/ClipboardContentCopy1.jnlp", true, "copied"); > + wfsp.run(); > + String ss = pasteFromClipboard(); > + Assert.assertEquals("Clipboard content must not be changed, > was, did not", emptyContent, ss); Should this be 'must not be changed, but was' ? > + Assert.assertNotNull("Result had to be delivered, was not", > wfsp.getAj().getResult()); > + String s = "xception"; > + Assert.assertTrue("ClipboardContentSignedCopy stderr should > contains " + s + " but did ", > wfsp.getAj().getResult().stderr.contains(s)); 'but did' -> 'but did not'. > + } > + > + //@Test needs awt robot to close dialog Surely simply adding HEADLESS will stop this dialog from occurring (and thus needing to be closed) ? > + @Bug(id = "PR708") > + @NeedsDisplay > + public void ClipboardContentTestCopy2() throws Exception { > + putToClipboard(emptyContent); > + Assert.assertEquals("Clipboard must contains new value, did > not", emptyContent, pasteFromClipboard()); > + WaitingForStringProcess wfsp = new > WaitingForStringProcess("/ClipboardContentCopy2.jnlp", false, "copied"); > + wfsp.run(); > + String ss = pasteFromClipboard(); > + Assert.assertEquals("Clipboard content must not be changed, > was", emptyContent, ss); > + Assert.assertNotNull("Result had to be delivered, was not", > wfsp.getAj().getResult()); > + String s = "xception"; > + Assert.assertTrue("ClipboardContentSignedCopy stderr should > contains " + s + " but did ", > wfsp.getAj().getResult().stderr.contains(s)); should contains -> should contain but did -> but did not > + > + } > + > + @Test > + @Bug(id = "PR708") > + public void ClipboardContentTestPaste1() throws Exception { > + //necessery errasing > + putToClipboard(emptyContent); > + Assert.assertEquals("Clipboard must contains new value, did > not", emptyContent, pasteFromClipboard()); contains -> contain > + //now put the tested data > + putToClipboard(contentP); > + Assert.assertEquals("Clipboard must contains new value, did > not", contentP, pasteFromClipboard()); > + ServerAccess.ProcessResult pr = > server.executeJavawsHeadless(l, "/ClipboardContentPaste1.jnlp"); > + Assert.assertFalse("ClipboardContentTestPaste stdout should > not contains " + contentP + " but didn", pr.stdout.contains(contentP)); didn -> didn't > + String s = "xception"; > + Assert.assertTrue("ClipboardContentTestPaste stderr should > contains " + s + " but didn't ", pr.stderr.contains(s)); > + Assert.assertFalse(pr.wasTerminated); > + Assert.assertEquals((Integer) 0, pr.returnValue); > + } > + > + //@Test needs awt robot to close dialog Same as above, seems to me making the run headless will suffice to have this as an automated test. > + @Bug(id = "PR708") > + @NeedsDisplay > + public void ClipboardContentTestPaste2() throws Exception { > + //necessery errasing > + putToClipboard(emptyContent); > + Assert.assertEquals("Clipboard must contains new value, did > not", emptyContent, pasteFromClipboard()); > + //now put the tested data > + putToClipboard(contentP); > + Assert.assertEquals("Clipboard must contains new value, did > not", contentP, pasteFromClipboard()); > + Assert.assertEquals("Clipboard must contains new value, did > not", contentP, pasteFromClipboard()); > + ServerAccess.ProcessResult pr = server.executeJavaws(l, > "/ClipboardContentPaste2.jnlp"); > + Assert.assertFalse("ClipboardContentTestPaste stdout should > not contains " + contentP + " but didn", pr.stdout.contains(contentP)); > + String s = "xception"; > + Assert.assertTrue("ClipboardContentTestPaste stderr should > contains " + s + " but didn't ", pr.stderr.contains(s)); > + Assert.assertFalse(pr.wasTerminated); > + Assert.assertEquals((Integer) 0, pr.returnValue); > + } > +} Content-wise the patch is good, nice work handling this tricky-to-test feature! Apologies for the nitpicking :) Thanks, - Adam From omajid at redhat.com Thu Oct 18 11:22:24 2012 From: omajid at redhat.com (Omair Majid) Date: Thu, 18 Oct 2012 14:22:24 -0400 Subject: [icedtea-web][rfc] Update on Danesh's major rework of JarCertVerifier In-Reply-To: <507725CB.4030009@redhat.com> References: <1348585163.17801.24.camel@adomurad-desktop> <5075A1C7.1050402@redhat.com> <507725CB.4030009@redhat.com> Message-ID: <508048E0.5000109@redhat.com> On 10/11/2012 04:02 PM, Adam Domurad wrote: > OK for HEAD? Yeah, let's get this in. Cheers, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From dbhole at icedtea.classpath.org Thu Oct 18 13:09:50 2012 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Thu, 18 Oct 2012 20:09:50 +0000 Subject: /hg/release/icedtea-web-1.3: PR1161: X509VariableTrustManager do... Message-ID: changeset 11c61503e614 in /hg/release/icedtea-web-1.3 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.3?cmd=changeset;node=11c61503e614 author: Deepak Bhole date: Mon Sep 17 16:40:25 2012 -0400 PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 diffstat: ChangeLog | 30 ++ Makefile.am | 3 + NEWS | 1 + acinclude.m4 | 9 +- netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 93 +++++- netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java | 5 +- netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java | 138 ++++++--- netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java | 75 +++++ netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java | 136 +++++++++ 9 files changed, 415 insertions(+), 75 deletions(-) diffs (truncated from 704 to 500 lines): diff -r 956ca57557a0 -r 11c61503e614 ChangeLog --- a/ChangeLog Wed Sep 05 17:54:22 2012 -0400 +++ b/ChangeLog Mon Sep 17 16:40:25 2012 -0400 @@ -1,3 +1,33 @@ +2012-09-17 Deepak Bhole + + PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 + * Makefile.am: If building with JDK 6, don't build + VariableX509TrustManagerJDK7. + * NEWS: Updated. + * acinclude.m4: In addition to setting VERSION_DEFS, also set HAVE_JAVA7 + if building with JDK7. + * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): Use new + getSSLSocketTrustManager() method to get the trust manager. + (getSSLSocketTrustManager): New method. Depending on runtime JRE version, + returns the appropriate trust manager. + * netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Removed + unused tm variable. + * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java: No + longer extends com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager. + (checkClientTrusted): Renamed to checkTrustClient and removed overloaded + implementations. + (checkServerTrusted): Renamed to checkTrustServer. Also, modified to + accept socket and engine (may be null). Assume that CN is mismatched by + default, rather than matched. If explicitly trusted, bypass other checks, + including CN mismatch. + (checkAllManagers): Modified to accept socket and engine. Modified to work + for both JDK6 and JDK7. + (getAcceptedIssuers): Make protected (called by others in package). + * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java: + New class -- X509TrustManager for JDK6. + * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java: + New class -- X509TrustManager for JDK7. + 2012-09-05 Jiri Vanek Fixing several errors which were causing incorrect behaviour causing diff -r 956ca57557a0 -r 11c61503e614 Makefile.am --- a/Makefile.am Wed Sep 05 17:54:22 2012 -0400 +++ b/Makefile.am Mon Sep 17 16:40:25 2012 -0400 @@ -345,6 +345,9 @@ if !WITH_RHINO sed -i '/RhinoBasedPacEvaluator/ d' $@ endif +if !HAVE_JAVA7 + sed -i '/VariableX509TrustManagerJDK7/ d' $@ +endif stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp mkdir -p $(NETX_DIR) diff -r 956ca57557a0 -r 11c61503e614 NEWS --- a/NEWS Wed Sep 05 17:54:22 2012 -0400 +++ b/NEWS Mon Sep 17 16:40:25 2012 -0400 @@ -35,6 +35,7 @@ - RH838559: Disambiguate signed applet security prompt from certificate warning - RH720836: project can be compiled against GTK+ 2 or 3 librarie - PR955: regression: SweetHome3D fails to run + - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 New in release 1.2 (2011-XX-XX): * Security updates: diff -r 956ca57557a0 -r 11c61503e614 acinclude.m4 --- a/acinclude.m4 Wed Sep 05 17:54:22 2012 -0400 +++ b/acinclude.m4 Mon Sep 17 16:40:25 2012 -0400 @@ -715,9 +715,12 @@ AC_MSG_RESULT(${JAVA}) AC_SUBST(JAVA) JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` - case "${JAVA_VERSION}" in - 1.7*) VERSION_DEFS='-DHAVE_JAVA7';; - esac + HAVE_JAVA7=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.7) print "yes"}'` + if ! test -z "$HAVE_JAVA7" ; then + VERSION_DEFS='-DHAVE_JAVA7' + fi + + AM_CONDITIONAL([HAVE_JAVA7], test x"${HAVE_JAVA7}" = "xyes" ) AC_SUBST(VERSION_DEFS) ]) diff -r 956ca57557a0 -r 11c61503e614 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Sep 05 17:54:22 2012 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon Sep 17 16:40:25 2012 -0400 @@ -16,38 +16,59 @@ package net.sourceforge.jnlp.runtime; -import java.io.*; +import java.awt.EventQueue; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; import java.net.Authenticator; import java.net.ProxySelector; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; -import java.awt.*; -import java.text.*; -import java.util.*; +import java.security.AllPermission; +import java.security.KeyStore; +import java.security.Policy; +import java.security.Security; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.text.MessageFormat; import java.util.List; -import java.security.*; -import javax.jnlp.*; +import java.util.ResourceBundle; + +import javax.jnlp.ServiceManager; import javax.naming.ConfigurationException; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.swing.UIManager; import javax.swing.text.html.parser.ParserDelegator; -import sun.net.www.protocol.jar.URLJarFile; - -import net.sourceforge.jnlp.*; +import net.sourceforge.jnlp.DefaultLaunchHandler; +import net.sourceforge.jnlp.GuiLaunchHandler; +import net.sourceforge.jnlp.LaunchHandler; +import net.sourceforge.jnlp.Launcher; import net.sourceforge.jnlp.browser.BrowserAwareProxySelector; -import net.sourceforge.jnlp.cache.*; +import net.sourceforge.jnlp.cache.CacheUtil; +import net.sourceforge.jnlp.cache.DefaultDownloadIndicator; +import net.sourceforge.jnlp.cache.DownloadIndicator; +import net.sourceforge.jnlp.cache.UpdatePolicy; import net.sourceforge.jnlp.config.DeploymentConfiguration; import net.sourceforge.jnlp.security.JNLPAuthenticator; import net.sourceforge.jnlp.security.KeyStores; import net.sourceforge.jnlp.security.SecurityDialogMessageHandler; import net.sourceforge.jnlp.security.VariableX509TrustManager; -import net.sourceforge.jnlp.services.*; -import net.sourceforge.jnlp.util.*; +import net.sourceforge.jnlp.services.XServiceManagerStub; +import net.sourceforge.jnlp.util.FileUtils; +import net.sourceforge.jnlp.util.TeeOutputStream; +import sun.net.www.protocol.jar.URLJarFile; /** * Configure and access the runtime environment. This class @@ -223,7 +244,7 @@ KeyStore ks = KeyStores.getKeyStore(KeyStores.Level.USER, KeyStores.Type.CLIENT_CERTS); KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(ks, KeyStores.getPassword()); - TrustManager[] trust = new TrustManager[] { VariableX509TrustManager.getInstance() }; + TrustManager[] trust = new TrustManager[] { getSSLSocketTrustManager() }; context.init(kmf.getKeyManagers(), trust, null); sslSocketFactory = context.getSocketFactory(); @@ -248,6 +269,52 @@ } /** + * Returns a TrustManager ideal for the running VM. + * + * @return TrustManager the trust manager to use for verifying https certificates + */ + private static TrustManager getSSLSocketTrustManager() throws + ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { + + try { + + Class trustManagerClass; + Constructor tmCtor = null; + + if (System.getProperty("java.version").startsWith("1.6")) { // Java 6 + try { + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); + } catch (ClassNotFoundException cnfe) { + System.err.println("Unable to find class net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); + return null; + } + } else { // Java 7 or more (technically could be <= 1.5 but <= 1.5 is unsupported) + try { + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); + } catch (ClassNotFoundException cnfe) { + System.err.println("Unable to find class net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); + return null; + } + } + + Constructor[] tmCtors = trustManagerClass.getDeclaredConstructors(); + tmCtor = tmCtors[0]; + + for (Constructor ctor : tmCtors) { + if (tmCtor.getGenericParameterTypes().length == 0) { + tmCtor = ctor; + break; + } + } + + return (TrustManager) tmCtor.newInstance(); + } catch (RuntimeException e) { + System.err.println("Unable to load JDK-specific TrustManager. Was this version of IcedTea-Web compiled with JDK6?"); + throw e; + } + } + + /** * This must NOT be called form the application ThreadGroup. An application * can inject events into its {@link EventQueue} and bypass the security * dialogs. diff -r 956ca57557a0 -r 11c61503e614 netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java --- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Wed Sep 05 17:54:22 2012 -0400 +++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Mon Sep 17 16:40:25 2012 -0400 @@ -59,7 +59,6 @@ public class HttpsCertVerifier implements CertVerifier { - private VariableX509TrustManager tm; private X509Certificate[] chain; private String authType; private String hostName; @@ -67,11 +66,9 @@ private boolean hostMatched; private ArrayList details = new ArrayList(); - public HttpsCertVerifier(VariableX509TrustManager tm, - X509Certificate[] chain, String authType, + public HttpsCertVerifier(X509Certificate[] chain, String authType, boolean isTrusted, boolean hostMatched, String hostName) { - this.tm = tm; this.chain = chain; this.authType = authType; this.hostName = hostName; diff -r 956ca57557a0 -r 11c61503e614 netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java --- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Wed Sep 05 17:54:22 2012 -0400 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Mon Sep 17 16:40:25 2012 -0400 @@ -37,6 +37,9 @@ package net.sourceforge.jnlp.security; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.Socket; import java.security.AccessController; import java.security.KeyStore; import java.security.PrivilegedAction; @@ -47,25 +50,24 @@ import java.util.Arrays; import java.util.List; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; +import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import sun.security.util.HostnameChecker; import sun.security.validator.ValidatorException; -import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; -import net.sourceforge.jnlp.runtime.JNLPRuntime; - -import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; - /** * This class implements an X509 Trust Manager. The certificates it trusts are * "variable", in the sense that it can dynamically, and temporarily support * different certificates that are not in the keystore. */ -final public class VariableX509TrustManager extends X509ExtendedTrustManager { +final public class VariableX509TrustManager { /** TrustManagers containing trusted CAs */ private X509TrustManager[] caTrustManagers = null; @@ -164,8 +166,8 @@ /** * Check if client is trusted (no support for custom here, only system/user) */ - public void checkClientTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) + public void checkTrustClient(X509Certificate[] chain, String authType, + String hostName) throws CertificateException { boolean trusted = false; @@ -186,99 +188,125 @@ throw savedException; } - public void checkClientTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkClientTrusted(chain, authType, null, null); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) - throws CertificateException { - checkServerTrusted(chain, authType, hostName, false); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkServerTrusted(chain, authType, null, null); - } - /** - * Check if the server is trusted + * Check if the server is trusted. + * + * First, existing stores are checked to see if the certificate is trusted. + * Next, if the certificate is not explicitly trusted by the user, a host + * name check is performed. The user is them prompted as needed. * * @param chain The cert chain * @param authType The auth type algorithm - * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission + * @param hostName The expected hostName that the server should have + * @param socket The SSLSocket in use (may be null) + * @param ending The SSLEngine in use (may be null) */ - public synchronized void checkServerTrusted(X509Certificate[] chain, + public synchronized void checkTrustServer(X509Certificate[] chain, String authType, String hostName, - boolean checkOnly) throws CertificateException { + SSLSocket socket, SSLEngine engine) throws CertificateException { CertificateException ce = null; boolean trusted = true; - boolean CNMatched = true; + boolean CNMatched = false; + // Check trust stores try { - checkAllManagers(chain, authType); + checkAllManagers(chain, authType, socket, engine); } catch (CertificateException e) { trusted = false; ce = e; } // If the certificate is not explicitly trusted, we - // need to prompt the user + // check host match if (!isExplicitlyTrusted(chain, authType)) { - - if (hostName == null) { - CNMatched = false; - } else { + if (hostName != null) { try { HostnameChecker checker = HostnameChecker .getInstance(HostnameChecker.TYPE_TLS); - checker.match(hostName, chain[0]); // only need to match @ 0 for - // CN + checker.match(hostName, chain[0]); // only need to match @ 0 for CN + CNMatched = true; } catch (CertificateException e) { - CNMatched = false; ce = e; } } + } else { + // If it is explicitly trusted, just return right away. + return; } + // If it is (not explicitly trusted) AND + // ((it is not in store) OR (there is a host mismatch)) if (!trusted || !CNMatched) { - if (checkOnly) { - throw ce; - } else { - if (!isTemporarilyUntrusted(chain[0])) { - boolean b = askUser(chain, authType, trusted, CNMatched, hostName); + if (!isTemporarilyUntrusted(chain[0])) { + boolean b = askUser(chain, authType, trusted, CNMatched, hostName); - if (b) { - temporarilyTrust(chain[0]); - } else { - temporarilyUntrust(chain[0]); - } + if (b) { + temporarilyTrust(chain[0]); + return; + } else { + temporarilyUntrust(chain[0]); } + } - checkAllManagers(chain, authType); - } + throw ce; } } /** - * Check system, user and custom trust manager + * Check system, user and custom trust manager. + * + * This method is intended to work with both, JRE6 and JRE7. If socket + * and engine are null, it assumes that the call is for JRE6 (i.e. not + * javax.net.ssl.X509ExtendedTrustManager which is Java 7 specific). If + * either of those are not null, it will assume that the caTrustManagers + * are javax.net.ssl.X509ExtendedTrustManager instances and will + * invoke their check methods. + * + * @param chain The certificate chain + * @param authType The authentication type + * @param socket the SSLSocket being used for the connection + * @param engine the SSLEngine being used for the connection */ - private void checkAllManagers(X509Certificate[] chain, String authType) throws CertificateException { + private void checkAllManagers(X509Certificate[] chain, String authType, Socket socket, SSLEngine engine) throws CertificateException { + // first try CA TrustManagers boolean trusted = false; ValidatorException savedException = null; for (int i = 0; i < caTrustManagers.length; i++) { try { - caTrustManagers[i].checkServerTrusted(chain, authType); + if (socket == null && engine == null) { + caTrustManagers[i].checkServerTrusted(chain, authType); + } else { + + try { + Class x509ETMClass = Class.forName("javax.net.ssl.X509ExtendedTrustManager"); + if (engine == null) { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, Socket.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, socket); + } else { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, SSLEngine.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, engine); + } + } catch (NoSuchMethodException nsme) { + throw new ValidatorException(nsme.getMessage()); + } catch (InvocationTargetException ite) { + throw new ValidatorException(ite.getMessage()); + } catch (IllegalAccessException iae) { + throw new ValidatorException(iae.getMessage()); + } catch (ClassNotFoundException cnfe) { + throw new ValidatorException(cnfe.getMessage()); + } + } + trusted = true; break; } catch (ValidatorException caex) { savedException = caex; } } + if (trusted) { return; } @@ -332,7 +360,7 @@ return explicitlyTrusted; } - public X509Certificate[] getAcceptedIssuers() { + protected X509Certificate[] getAcceptedIssuers() { List issuers = new ArrayList(); for (int i = 0; i < caTrustManagers.length; i++) { @@ -394,7 +422,7 @@ public Boolean run() { return SecurityDialogs.showCertWarningDialog( AccessType.UNVERIFIED, null, - new HttpsCertVerifier(trustManager, chain, authType, + new HttpsCertVerifier(chain, authType, isTrusted, hostMatched, hostName)); } diff -r 956ca57557a0 -r 11c61503e614 netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java Mon Sep 17 16:40:25 2012 -0400 @@ -0,0 +1,75 @@ +/* VariableX509TrustManagerJDK6.java + Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of From dbhole at redhat.com Thu Oct 18 13:10:35 2012 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 18 Oct 2012 16:10:35 -0400 Subject: Backport fix for PR1161 to icedtea-web 1.3 In-Reply-To: <5076CC20.8050901@redhat.com> References: <20121010211822.GR30465@redhat.com> <5076CC20.8050901@redhat.com> Message-ID: <20121018201034.GF29895@redhat.com> * Adam Domurad [2012-10-11 09:37]: > On 10/10/2012 05:18 PM, Deepak Bhole wrote: > >Hi, > > [ ... ] > > Haven't looked into it in detail but I don't see any reason it > shouldn't go in. We'll catch anything in testing regardless. > > OK for 1.3 from me. > Thanks! Pushed: http://icedtea.classpath.org/hg/release/icedtea-web-1.3/rev/11c61503e614 Cheers, Deepak > - Adam From aph at redhat.com Thu Oct 18 17:13:54 2012 From: aph at redhat.com (Andrew Haley) Date: Thu, 18 Oct 2012 17:13:54 -0700 Subject: Fwd: zero-shark ldc bugfix In-Reply-To: References: Message-ID: <50809B42.3010600@redhat.com> On 10/18/2012 01:55 AM, Andrew Zhogin wrote: > ---------- Forwarded message ---------- > From: Andrew Zhogin > Date: Thu, Oct 11, 2012 at 6:19 PM > Subject: zero-shark ldc bugfix > To: zero-dev at openjdk.java.net > > > Hi. > > I found problem with shark code generation for ldc* opcodes. > > Crash example (launch with -Xcomp): > > import java.text.*; > import java.util.Locale; > import java.util.Currency; > import sun.util.LocaleServiceProviderPool; > import java.util.spi.CurrencyNameProvider; > > public class test { > > public static void main(String[] args) { > > LocaleServiceProviderPool.getPool(CurrencyNameProvider.class); > } > } > > In SharkConstant constructor: already mirrored unloaded-class object > is not expected and is_loaded is set to true. > Java-mirror object for klass is not "is_klass", just an object. > > Here is patch in attachment. Thank you very much. Have you signed the Oracle contributor agreement? Andrew. From ptisnovs at icedtea.classpath.org Fri Oct 19 02:57:45 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 19 Oct 2012 09:57:45 +0000 Subject: /hg/gfx-test: Added five new tests to the test suite src/org/gfx... Message-ID: changeset d1e778d4c093 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=d1e778d4c093 author: Pavel Tisnovsky date: Fri Oct 19 12:00:31 2012 +0200 Added five new tests to the test suite src/org/gfxtest/testsuites/BitBltCropImage.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltCropImage.java | 83 +++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 0 deletions(-) diffs (105 lines): diff -r 43a3d3f76330 -r d1e778d4c093 ChangeLog --- a/ChangeLog Thu Oct 18 10:37:07 2012 +0200 +++ b/ChangeLog Fri Oct 19 12:00:31 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-19 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltCropImage.java: + Added five new tests. + 2012-10-18 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltScaleImage.java: diff -r 43a3d3f76330 -r d1e778d4c093 src/org/gfxtest/testsuites/BitBltCropImage.java --- a/src/org/gfxtest/testsuites/BitBltCropImage.java Thu Oct 18 10:37:07 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltCropImage.java Fri Oct 19 12:00:31 2012 +0200 @@ -416,6 +416,89 @@ } /** + * Test basic BitBlt operation for checker buffered image with type TYPE_4BYTE_ABGR_PRE. + * No crop is performed to that image. + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGR_preNoCrop(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_4BYTE_ABGR_PRE. Image is cropped so only north-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGR_preCropNW(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, + BitmapCropRegions.CROP_REGION_NW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_4BYTE_ABGR_PRE. Image is cropped so only north-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGR_preCropNE(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, + BitmapCropRegions.CROP_REGION_NE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_4BYTE_ABGR_PRE. Image is cropped so only south-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGR_preCropSW(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, + BitmapCropRegions.CROP_REGION_SW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_4BYTE_ABGR_PRE. Image is cropped so only south-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType4ByteABGR_preCropSE(TestImage image, Graphics2D graphics2d) + { + // create new buffered image and then perform BitBlt test using crop operation. + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, + BitmapCropRegions.CROP_REGION_SE); + } + + /** * Entry point to the test suite. * * @param args From jvanek at icedtea.classpath.org Fri Oct 19 07:18:43 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Fri, 19 Oct 2012 14:18:43 +0000 Subject: /hg/icedtea-web: Renamed reproducers-related variables and targets Message-ID: changeset 14528918a200 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=14528918a200 author: Jiri Vanek date: Fri Oct 19 16:18:25 2012 +0200 Renamed reproducers-related variables and targets diffstat: ChangeLog | 25 + Makefile.am | 187 +++++---- tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/srcs/Makefile | 10 +- tests/reproducers/custom/AppletExtendsFromOutsideJar/srcs/Makefile | 8 +- tests/reproducers/custom/AppletFolderInArchiveTag/srcs/Makefile | 4 +- tests/reproducers/custom/UnsignedContentInMETAINF/srcs/Makefile | 6 +- 6 files changed, 135 insertions(+), 105 deletions(-) diffs (truncated from 550 to 500 lines): diff -r 6e622e87010e -r 14528918a200 ChangeLog --- a/ChangeLog Tue Oct 16 17:18:52 2012 -0400 +++ b/ChangeLog Fri Oct 19 16:18:25 2012 +0200 @@ -1,3 +1,28 @@ +2012-10-19 Jiri Vanek + + Renamed reproducers-related variables and targets + * Makefile.am: + NETX_TEST_DIR - new parent directory variable for tests + NETX_UNIT_TEST_DIR - is now using this variable + JNLP_TESTS_ENGINE_SRCDIR -> TEST_EXTENSIONS_SRCDIR + JNLP_TESTS_ENGINE_TESTS_SRCDIR -> TEST_EXTENSIONS_TESTS_SRCDIR + JNLP_TESTS_SRCDIR -> REPRODUCERS_TESTS_SRCDIR + JNLP_TESTS_ENGINE_DIR -> TEST_EXTENSIONS_DIR + JNLP_TESTS_ENGINE_TESTS_DIR -> TEST_EXTENSIONS_TESTS_DIR + new variable TEST_EXTENSIONS_COMPATIBILITY_SYMLINK still pointing to $(TESTS_DIR)/netx/jnlp_testsengine + $(TESTS_DIR)/jnlp_testsengine now points to $(TESTS_DIR)/test-extensions + JNLP_TESTS_SERVER_DEPLOYDIR -> REPRODUCERS_TESTS_SERVER_DEPLOYDIR + JNLP_TESTS_DIR -> REPRODUCERS_BUILD_DIR + netx-dist-tests-source-files.txt -> test-extensions-source-files.txt + stamps/netx-dist-tests-compile.stamp -> stamps/test-extensions-compile.stamp + stamps/netx-dist-tests-tests-compile.stamp -> stamps/test-extensions-tests-compile.stamp + stamps/netx-dist-tests-compile-testcases.stamp -> stamps/compile-reproducers-testcases.stamp + stamps/netx-dist-tests-copy-resources.stamp -> stamps/copy-reproducers-resources.stamp + * tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/srcs/Makefile: and + * tests/reproducers/custom/AppletExtendsFromOutsideJar/srcs/Makefile: and + * tests/reproducers/custom/AppletFolderInArchiveTag/srcs/Makefile: and + * tests/reproducers/custom/UnsignedContentInMETAINF/srcs/Makefile: following above renaming + 2012-10-16 Adam Domurad * tests/reproducers/simple/AppletTakesLastParam/srcs/AppletTakesLastParam.java: diff -r 6e622e87010e -r 14528918a200 Makefile.am --- a/Makefile.am Tue Oct 16 17:18:52 2012 -0400 +++ b/Makefile.am Fri Oct 19 16:18:25 2012 +0200 @@ -14,19 +14,21 @@ export TESTS_DIR=$(abs_top_builddir)/tests.build export NETX_UNIT_TEST_SRCDIR=$(TESTS_SRCDIR)/netx/unit -export NETX_UNIT_TEST_DIR=$(TESTS_DIR)/netx/unit +export NETX_TEST_DIR=$(TESTS_DIR)/netx +export NETX_UNIT_TEST_DIR=$(NETX_TEST_DIR)/unit export JUNIT_RUNNER_DIR=$(TESTS_DIR)/junit-runner export JUNIT_RUNNER_SRCDIR=$(TESTS_SRCDIR)/junit-runner -export JNLP_TESTS_ENGINE_SRCDIR=$(TESTS_SRCDIR)/test-extensions -export JNLP_TESTS_ENGINE_TESTS_SRCDIR=$(TESTS_SRCDIR)/test-extensions-tests -export JNLP_TESTS_SRCDIR=$(TESTS_SRCDIR)/reproducers -export JNLP_TESTS_ENGINE_DIR=$(TESTS_DIR)/jnlp_testsengine -export JNLP_TESTS_ENGINE_TESTS_DIR=$(TESTS_DIR)/netx/jnlp_testsengine_tests -export JNLP_TESTS_SERVER_DEPLOYDIR=$(TESTS_DIR)/jnlp_test_server -export JNLP_TESTS_DIR=$(TESTS_DIR)/jnlp_tests +export TEST_EXTENSIONS_SRCDIR=$(TESTS_SRCDIR)/test-extensions +export TEST_EXTENSIONS_TESTS_SRCDIR=$(TESTS_SRCDIR)/test-extensions-tests +export REPRODUCERS_TESTS_SRCDIR=$(TESTS_SRCDIR)/reproducers +export TEST_EXTENSIONS_DIR=$(TESTS_DIR)/test-extensions +export TEST_EXTENSIONS_COMPATIBILITY_SYMLINK=$(TESTS_DIR)/netx/jnlp_testsengine +export TEST_EXTENSIONS_TESTS_DIR=$(TESTS_DIR)/test-extensions-tests +export REPRODUCERS_TESTS_SERVER_DEPLOYDIR=$(TESTS_DIR)/reproducers_test_server_deploydir +export REPRODUCERS_BUILD_DIR=$(TESTS_DIR)/reproducers.classes export PRIVATE_KEYSTORE_NAME=teststore.ks export PRIVATE_KEYSTORE_PASS=123456789 export EXPORTED_TEST_CERT_PREFIX=icedteatests @@ -157,7 +159,7 @@ itweb-settings.desktop.in $(top_srcdir)/tests # reproducers `D`shortcuts -export DTEST_SERVER=-Dtest.server.dir=$(JNLP_TESTS_SERVER_DEPLOYDIR) +export DTEST_SERVER=-Dtest.server.dir=$(REPRODUCERS_TESTS_SERVER_DEPLOYDIR) export DJAVAWS_BUILD=-Djavaws.build.bin=$(DESTDIR)$(bindir)/$(javaws) export DBROWSERS=-Dused.browsers=$(FIREFOX):$(CHROMIUM):$(CHROME):$(OPERA):$(MIDORI):$(EPIPHANY) export REPRODUCERS_DPARAMETERS= $(DTEST_SERVER) $(DJAVAWS_BUILD) $(DBROWSERS) $(BROWSER_TESTS_MODIFICATION) @@ -504,31 +506,31 @@ junit-runner-source-files.txt: find $(JUNIT_RUNNER_SRCDIR) -name '*.java' | sort > $@ -$(JUNIT_RUNNER_JAR): junit-runner-source-files.txt stamps/netx-dist-tests-compile.stamp +$(JUNIT_RUNNER_JAR): junit-runner-source-files.txt stamps/test-extensions-compile.stamp mkdir -p $(JUNIT_RUNNER_DIR) && \ $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \ -d $(JUNIT_RUNNER_DIR) \ - -classpath $(JUNIT_JAR):$(JNLP_TESTS_ENGINE_DIR) \ + -classpath $(JUNIT_JAR):$(TEST_EXTENSIONS_DIR) \ @junit-runner-source-files.txt && \ $(BOOT_DIR)/bin/jar cf $@ -C $(JUNIT_RUNNER_DIR) . stamps/junit-jnlp-dist-dirs: junit-jnlp-dist-simple.txt stamps/junit-jnlp-dist-signed.stamp junit-jnlp-dist-custom.txt - mkdir -p $(JNLP_TESTS_SERVER_DEPLOYDIR) - mkdir -p $(JNLP_TESTS_DIR) + mkdir -p $(REPRODUCERS_TESTS_SERVER_DEPLOYDIR) + mkdir -p $(REPRODUCERS_BUILD_DIR) touch $@ junit-jnlp-dist-custom.txt: - cd $(JNLP_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/ ; \ + cd $(REPRODUCERS_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/ ; \ find . -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/$@ junit-jnlp-dist-simple.txt: - cd $(JNLP_TESTS_SRCDIR)/simple/ ; \ + cd $(REPRODUCERS_TESTS_SRCDIR)/simple/ ; \ find . -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/$@ stamps/junit-jnlp-dist-signed.stamp: types=($(SIGNED_REPRODUCERS)) ; \ for which in "$${types[@]}" ; do \ - pushd $(JNLP_TESTS_SRCDIR)/$$which/ ; \ + pushd $(REPRODUCERS_TESTS_SRCDIR)/$$which/ ; \ find . -maxdepth 1 -mindepth 1 | sed "s/.\/*//" > $(abs_top_builddir)/junit-jnlp-dist-$$which.txt ; \ popd ; \ done ; \ @@ -543,22 +545,22 @@ IFS="$$IFS_BACKUP" ; \ for dir in "$${simpleReproducers[@]}" ; do \ echo "processing: $$dir" ; \ - mkdir -p "$(JNLP_TESTS_DIR)/$$dir" ; \ - if [ -e "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/srcs/" ]; then \ + mkdir -p "$(REPRODUCERS_BUILD_DIR)/$$dir" ; \ + if [ -e "$(REPRODUCERS_TESTS_SRCDIR)/$$which/$$dir/srcs/" ]; then \ d=`pwd` ; \ - cd "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/srcs/" ; \ + cd "$(REPRODUCERS_TESTS_SRCDIR)/$$which/$$dir/srcs/" ; \ srcFiles=`find . -mindepth 1 -type f -name "*.java" | sed "s/.\/*//"` ; \ notSrcFiles=`find . -mindepth 1 -type f \! -name "*.java" | sed "s/.\/*//"` ; \ - $(BOOT_DIR)/bin/javac -cp $(NETX_DIR)/lib/classes.jar:$(abs_top_builddir)/liveconnect -d "$(JNLP_TESTS_DIR)/$$dir/" $$srcFiles ; \ + $(BOOT_DIR)/bin/javac -cp $(NETX_DIR)/lib/classes.jar:$(abs_top_builddir)/liveconnect -d "$(REPRODUCERS_BUILD_DIR)/$$dir/" $$srcFiles ; \ if [ -n "$$notSrcFiles" ] ; then \ - cp -R --parents $$notSrcFiles "$(JNLP_TESTS_DIR)/$$dir/" ; \ + cp -R --parents $$notSrcFiles "$(REPRODUCERS_BUILD_DIR)/$$dir/" ; \ fi ; \ - cd "$(JNLP_TESTS_DIR)/$$dir/" ; \ + cd "$(REPRODUCERS_BUILD_DIR)/$$dir/" ; \ if [ -f $(META_MANIFEST) ]; \ then \ - $(BOOT_DIR)/bin/jar cfm "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" $(META_MANIFEST) * ; \ + $(BOOT_DIR)/bin/jar cfm "$(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" $(META_MANIFEST) * ; \ else \ - $(BOOT_DIR)/bin/jar cf "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" * ; \ + $(BOOT_DIR)/bin/jar cf "$(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" * ; \ fi; \ cd "$$d" ; \ fi; \ @@ -577,14 +579,14 @@ signedReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \ IFS="$$IFS_BACKUP" ; \ for dir in "$${signedReproducers[@]}" ; do \ - $(BOOT_DIR)/bin/jarsigner -keystore $$keystore -storepass $(PRIVATE_KEYSTORE_PASS) -keypass $(PRIVATE_KEYSTORE_PASS) "$(JNLP_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" $$tcaw ; \ + $(BOOT_DIR)/bin/jarsigner -keystore $$keystore -storepass $(PRIVATE_KEYSTORE_PASS) -keypass $(PRIVATE_KEYSTORE_PASS) "$(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" $$tcaw ; \ done ; \ done ; \ mkdir -p stamps && \ touch $@ stamps/change-dots-to-paths.stamp: stamps/netx-dist-tests-sign-some-reproducers.stamp - pushd $(JNLP_TESTS_SERVER_DEPLOYDIR); \ + pushd $(REPRODUCERS_TESTS_SERVER_DEPLOYDIR); \ types=($(ALL_NONCUSTOM_REPRODUCERS)); \ for which in "$${types[@]}" ; do \ . $(abs_top_srcdir)/NEW_LINE_IFS ; \ @@ -645,33 +647,34 @@ done ; -rm -rf stamps/netx-dist-tests-import-cert-to-public -netx-dist-tests-source-files.txt: - find $(JNLP_TESTS_ENGINE_SRCDIR) -name '*.java' | sort > $@ +test-extensions-source-files.txt: + find $(TEST_EXTENSIONS_SRCDIR) -name '*.java' | sort > $@ -stamps/netx-dist-tests-compile.stamp: stamps/netx.stamp \ - stamps/junit-jnlp-dist-dirs netx-dist-tests-source-files.txt - mkdir -p $(JNLP_TESTS_ENGINE_DIR); +stamps/test-extensions-compile.stamp: stamps/junit-jnlp-dist-dirs test-extensions-source-files.txt + mkdir -p $(TEST_EXTENSIONS_DIR); + mkdir -p $(NETX_TEST_DIR); + ln -s $(TEST_EXTENSIONS_DIR) $(TEST_EXTENSIONS_COMPATIBILITY_SYMLINK); $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \ - -d $(JNLP_TESTS_ENGINE_DIR) \ + -d $(TEST_EXTENSIONS_DIR) \ -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar \ - @netx-dist-tests-source-files.txt && \ + @test-extensions-source-files.txt && \ mkdir -p stamps && \ touch $@ -netx-dist-tests-tests-source-files.txt: - find $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) -name '*.java' | sort > $@ +test-extensions-tests-source-files.txt: + find $(TEST_EXTENSIONS_TESTS_SRCDIR) -name '*.java' | sort > $@ -stamps/netx-dist-tests-tests-compile.stamp: stamps/junit-jnlp-dist-dirs netx-dist-tests-tests-source-files.txt stamps/netx-dist-tests-compile.stamp - mkdir -p $(JNLP_TESTS_ENGINE_TESTS_DIR); +stamps/test-extensions-tests-compile.stamp: stamps/junit-jnlp-dist-dirs test-extensions-tests-source-files.txt stamps/test-extensions-compile.stamp + mkdir -p $(TEST_EXTENSIONS_TESTS_DIR); $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \ - -d $(JNLP_TESTS_ENGINE_TESTS_DIR) \ - -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \ - @netx-dist-tests-tests-source-files.txt && \ + -d $(TEST_EXTENSIONS_TESTS_DIR) \ + -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(TEST_EXTENSIONS_DIR) \ + @test-extensions-tests-source-files.txt && \ mkdir -p stamps && \ touch $@ -stamps/netx-dist-tests-compile-testcases.stamp: stamps/netx.stamp stamps/junit-jnlp-dist-dirs \ - netx-dist-tests-source-files.txt stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-tests-compile.stamp +stamps/compile-reproducers-testcases.stamp: stamps/netx.stamp stamps/junit-jnlp-dist-dirs \ + test-extensions-source-files.txt stamps/test-extensions-compile.stamp stamps/test-extensions-tests-compile.stamp types=($(ALL_REPRODUCERS)); \ for which in "$${types[@]}" ; do \ . $(abs_top_srcdir)/NEW_LINE_IFS ; \ @@ -679,22 +682,22 @@ IFS="$$IFS_BACKUP" ; \ for dir in "$${simpleReproducers[@]}" ; do \ $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \ - -d $(JNLP_TESTS_ENGINE_TESTS_DIR) \ - -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \ - "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/"* ; \ + -d $(TEST_EXTENSIONS_TESTS_DIR) \ + -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(TEST_EXTENSIONS_DIR) \ + "$(REPRODUCERS_TESTS_SRCDIR)/$$which/$$dir/testcases/"* ; \ done ; \ done ; \ mkdir -p stamps && \ touch $@ -stamps/netx-dist-tests-copy-resources.stamp: stamps/junit-jnlp-dist-dirs +stamps/copy-reproducers-resources.stamp: stamps/junit-jnlp-dist-dirs types=($(ALL_REPRODUCERS)); \ for which in "$${types[@]}" ; do \ . $(abs_top_srcdir)/NEW_LINE_IFS ; \ simpleReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-$$which.txt `); \ IFS="$$IFS_BACKUP" ; \ for dir in "$${simpleReproducers[@]}" ; do \ - cp -R "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/resources/"* $(JNLP_TESTS_SERVER_DEPLOYDIR)/ ; \ + cp -R "$(REPRODUCERS_TESTS_SRCDIR)/$$which/$$dir/resources/"* $(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)/ ; \ done ; \ done ; \ mkdir -p stamps && \ @@ -702,7 +705,7 @@ $(REPRODUCERS_CLASS_NAMES): $(REPRODUCERS_CLASS_WHITELIST) whiteListed=`cat $(REPRODUCERS_CLASS_WHITELIST)`; \ - cd $(JNLP_TESTS_ENGINE_TESTS_DIR) ; \ + cd $(TEST_EXTENSIONS_TESTS_DIR) ; \ class_names= ; \ for test in `find -type f` ; do \ class_name=`echo $$test | sed -e 's|\.class$$||' -e 's|^\./||'` ; \ @@ -727,27 +730,27 @@ stamps/run-netx-dist-tests.stamp: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher.build/$(javaws) \ javaws.desktop stamps/docs.stamp launcher.build/$(itweb_settings) itweb-settings.desktop \ stamps/netx.stamp stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \ - stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-compile-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/netx-dist-tests-copy-resources.stamp\ + stamps/test-extensions-compile.stamp stamps/compile-reproducers-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/copy-reproducers-resources.stamp\ $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES) stamps/process-custom-reproducers.stamp - cd $(JNLP_TESTS_ENGINE_DIR) ; \ + cd $(TEST_EXTENSIONS_DIR) ; \ class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \ - CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(JNLP_TESTS_ENGINE_TESTS_DIR) \ + CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_TESTS_DIR) \ $(BOOT_DIR)/bin/java $(REPRODUCERS_DPARAMETERS) \ -Xbootclasspath:$(RUNTIME) CommandLine $$class_names if WITH_XSLTPROC - $(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(JNLP_TESTS_ENGINE_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_reproducers.html - $(XSLTPROC) --stringparam logs logs_reproducers.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(JNLP_TESTS_ENGINE_DIR)/tests-output.xml > $(TESTS_DIR)/index_reproducers.html + $(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(TEST_EXTENSIONS_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_reproducers.html + $(XSLTPROC) --stringparam logs logs_reproducers.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(TEST_EXTENSIONS_DIR)/tests-output.xml > $(TESTS_DIR)/index_reproducers.html endif touch $@ stamps/process-custom-reproducers.stamp: stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \ - stamps/netx-dist-tests-compile.stamp stamps/netx-dist-tests-compile-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/netx-dist-tests-copy-resources.stamp\ + stamps/test-extensions-compile.stamp stamps/compile-reproducers-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/copy-reproducers-resources.stamp\ $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES) . $(abs_top_srcdir)/NEW_LINE_IFS ; \ customReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-custom.txt `); \ IFS="$$IFS_BACKUP" ; \ for dir in "$${customReproducers[@]}" ; do \ - pushd $(JNLP_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/$$dir/srcs; \ + pushd $(REPRODUCERS_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/$$dir/srcs; \ $(MAKE) prepare-reproducer ; \ popd ; \ done ; \ @@ -759,7 +762,7 @@ customReproducers=(`cat $(abs_top_builddir)/junit-jnlp-dist-custom.txt `); \ IFS="$$IFS_BACKUP" ; \ for dir in "$${customReproducers[@]}" ; do \ - pushd $(JNLP_TESTS_SRCDIR)/custom/$$dir/srcs; \ + pushd $(REPRODUCERS_TESTS_SRCDIR)/custom/$$dir/srcs; \ $(MAKE) clean-reproducer ; \ popd ; \ done ; \ @@ -875,11 +878,11 @@ find $(NETX_UNIT_TEST_SRCDIR) -name '*.java' | sort > $@ stamps/netx-unit-tests-compile.stamp: stamps/netx.stamp \ - netx-unit-tests-source-files.txt stamps/netx-dist-tests-compile.stamp + netx-unit-tests-source-files.txt stamps/test-extensions-compile.stamp mkdir -p $(NETX_UNIT_TEST_DIR) && \ $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \ -d $(NETX_UNIT_TEST_DIR) \ - -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(JNLP_TESTS_ENGINE_DIR) \ + -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(TEST_EXTENSIONS_DIR) \ @netx-unit-tests-source-files.txt && \ mkdir -p stamps && \ touch $@ @@ -909,7 +912,7 @@ done ; \ cd $(NETX_UNIT_TEST_DIR) ; \ class_names=`cat $(UNIT_CLASS_NAMES)` ; \ - CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(JNLP_TESTS_ENGINE_DIR):. \ + CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):. \ $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names if WITH_XSLTPROC $(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(NETX_UNIT_TEST_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_unit.html @@ -944,7 +947,7 @@ -cp $(BOOT_DIR)/jre/lib/jsse.jar \ -cp $(BOOT_DIR)/jre/lib/resources.jar \ -cp $(RHINO_RUNTIME) \ - -cp $(JNLP_TESTS_ENGINE_DIR) \ + -cp $(TEST_EXTENSIONS_DIR) \ -cp . \ -ix "-org.junit.*" \ -ix "-junit.*" \ @@ -965,7 +968,7 @@ if WITH_EMMA cd $(TESTS_DIR) ; \ for file in $(EMMA_MODIFIED_FILES) ; do \ - mv $(JNLP_TESTS_ENGINE_DIR)/$$file $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \ + mv $(TEST_EXTENSIONS_DIR)/$$file $(TEST_EXTENSIONS_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \ done ;\ echo "backuping javaws and netx.jar in $(DESTDIR)" ; \ netx_backup=$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx_backup.jar ; \ @@ -993,11 +996,11 @@ for dir in "$${simpleReproducers[@]}" ; do \ testcases_srcs[k]="-sp" ; \ k=$$((k+1)) ; \ - testcases_srcs[k]="$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \ + testcases_srcs[k]="$(REPRODUCERS_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \ k=$$((k+1)) ; \ done ; \ done ; \ - cd $(JNLP_TESTS_ENGINE_DIR) ; \ + cd $(TEST_EXTENSIONS_DIR) ; \ class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \ $(BOOT_DIR)/bin/java \ $(EMMA_JAVA_ARGS) \ @@ -1012,24 +1015,24 @@ -cp $(BOOT_DIR)/jre/lib/resources.jar \ -cp $(RHINO_RUNTIME) \ -cp . \ - -cp $(JNLP_TESTS_ENGINE_TESTS_DIR) \ + -cp $(TEST_EXTENSIONS_TESTS_DIR) \ -ix "-org.junit.*" \ -ix "-junit.*" \ CommandLine $$class_names ; \ - mv $(JNLP_TESTS_ENGINE_DIR)/coverage.ec $(JNLP_TESTS_ENGINE_DIR)/coverageX.ec ; \ - mv $(JNLP_TESTS_ENGINE_DIR)/coverage.es $(JNLP_TESTS_ENGINE_DIR)/coverageX.es ; \ + mv $(TEST_EXTENSIONS_DIR)/coverage.ec $(TEST_EXTENSIONS_DIR)/coverageX.ec ; \ + mv $(TEST_EXTENSIONS_DIR)/coverage.es $(TEST_EXTENSIONS_DIR)/coverageX.es ; \ $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) emma merge \ -in $(TESTS_DIR)/coverage.em \ - -in $(JNLP_TESTS_ENGINE_DIR)/coverageX.ec \ - -in $(JNLP_TESTS_ENGINE_DIR)/coverageX.es ; \ + -in $(TEST_EXTENSIONS_DIR)/coverageX.ec \ + -in $(TEST_EXTENSIONS_DIR)/coverageX.es ; \ $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) -Demma.report.html.out.encoding=UTF-8 emma report \ -Dreport.html.out.encoding=UTF-8 \ - -in $(JNLP_TESTS_ENGINE_DIR)/coverage.es \ + -in $(TEST_EXTENSIONS_DIR)/coverage.es \ -sp $(NETX_SRCDIR) \ -sp $(NETX_UNIT_TEST_SRCDIR) \ -sp $(JUNIT_RUNNER_SRCDIR) \ - -sp $(JNLP_TESTS_ENGINE_SRCDIR) \ - -sp $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) \ + -sp $(TEST_EXTENSIONS_SRCDIR) \ + -sp $(TEST_EXTENSIONS_TESTS_SRCDIR) \ -r html \ -r xml \ "$${testcases_srcs[@]}" ; \ @@ -1039,10 +1042,10 @@ mv $$javaws_backup $(DESTDIR)$(bindir)/$(javaws); \ mv $$netx_backup $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar ; \ for file in $(EMMA_MODIFIED_FILES) ; do \ - mv $(JNLP_TESTS_ENGINE_DIR)/$$file $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_SUFFIX)" ; \ - mv $(JNLP_TESTS_ENGINE_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" $(JNLP_TESTS_ENGINE_DIR)/$$file ; \ + mv $(TEST_EXTENSIONS_DIR)/$$file $(TEST_EXTENSIONS_DIR)/"$$file""$(EMMA_SUFFIX)" ; \ + mv $(TEST_EXTENSIONS_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" $(TEST_EXTENSIONS_DIR)/$$file ; \ done ;\ - rm $(JNLP_TESTS_ENGINE_DIR)/coverage.txt ; + rm $(TEST_EXTENSIONS_DIR)/coverage.txt ; else echo "Sorry, coverage report cant be run without emma installed. Try install emma or specify with-emma value" ; exit 5 @@ -1061,13 +1064,13 @@ for dir in "$${simpleReproducers[@]}" ; do \ testcases_srcs[k]="-sp" ; \ k=$$((k+1)) ; \ - testcases_srcs[k]="$(JNLP_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \ + testcases_srcs[k]="$(REPRODUCERS_TESTS_SRCDIR)/$$which/$$dir/testcases/" ; \ k=$$((k+1)) ; \ done ; \ done ; \ $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) emma merge \ -in $(NETX_UNIT_TEST_DIR)/coverage.es \ - -in $(JNLP_TESTS_ENGINE_DIR)/coverage.es ; \ + -in $(TEST_EXTENSIONS_DIR)/coverage.es ; \ $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -cp $(EMMA_JAR) -Demma.report.html.out.encoding=UTF-8 emma report \ -Dreport.html.out.encoding=UTF-8 \ -in $(TESTS_DIR)/coverage.es \ @@ -1075,8 +1078,8 @@ -sp $(NETX_SRCDIR) \ -sp $(NETX_UNIT_TEST_SRCDIR) \ -sp $(JUNIT_RUNNER_SRCDIR) \ - -sp $(JNLP_TESTS_ENGINE_SRCDIR) \ - -sp $(JNLP_TESTS_ENGINE_TESTS_SRCDIR) \ + -sp $(TEST_EXTENSIONS_SRCDIR) \ + -sp $(TEST_EXTENSIONS_TESTS_SRCDIR) \ "$${testcases_srcs[@]}" \ -r html \ -r xml ; @@ -1108,17 +1111,19 @@ rm -f $(TESTS_DIR)/*.html clean-netx-dist-tests: clean_tests_reports netx-dist-tests-remove-cert-from-public clean-custom-reproducers - rm -f netx-dist-tests-source-files.txt - rm -rf $(JNLP_TESTS_ENGINE_TESTS_DIR) - rm -rf $(JNLP_TESTS_DIR) - rm -rf $(JNLP_TESTS_SERVER_DEPLOYDIR) - rm -rf $(JNLP_TESTS_ENGINE_DIR) + rm -f test-extensions-source-files.txt + rm -f test-extensions-tests-source-files.txt + rm -f $(TEST_EXTENSIONS_COMPATIBILITY_SYMLINK) + rm -rf $(TEST_EXTENSIONS_TESTS_DIR) + rm -rf $(REPRODUCERS_BUILD_DIR) + rm -rf $(REPRODUCERS_TESTS_SERVER_DEPLOYDIR) + rm -rf $(TEST_EXTENSIONS_DIR) rm -f stamps/junit-jnlp-dist-dirs - rm -f stamps/netx-dist-tests-compile.stamp - rm -f stamps/netx-dist-tests-tests-compile.stamp + rm -f stamps/test-extensions-compile.stamp + rm -f stamps/test-extensions-tests-compile.stamp rm -f stamps/netx-dist-tests-prepare-reproducers.stamp - rm -f stamps/netx-dist-tests-compile-testcases.stamp - rm -f stamps/netx-dist-tests-copy-resources.stamp + rm -f stamps/compile-reproducers-testcases.stamp + rm -f stamps/copy-reproducers-resources.stamp rm -f stamps/netx-dist-tests-sign-some-reproducers.stamp rm -f stamps/change-dots-to-paths.stamp rm -f junit-jnlp-dist-simple.txt @@ -1148,10 +1153,10 @@ clean-reproducers-test-code-coverage: if [ -e stamps/run-reproducers-test-code-coverage.stamp ]; then \ - rm -rf $(JNLP_TESTS_ENGINE_DIR)/coverage ; \ - rm -f $(JNLP_TESTS_ENGINE_DIR)/coverage.xml ; \ - rm -f $(JNLP_TESTS_ENGINE_DIR)/coverage.es ; \ - rm -f $(JNLP_TESTS_ENGINE_DIR)/tests-output_withEmma.xml ; \ + rm -rf $(TEST_EXTENSIONS_DIR)/coverage ; \ + rm -f $(TEST_EXTENSIONS_DIR)/coverage.xml ; \ + rm -f $(TEST_EXTENSIONS_DIR)/coverage.es ; \ + rm -f $(TEST_EXTENSIONS_DIR)/tests-output_withEmma.xml ; \ rm -f stamps/run-reproducers-test-code-coverage.stamp ; \ fi diff -r 6e622e87010e -r 14528918a200 tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/srcs/Makefile --- a/tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/srcs/Makefile Tue Oct 16 17:18:52 2012 -0400 +++ b/tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/srcs/Makefile Fri Oct 19 16:18:25 2012 +0200 @@ -1,7 +1,7 @@ TESTNAME=AdditionalJarsInMetaInfIndexList ARCHIVE_TEST_FOLDER=archive_tag_folder_test -JAVAC_CLASSPATH=$(JNLP_TESTS_ENGINE_DIR):$(NETX_DIR)/lib/classes.jar +JAVAC_CLASSPATH=$(TEST_EXTENSIONS_DIR):$(NETX_DIR)/lib/classes.jar KEYTOOL=$(BOOT_DIR)/bin/keytool JARSIGNER=$(BOOT_DIR)/bin/jarsigner JAVAC=$(BOOT_DIR)/bin/javac @@ -49,10 +49,10 @@ # Move jars into deployment directory cd $(TMPDIR); \ - mv $(INDEX_JAR_UNSIGNED) $(JNLP_TESTS_SERVER_DEPLOYDIR) ; \ - mv $(INDEX_JAR_SIGNED) $(JNLP_TESTS_SERVER_DEPLOYDIR) ; \ - mv $(MAINCLASS_JAR_UNSIGNED) $(JNLP_TESTS_SERVER_DEPLOYDIR) ; \ - mv $(MAINCLASS_JAR_SIGNED) $(JNLP_TESTS_SERVER_DEPLOYDIR) ; + mv $(INDEX_JAR_UNSIGNED) $(REPRODUCERS_TESTS_SERVER_DEPLOYDIR) ; \ + mv $(INDEX_JAR_SIGNED) $(REPRODUCERS_TESTS_SERVER_DEPLOYDIR) ; \ + mv $(MAINCLASS_JAR_UNSIGNED) $(REPRODUCERS_TESTS_SERVER_DEPLOYDIR) ; \ + mv $(MAINCLASS_JAR_SIGNED) $(REPRODUCERS_TESTS_SERVER_DEPLOYDIR) ; echo PREPARED REPRODUCER $(TESTNAME), removing $(TMPDIR) rm -rf $(TMPDIR) diff -r 6e622e87010e -r 14528918a200 tests/reproducers/custom/AppletExtendsFromOutsideJar/srcs/Makefile --- a/tests/reproducers/custom/AppletExtendsFromOutsideJar/srcs/Makefile Tue Oct 16 17:18:52 2012 -0400 +++ b/tests/reproducers/custom/AppletExtendsFromOutsideJar/srcs/Makefile Fri Oct 19 16:18:25 2012 +0200 @@ -4,7 +4,7 @@ JAR_FILES=AppletReferenceInSameJar.class Referenced.class OUTER_FILE=AppletReferenceOutOfJar.class From jvanek at redhat.com Fri Oct 19 07:20:29 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 19 Oct 2012 16:20:29 +0200 Subject: [fyi][icedtea-web]Refactoring of reproducers as agreed in April In-Reply-To: <50801F10.8090503@redhat.com> References: <4FEB549E.40402@redhat.com> <4FEB5F21.9020902@redhat.com> <4FEC4648.8050307@redhat.com> <4FEC7631.2040405@redhat.com> <4FEC7BE9.8020609@redhat.com> <4FEC83BB.3050807@redhat.com> <4FEDA48E.9040104@redhat.com> <4FEDD0BA.6040207@redhat.com> <4FF1A346.2080000@redhat.com> <4FF30809.7070606@redhat.com> <5075BAEB.3060203@redhat.com> <508005E5.1060705@redhat.com> <50801F10.8090503@redhat.com> Message-ID: <508161AD.7010807@redhat.com> On 10/18/2012 05:24 PM, Omair Majid wrote: > On 10/18/2012 09:36 AM, Jiri Vanek wrote: >> On 10/10/2012 08:14 PM, Omair Majid wrote: >>> On 07/03/2012 10:56 AM, Jiri Vanek wrote: >>>> Hi. Updated renaming patch. Please chheck that I did not screw any >>>> renaming :-/ >>>> >>> >>> They look okay to me; I don't see typos. I assume you used a program to >>> perform automatic renaming, right? >> >> Thank you very much for review. Assuming the one bellow do ot belongs to >> patch, ok for head and 1.3? > > Yeah, sounds okay to me. Could you please push to head and let it bake > for a few days before adding to 1.3? Pushed for head, waiting with 1.3. > >>> >>>> diff -r cbb73b27594b netx-dist-tests-whitelist >>>> --- a/netx-dist-tests-whitelist Tue Jul 03 16:42:52 2012 +0200 >>>> +++ b/netx-dist-tests-whitelist Tue Jul 03 16:53:39 2012 +0200 >>>> @@ -1,1 +1,1 @@ >>>> -.* >>>> +.*esource.*est* >>> >>> I don't follow what this is doing. Could you explain or add a comment in >>> the file? >> Sorry, Did not belongs to patch. It is regex for launching Resource Tests:) >> This file should be for ever containing *. . > > Ah.. So this is what I should be modifying if I want to run just a > single reproducer? All this time I have just been deleting all the > reproducers I did not want to run :) yap :) > > Cheers, > Omair > Thank you for review! J. From jvanek at redhat.com Fri Oct 19 07:24:19 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 19 Oct 2012 16:24:19 +0200 Subject: [fyi] [icedtea-web] make Known to fail message bold Message-ID: <50816293.5050207@redhat.com> Here as you have wished... J. -------------- next part -------------- A non-text attachment was scrubbed... Name: makeK2Fbold.patch Type: text/x-patch Size: 1169 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121019/0d698f39/makeK2Fbold.patch From adomurad at redhat.com Fri Oct 19 07:30:28 2012 From: adomurad at redhat.com (Adam Domurad) Date: Fri, 19 Oct 2012 10:30:28 -0400 Subject: [fyi] [icedtea-web] make Known to fail message bold In-Reply-To: <50816293.5050207@redhat.com> References: <50816293.5050207@redhat.com> Message-ID: <50816404.20106@redhat.com> On 10/19/2012 10:24 AM, Jiri Vanek wrote: > Here as you have wished... > > J. Appreciated, thanks! My eyes will have to strain a little less when pouring over the sea of red failures :) Thanks, - Adam From adomurad at redhat.com Fri Oct 19 08:31:34 2012 From: adomurad at redhat.com (Adam Domurad) Date: Fri, 19 Oct 2012 11:31:34 -0400 Subject: [rfc][icedtea-web] Add missing knowntofail Message-ID: <50817256.3070102@redhat.com> ChangeLog: 2012-10-19 Adam Domurad * tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java (SignedMetaInfIndexListTest): Add @KnownToFail annotation -------------- next part -------------- A non-text attachment was scrubbed... Name: knowntofail.patch Type: text/x-patch Size: 1147 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121019/fd81013b/knowntofail.patch From bugzilla-daemon at icedtea.classpath.org Sat Oct 20 08:28:45 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 20 Oct 2012 15:28:45 +0000 Subject: [Bug 1196] Internal Error (os_linux_zero.cpp:270) fatal error: caught unhandled signal 7 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1196 Andrew Haley changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aph at redhat.com --- Comment #1 from Andrew Haley --- The error happened in the SQLite native code, not in Java. You need to run the program in gdb to see where. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121020/87d75ef9/attachment.html From jvanek at redhat.com Sat Oct 20 12:06:42 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Sat, 20 Oct 2012 21:06:42 +0200 Subject: [rfc][icedtea-web] Add missing knowntofail In-Reply-To: <50817256.3070102@redhat.com> References: <50817256.3070102@redhat.com> Message-ID: <5082F642.2050406@redhat.com> On 10/19/2012 05:31 PM, Adam Domurad wrote: > ChangeLog: > 2012-10-19 Adam Domurad > > * tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java > (SignedMetaInfIndexListTest): Add @KnownToFail annotation > > > knowntofail.patch > > > diff --git a/tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java b/tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java > --- a/tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java > +++ b/tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java > @@ -44,6 +44,7 @@ import java.util.List; > import net.sourceforge.jnlp.ServerAccess; > import net.sourceforge.jnlp.ProcessResult; > import net.sourceforge.jnlp.annotations.Bug; > +import net.sourceforge.jnlp.annotations.KnownToFail; > import net.sourceforge.jnlp.browsertesting.BrowserTest; > > import org.junit.Test; > @@ -55,6 +56,7 @@ public class AdditionalJarsInMetaInfInde > private static final String CORRECT_EXEC = "Program Executed Correctly."; > > @Test > + @KnownToFail > @Bug(id = "PR1112") > public void SignedMetaInfIndexListTest() throws Exception { > ProcessResult pr = server.executeJavawsHeadless("/AdditionalJarsInMetaInfIndexListSigned.jnlp"); Approved. From tidalbobo at gmail.com Thu Oct 11 03:50:14 2012 From: tidalbobo at gmail.com (tidalbobo) Date: Thu, 11 Oct 2012 03:50:14 -0700 (PDT) Subject: OpenJDK 1.7.0 Not working on Mac OSx 10.6 ( snow leopard) Message-ID: <34541779.post@talk.nabble.com> I downloaded openjdk 1.7.0 for Mac OSx and extracted the dmg. Put the Contents folder in to my Mac. It seems fine and I can do a java -version to get the proper output. How ever, when i try to run a java program i get the shown error. I have looked extensively but not come across a solution. Any help is appreciated. http://old.nabble.com/file/p34541779/OpenJDK_170_Error_on_MacOSx10.6.png OpenJDK_170_Error_on_MacOSx10.6.png -- View this message in context: http://old.nabble.com/OpenJDK-1.7.0-Not-working-on-Mac-OSx-10.6-%28-snow-leopard%29-tp34541779p34541779.html Sent from the OpenJDK Distribution-specific Packaging mailing list archive at Nabble.com. From gnu.andrew at redhat.com Tue Oct 16 19:47:28 2012 From: gnu.andrew at redhat.com (Andrew John Hughes) Date: Wed, 17 Oct 2012 03:47:28 +0100 Subject: [SECURITY] IcedTea 1.10.10 & 1.11.5 for OpenJDK6 Released! Message-ID: <20121017024728.GA16235@rivendell.middle-earth.co.uk> The IcedTea project provides a harness to build the source code from OpenJDK6 using Free Software build tools, along with additional features such as a PulseAudio sound driver and support for alternative virtual machines. A new set of security releases is now available: * IcedTea6 1.10.10 * IcedTea6 1.11.5 We recommend that users upgrade to the latest release from the appropriate branch as soon as possible. All updates contain the following security fixes: * S6631398, CVE-2012-3216: FilePermission improved path checking * S7093490: adjust package access in rmiregistry * S7143535, CVE-2012-5068: ScriptEngine corrected permissions * S7167656, CVE-2012-5077: Multiple Seeders are being created * S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types * S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector * S7172522, CVE-2012-5072: Improve DomainCombiner checking * S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC * S7189103, CVE-2012-5069: Executors needs to maintain state * S7189490: More improvements to DomainCombiner checking * S7189567, CVE-2012-5085: java net obselete protocol * S7192975, CVE-2012-5071: Conditional usage check is wrong * S7195194, CVE-2012-5084: Better data validation for Swing * S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved * S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance * S7198296, CVE-2012-5089: Refactor classloader usage * S7158800: Improve storage of symbol tables * S7158801: Improve VM CompileOnly option * S7158804: Improve config file parsing * S7176337: Additional changes needed for 7158801 fix * S7198606, CVE-2012-4416: Improve VM optimization Full details of each release can be found below. What?s New? ?????? New in release 1.10.10 (2012-10-16): * Security fixes - S6631398, CVE-2012-3216: FilePermission improved path checking - S7093490: adjust package access in rmiregistry - S7143535, CVE-2012-5068: ScriptEngine corrected permissions - S7167656, CVE-2012-5077: Multiple Seeders are being created - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector - S7172522, CVE-2012-5072: Improve DomainCombiner checking - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC - S7189103, CVE-2012-5069: Executors needs to maintain state - S7189490: More improvements to DomainCombiner checking - S7189567, CVE-2012-5085: java net obselete protocol - S7192975, CVE-2012-5071: Conditional usage check is wrong - S7195194, CVE-2012-5084: Better data validation for Swing - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance - S7198296, CVE-2012-5089: Refactor classloader usage - S7158800: Improve storage of symbol tables - S7158801: Improve VM CompileOnly option - S7158804: Improve config file parsing - S7176337: Additional changes needed for 7158801 fix - S7198606, CVE-2012-4416: Improve VM optimization * Backports - S7092186: adjust package access in rmiregistry - S7175845: "jar uf" changes file permissions unexpectedly - S7177216: native2ascii changes file permissions of input file - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo * Bug fixes - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default New in release 1.11.5 (2012-10-16): * Security fixes - S6631398, CVE-2012-3216: FilePermission improved path checking - S7093490: adjust package access in rmiregistry - S7143535, CVE-2012-5068: ScriptEngine corrected permissions - S7167656, CVE-2012-5077: Multiple Seeders are being created - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector - S7172522, CVE-2012-5072: Improve DomainCombiner checking - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC - S7189103, CVE-2012-5069: Executors needs to maintain state - S7189490: More improvements to DomainCombiner checking - S7189567, CVE-2012-5085: java net obselete protocol - S7192975, CVE-2012-5071: Conditional usage check is wrong - S7195194, CVE-2012-5084: Better data validation for Swing - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance - S7198296, CVE-2012-5089: Refactor classloader usage - S7158800: Improve storage of symbol tables - S7158801: Improve VM CompileOnly option - S7158804: Improve config file parsing - S7176337: Additional changes needed for 7158801 fix - S7198606, CVE-2012-4416: Improve VM optimization * Backports - S7175845: "jar uf" changes file permissions unexpectedly - S7177216: native2ascii changes file permissions of input file - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo * Bug fixes - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default The tarballs can be downloaded from: * http://icedtea.classpath.org/download/source/icedtea6-1.10.10.tar.gz * http://icedtea.classpath.org/download/source/icedtea6-1.11.5.tar.gz SHA256 checksums: 644804a85b5b446d7840e3d11adf45782d73fcd880a2df5403c53c96cc288c3e icedtea6-1.10.10.tar.gz 258d81d957f8ab9322fbaf7c90647f27f6b4e675504fa279858e6dfe513f7574 icedtea6-1.11.5.tar.gz Each tarball is accompanied by a digital signature (available at the above URL + '.sig'). This is produced using my public key. See details below. The following people helped with these releases: * Elliott Baron (creation of reproducers for S7163198/S7169887 & S7186286, checking S7189103 & S7189567) * Deepak Bhole (creation of reproducer for S7093490) * Andrew John Hughes (applying all security patches, backports & bug fixes, reproducer runs, release management) * Omair Majid (creation of reproducers for S7167656, S7172522, S7195549 & S7195917) * Chris Phillips (checking S7143535, S7169884 & S7198606 reproducers) * Roman Kennke (creation of reproducers for S7158796, S7192975 & S7198296) * Pavel Tisnovsky (additional reproducer runs) * Mario Torre (creation of reproducers for S6631398, S7195919 & S7196190, checking S7195194 reproducer) * Jon VanAlten (creation of reproducer for S7158801, checking S7158800, S7158804 & S7158807) We would also like to thank the bug reporters and testers! To get started: $ tar xzf icedtea6-${ver}.tar.gz Full build requirements and instructions are in INSTALL: $ mkdir icedtea6-build $ cd icedtea6-build $ ../icedtea6-${ver}/configure [--enable-zero --enable-pulse-java --enable-systemtap ...] $ make -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121017/874c9209/attachment.bin From amiko212 at 126.com Sun Oct 21 18:29:58 2012 From: amiko212 at 126.com (liu chao jun) Date: Mon, 22 Oct 2012 09:29:58 +0800 (CST) Subject: [Bug 1196] Internal Error (os_linux_zero.cpp:270) fatal error: caught unhandled signal 7 In-Reply-To: References: Message-ID: <19fa2aa1.dc1d.13a86173343.Coremail.amiko212@126.com> hi all I also have this problem ,when i run ./java -Xcomp helleworld , but if run ./java helloworld is ok . is anybody resolve it ,Could you share you patch if you hava resolved it , thank you very much ! BR//Amiko At 2012-10-20 23:28:45,bugzilla-daemon at icedtea.classpath.org wrote: Andrew Haley changed Bug 1196 | What | Removed | Added | | CC | | aph at redhat.com | Comment # 1 from Andrew Haley The error happened in the SQLite native code, not in Java. You need to run the program in gdb to see where. You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121022/43d299fe/attachment.html From bugzilla-daemon at icedtea.classpath.org Sun Oct 21 21:57:26 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 22 Oct 2012 04:57:26 +0000 Subject: [Bug 1197] New: ResourceManager.getApplicationResources() does not close InputStreams Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1197 Priority: P3 Bug ID: 1197 CC: unassigned at icedtea.classpath.org Assignee: gnu.andrew at redhat.com Summary: ResourceManager.getApplicationResources() does not close InputStreams Severity: minor Classification: Unclassified OS: Linux Reporter: jlivings at redhat.com Hardware: x86_64 Status: NEW Version: 7-hg Component: IcedTea Product: IcedTea com.sun.naming.internal.ResourceManager.getApplicationResources() does not close the input streams it gets from helper.getResources() and helper.getJavaHomeLibStream(). While they will eventually be garbage collected and finalised, not calling close() means that the file descriptors are open longer than they need to, potentially causing a descriptor limit to be reached. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121022/1b7f000a/attachment.html From bugzilla-daemon at icedtea.classpath.org Sun Oct 21 22:03:35 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 22 Oct 2012 05:03:35 +0000 Subject: [Bug 1197] ResourceManager.getApplicationResources() does not close InputStreams In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1197 --- Comment #1 from James Livingston --- Created attachment 776 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=776&action=edit patch This is a patch against the JDK7u tree. It passes running "make test", and does not show any problems when running an EE server (JBoss) against the newly build JDK. If an exception is thrown while processing one of the streams returned from helper.getResources(), then the remaining streams are retrieved so they can be closed, which they weren't before. With the actual implementation of the helper that is not needed because they are opened lazily, but that's an implementation detail of the helper and should not cause any issues because it only has an effect in the unlikely case of an exception being thrown. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121022/e096f268/attachment.html From helpcrypto at gmail.com Mon Oct 22 00:10:58 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Mon, 22 Oct 2012 09:10:58 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <5075BE35.5050502@redhat.com> Message-ID: Could any of you confirm JSObject is not returned as a valid javascript object, or its my code not using it in the correct way? (Should I fill a bug to confirm it?) On Tue, Oct 16, 2012 at 1:24 PM, helpcrypto helpcrypto wrote: > Hello again. > > Now, I have detected an error? (not a crash) when using JSObject, that > differs from 'official' oracle jre behaviour. > > public class MyApplet extends Applet { > public static Applet applet = null; > @Override > public void init() { > applet = this; > } > public JSObject testFunction() { > return AccessController.doPrivileged(new PrivilegedAction() { > @Override > public JSObject run() { > JSObject win = JSObject.getWindow(applet); > JSObject js = (JSObject) win.eval("new Object();"); > //... > js.setMember("code", 0); > return js; > } > }); > } > } > } > > On javascript side, invoking this way: > var obj=applet.testFunction(); > alert(obj.code); > Doesn't work, and says undefined. obj is [object] (bt not a valid js object) and > I cant enumerate properties using: > var txt=''; > for(var a in cert){ > txt+='obj['+a+']='+obj[a]+'\n'; > } > alert(txt); > The same code works on Oracle and obj.code==0 :) > > According to http://icedtea.classpath.org/wiki/IcedTea-Web, as Im > using netscape.javascript.JSObject, I should add plugin.jar to my > classpath when building, but it should work/run properly on pages. > > Any ideas? Should I add plugin.jar somewhere? Should I file another bug report? > > Thanks a lot for your help! From helpcrypto at gmail.com Mon Oct 22 04:33:12 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Mon, 22 Oct 2012 13:33:12 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: <508514E1.80005@redhat.com> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <5075BE35.5050502@redhat.com> <508514E1.80005@redhat.com> Message-ID: Thanks a lot On Mon, Oct 22, 2012 at 11:41 AM, Jana Fabrikova wrote: > Hello, > > the behaviour you have detected is really a bug in IcedTea-Web and should be > filed as a bug, > > Jana F. > > > On 10/22/2012 09:10 AM, helpcrypto helpcrypto wrote: >> >> Could any of you confirm JSObject is not returned as a valid >> javascript object, or its my code not using it in the correct way? >> (Should I fill a bug to confirm it?) >> >> On Tue, Oct 16, 2012 at 1:24 PM, helpcrypto helpcrypto >> wrote: >>> >>> Hello again. >>> >>> Now, I have detected an error? (not a crash) when using JSObject, that >>> differs from 'official' oracle jre behaviour. >>> >>> public class MyApplet extends Applet { >>> public static Applet applet = null; >>> @Override >>> public void init() { >>> applet = this; >>> } >>> public JSObject testFunction() { >>> return AccessController.doPrivileged(new >>> PrivilegedAction() { >>> @Override >>> public JSObject run() { >>> JSObject win = >>> JSObject.getWindow(applet); >>> JSObject js = (JSObject) >>> win.eval("new Object();"); >>> //... >>> js.setMember("code", 0); >>> return js; >>> } >>> }); >>> } >>> } >>> } >>> >>> On javascript side, invoking this way: >>> var obj=applet.testFunction(); >>> alert(obj.code); >>> Doesn't work, and says undefined. obj is [object] (bt not a valid js >>> object) and >>> I cant enumerate properties using: >>> var txt=''; >>> for(var a in cert){ >>> txt+='obj['+a+']='+obj[a]+'\n'; >>> } >>> alert(txt); >>> The same code works on Oracle and obj.code==0 :) >>> >>> According to http://icedtea.classpath.org/wiki/IcedTea-Web, as Im >>> using netscape.javascript.JSObject, I should add plugin.jar to my >>> classpath when building, but it should work/run properly on pages. >>> >>> Any ideas? Should I add plugin.jar somewhere? Should I file another bug >>> report? >>> >>> Thanks a lot for your help! > > From bugzilla-daemon at icedtea.classpath.org Mon Oct 22 04:41:35 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 22 Oct 2012 11:41:35 +0000 Subject: [Bug 1198] New: JSObject is not valid on Javascript side Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1198 Priority: P3 Bug ID: 1198 CC: unassigned at icedtea.classpath.org Assignee: dbhole at redhat.com Summary: JSObject is not valid on Javascript side Severity: normal Classification: Unclassified OS: Linux Reporter: helpcrypto at gmail.com Hardware: x86 Status: NEW Version: unspecified Component: Plugin Product: IcedTea-Web I have detected an error (not a crash) when using JSObject, that differs from 'official' oracle jre behaviour. Consider the following code: public class MyApplet extends Applet { public static Applet applet = null; @Override public void init() { applet = this; } public JSObject testFunction() { return AccessController.doPrivileged(new PrivilegedAction() { @Override public JSObject run() { JSObject win = JSObject.getWindow(applet); JSObject js = (JSObject) win.eval("new Object();"); //... js.setMember("code", 0); return js; } }); } } } On javascript side, invoking this way: var obj=applet.testFunction(); alert(obj.code); This doesn't work, and says undefined. obj is [object] (but not a valid js object) and I cant enumerate properties using: var txt=''; for(var a in cert){ txt+='obj['+a+']='+obj[a]+'\n'; } alert(txt); The same code works on Oracle and obj.code==0 :) According to http://icedtea.classpath.org/wiki/IcedTea-Web, as Im using netscape.javascript.JSObject, I should add plugin.jar to my classpath when building, but it should work/run properly on pages. Should i do anything else? Maybe related to http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=347 ? Thanks a lot for your help! Linux pc 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 16:39:45 UTC 2012 i686 athlon i386 GNU/Linux java version "1.7.0_07" OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-0ubuntu0.12.04.1) OpenJDK Client VM (build 23.2-b09, mixed mode, sharing) ii icedtea-7-jre-jamvm 7u7-2.3.2a-0ubuntu0.12.04.1 Alternative JVM for OpenJDK, using JamVM ii openjdk-7-jre 7u7-2.3.2a-0ubuntu0.12.04.1 OpenJDK Java runtime, using Hotspot JIT ii openjdk-7-jre-headless 7u7-2.3.2a-0ubuntu0.12.04.1 OpenJDK Java runtime, using Hotspot JIT (headless) ii openjdk-7-jre-lib 7u7-2.3.2a-0ubuntu0.12.04.1 OpenJDK Java runtime (architecture independent libraries) ii icedtea-7-jre-jamvm 7u7-2.3.2a-0ubuntu0.12.04.1 Alternative JVM for OpenJDK, using JamVM ii icedtea-7-plugin 1.2-2ubuntu1.2 web browser plugin based on OpenJDK and IcedTea to execute Java applets ii icedtea-netx 1.2-2ubuntu1.2 NetX - implementation of the Java Network Launching Protocol (JNLP) ii icedtea-netx-common 1.2-2ubuntu1.2 NetX - implementation of the Java Network Launching Protocol (JNLP) Mozilla Firefox 15.0.1 /etc/alternatives/mozilla-javaplugin.so -> /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/IcedTeaPlugin.so -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121022/4728ccd0/attachment.html From helpcrypto at gmail.com Mon Oct 22 04:42:50 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Mon, 22 Oct 2012 13:42:50 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <5075BE35.5050502@redhat.com> <508514E1.80005@redhat.com> Message-ID: Filed here: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1198 Thanks a lot for your help. From adomurad at icedtea.classpath.org Mon Oct 22 07:36:51 2012 From: adomurad at icedtea.classpath.org (adomurad at icedtea.classpath.org) Date: Mon, 22 Oct 2012 14:36:51 +0000 Subject: /hg/icedtea-web: Add a @KnownToFail Message-ID: changeset cdc7637779f4 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=cdc7637779f4 author: Adam Domurad date: Mon Oct 22 10:39:35 2012 -0400 Add a @KnownToFail diffstat: ChangeLog | 5 +++++ tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java | 2 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diffs (31 lines): diff -r 14528918a200 -r cdc7637779f4 ChangeLog --- a/ChangeLog Fri Oct 19 16:18:25 2012 +0200 +++ b/ChangeLog Mon Oct 22 10:39:35 2012 -0400 @@ -1,3 +1,8 @@ +2012-10-19 Adam Domurad + + * tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java + (SignedMetaInfIndexListTest): Add @KnownToFail annotation + 2012-10-19 Jiri Vanek Renamed reproducers-related variables and targets diff -r 14528918a200 -r cdc7637779f4 tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java --- a/tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java Fri Oct 19 16:18:25 2012 +0200 +++ b/tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java Mon Oct 22 10:39:35 2012 -0400 @@ -44,6 +44,7 @@ import net.sourceforge.jnlp.ServerAccess; import net.sourceforge.jnlp.ProcessResult; import net.sourceforge.jnlp.annotations.Bug; +import net.sourceforge.jnlp.annotations.KnownToFail; import net.sourceforge.jnlp.browsertesting.BrowserTest; import org.junit.Test; @@ -55,6 +56,7 @@ private static final String CORRECT_EXEC = "Program Executed Correctly."; @Test + @KnownToFail @Bug(id = "PR1112") public void SignedMetaInfIndexListTest() throws Exception { ProcessResult pr = server.executeJavawsHeadless("/AdditionalJarsInMetaInfIndexListSigned.jnlp"); From jfabriko at redhat.com Mon Oct 22 07:54:42 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Mon, 22 Oct 2012 16:54:42 +0200 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "set" tests In-Reply-To: <5075D156.90604@redhat.com> References: <506C75F2.7010505@redhat.com> <5075D156.90604@redhat.com> Message-ID: <50855E32.3090505@redhat.com> Hello Adam, thank you for the comments. I modified the JSToJSet reproducer according to your suggestions, please see the attached patch (new version of the JSToJSet reproducer). The behaviour when using eval and reflection is different in 2 ways: - the testcase arrayBeyondLength was meaningless from the Java side, so it is not included - all the testcases look only at the string output, so the values are tested, but the types are not (I guess this is not a problem, since the variables in Java have its defined types and a problem will occur if JS tries to set a variable to a value of a bad type anyway), Jana On 10/10/2012 09:49 PM, Adam Domurad wrote: > On 10/03/2012 01:29 PM, Jana Fabrikova wrote: >> 2012-10-03 Jana Fabrikova >> >> * /tests/reproducers/simple/JSToJSet: >> adding a new reproducer for the second LiveConnect >> test (Tests for setting members on Java side.) >> >> >> I would like to ask for review of the attached patch, >> thank you, >> Jana > > Hi Jana, thanks for the test! > > I have some comments in-line with the test. > > >> diff --git a/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html >> b/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html >> new file mode 100644 >> --- /dev/null >> +++ b/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html >> @@ -0,0 +1,104 @@ >> + >> + >> + >> + JavaScript to Java LiveConnect - Set values from >> applet >> + >> + >> + >> + >> + >> + >> + >> + >> +

The JSToJSet html page

>> + >> + > id="jstojSetApplet" MAYSCRIPT> >> + >> + >> + >> +
>> + >> + >> + >> + >> diff --git >> a/tests/reproducers/simple/JSToJSet/resources/JSToJ_auxiliary.js >> b/tests/reproducers/simple/JSToJSet/resources/JSToJ_auxiliary.js >> new file mode 100644 >> --- /dev/null >> +++ b/tests/reproducers/simple/JSToJSet/resources/JSToJ_auxiliary.js >> @@ -0,0 +1,69 @@ >> +/* >> +JSToJ_auxiliary.js >> +This file contains auxiliary JavaScript functions for LiveConnect >> tests output, >> +the following reproducers have this file as a common resource: >> +- JSToJGet >> +- JSToJSet >> +- JSToJFuncParam >> +- JSToJFuncReturn >> +- JSToJFuncResol >> +- JSToJTypeConv >> +- JToJSGet >> +- JToJSSet >> +- JToJSFuncParam >> +- JToJSFuncReturn >> +- JToJSEval >> +*/ >> + [ ... file contents snipped ... ] > > I don't think this is the correct way to do this, although it can be > good for tests to share common components. > > There will only be one copy in the deployment directory, because only > one file can exist with a given file name. As well, if this file ever > has to change, it will be difficult to tell why it isn't updating > correctly (the reason would be that a test with the same-name file is > overwriting it.) > > I think the correct way to do this is to have a reproducer folder that > is named something like JSTestResources, and contains only this in the > resources/ folder. > Since all tests share the same deployment directory, it will be > available to all tests. As well, it will only have to be altered in one > place if it is ever altered. > >> + >> diff --git >> a/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp >> b/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp >> new file mode 100644 >> --- /dev/null >> +++ b/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp >> @@ -0,0 +1,21 @@ >> + >> + >> + >> + JavaScript to Java LiveConnect - Set >> + RedHat >> + > href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> >> >> + LiveConnect - tests for setting members on Java >> side. >> + >> + >> + >> + > + href="http://java.sun.com/products/autodl/j2se"/> >> + >> + >> + > + name="JS to J Set" >> + main-class="JSToJSet" >> + width="1000" >> + height="100"> >> + >> + >> diff --git a/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java >> b/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java >> new file mode 100644 >> --- /dev/null >> +++ b/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java >> @@ -0,0 +1,246 @@ >> +import java.applet.*; >> +import java.awt.*; >> + >> +public class JSToJSet extends Applet { >> + >> + public String[] outputStrings = { "Test no. 1 - (int)", >> + "Test no. 2 - (double)", "Test no. 3 - (float)", >> + "Test no. 4 - (long)", "Test no. 5 - (boolean)", >> + "Test no. 6 - (char)", "Test no. 7 - (byte)", >> + "Test no. 8 - (int[] - element access)", >> + "Test no. 9 - (int[] - beyond length)", >> + "Test no.10 - (regular string)", >> + "Test no.11 - (string with special characters)", >> + "Test no.12 - (null)", "Test no.13 - (Integer)", >> + "Test no.14 - (Double)", "Test no.15 - (Float)", >> + "Test no.16 - (Long)", "Test no.17 - (Boolean)", >> + "Test no.18 - (Character)", "Test no.19 - (Byte)", >> + "Test no.20 - (Double[] - element access)", >> + "Test no.21 - (Double[] - full array)" }; >> + >> + public int i, iWanted; >> + public double d, dWanted; >> + public float f, fWanted; >> + public long l, lWanted; >> + public boolean b, bWanted; >> + public char c, cWanted; >> + public byte by, byWanted; >> + public String rs, rsWanted; >> + public String ss, ssWanted; >> + public Object n, nWanted; >> + public int[] ia = new int[5]; >> + public int[] iaWanted = new int[5]; >> + >> + public Integer I, IWanted; >> + public Double D, DWanted; >> + public Float F, FWanted; >> + public Long L, LWanted; >> + public Boolean B, BWanted; >> + public Character C, CWanted; >> + public Byte By, ByWanted; >> + public Double[] Da1 = new Double[10]; >> + public Double[] Da1Wanted = new Double[10]; >> + public Double[] Da2 = null; >> + public Double[] Da2Wanted = null; >> + >> + public char[] ca = new char[3]; >> + public char[] caWanted = new char[3]; >> + public Character[] Ca = new Character[3]; >> + public Character[] CaWanted = new Character[3]; > > That's a mouthful :) > > I have some recommentations for a way to refactor this test to be (in my > opinion) a lot more easy to understand. I don't mean to make more work > for you to do - but this test is quite hard to follow and would be hard > to maintain. > > This idea uses eval + reflection - if you have questions, feel free to > ask me :) (Either by email or IRC). Note that this does not require the > 'auxiliary' JS file at all. > > If you'd bear with me ... (also attached as separate file) > > 1) Refactor JSToJSet.java as something simple, like: > class ... { > // members ... > public int _int; > public double _double; > public float _float; > public long _long; > public boolean _boolean; > public char _char; > public byte _byte; > > public Integer _Integer; > public Double _Double; > public Float _Float; > public Long _Long; > public Boolean _Boolean; > public Character _Character; > public Byte _Byte; > > public String _String; > public Object _Object; > > // Test 'size 1' arrays for simplicity, it is sufficient > public int[] _intArray = new int[1]; > public char[] _charArray = new char[1]; > > public Double[] _DoubleArray = new Double[1]; > public Character[] _CharacterArray = new Character[1]; > > // checking method: > // auxiliary methods for writing to stdout and stderr: > public void printNewValueAndFinish(String fieldname) { > Field field = getClass().getDeclaredField(fieldname); > Object value = field.get(this); > if (value != null && value.getClass().isArray()) { > System.out.print("New array value is: " + Array.get(value, > 0)); > } else { > System.out.print("New value is: " + value); > } > System.out.print("*** APPLET FINISHED ***"); // Or whatever > ending message you want to check for > > } > } > > > > 2) Don't embed javascript in the html file, its hard to find there > > Instead, have something like this in JSToJava_Set.js: > var urlArgs = document.URL.split("?"); > var testParams = urlArgs[1].split(";"); // You can choose a > different character to separate the parmeters other than ';' > var field = testParams[0], value = testParams[1]; > var applet = document.getElementById('jstojSetApplet') > > // Check for special value fields if we need to do anything that > cannot be achieved by parsing the value as a javascript value > if (value == << some special value here! >>){ > value = << do something like allocate a new array here >>; > } > eval('applet.' + field + ' = value'); > > applet.printNewValueAndFinish(field) > > The label is nice but it complicates the test without adding to the > purpose. I would be in favour of just getting rid of it. > > > > > 3) In the test runner, use something like: > > @Test > @TestInBrowsers(testIn = { Browsers.all }) > @NeedsDisplay > public void AppletJSToJSet_int_Test() throws Exception { > jsToJavaSetNormalTest("_int", "1"); // Passes '_int;0' by URL, > checks for 'New value is: ...' > } > > @Test > @TestInBrowsers(testIn = { Browsers.all }) > @NeedsDisplay > public void AppletJSToJSet_Double_Test() throws Exception { > jsToJavaSetNormalTest("_Double", "1.0"); // Passes '_Double;0' > by URL, checks for 'New value is: ...' > } > > > @Test > @TestInBrowsers(testIn = { Browsers.all }) > @NeedsDisplay > public void AppletJSToJSet_Double_Test() throws Exception { > jsToJavaSetSpecialTest("_DoubleArray", < here>>, > "New array value is: << something here >>"); // Passes > '_Double;<>' by URL, checks for 'New array value is: ...' > } > > > Let me know if you have trouble following / implementing this! > I hope it will result in a simplified test (especially use simple values > - there is no need to test long strings of digits, or a string other > than something obvious like "test", as well as one international string > as you did). > > > And as Jiri says, don't shoot me:) > > Cheers, > - Adam -------------- next part -------------- A non-text attachment was scrubbed... Name: adding_JSToJSet_reproducer_improved.patch Type: text/x-patch Size: 15314 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121022/5671114d/adding_JSToJSet_reproducer_improved.patch From adomurad at icedtea.classpath.org Mon Oct 22 08:52:40 2012 From: adomurad at icedtea.classpath.org (adomurad at icedtea.classpath.org) Date: Mon, 22 Oct 2012 15:52:40 +0000 Subject: /hg/icedtea-web: 6 new changesets Message-ID: changeset 274ff243ba73 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=274ff243ba73 author: Danesh Dadachanji date: Mon Oct 22 11:02:38 2012 -0400 Major rework of JarCertVerifier certificate management. This is a long-planned rework of JarCertVerifier, allowing it to handle multiple certificates. The algorithms used to verify jars with multiple certificates vary between JNLPs and Applets. changeset 09c91b85a1a7 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=09c91b85a1a7 author: Adam Domurad date: Fri Oct 19 14:34:16 2012 -0400 Use interface types in JCV classes where applicable changeset 8eb44f9dc27c in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=8eb44f9dc27c author: Adam Domurad date: Fri Oct 19 15:08:40 2012 -0400 Fix regression with trivially signed (eg, just META-INF/) jars changeset d076dbf927b8 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=d076dbf927b8 author: Adam Domurad date: Fri Oct 19 15:14:09 2012 -0400 New message for when JNLP is fully signed by different certs changeset 5b4a8c846308 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=5b4a8c846308 author: Adam Domurad date: Mon Oct 22 11:15:48 2012 -0400 Reproducer for PR822 changeset 9413fbdc5e3d in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=9413fbdc5e3d author: Adam Domurad date: Mon Oct 22 11:44:07 2012 -0400 Revise MultipleSignaturesTest to demonstrate PR822 diffstat: ChangeLog | 149 ++ NEWS | 1 + netx-dist-tests-whitelist | 2 +- netx/net/sourceforge/jnlp/resources/Messages.properties | 5 +- netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 141 +- netx/net/sourceforge/jnlp/security/AppVerifier.java | 91 + netx/net/sourceforge/jnlp/security/CertVerifier.java | 30 +- netx/net/sourceforge/jnlp/security/CertWarningPane.java | 4 +- netx/net/sourceforge/jnlp/security/CertsInfoPane.java | 2 +- netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java | 28 +- netx/net/sourceforge/jnlp/security/JNLPAppVerifier.java | 142 ++ netx/net/sourceforge/jnlp/security/MoreInfoPane.java | 4 +- netx/net/sourceforge/jnlp/security/PluginAppVerifier.java | 225 +++ netx/net/sourceforge/jnlp/tools/CertInformation.java | 292 ++++ netx/net/sourceforge/jnlp/tools/JarCertVerifier.java | 671 +++++---- tests/netx/unit/net/sourceforge/jnlp/tools/JarCertVerifierTest.java | 470 ++++++- tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMatching.html | 46 + tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMatching.jnlp | 57 + tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMismatching.html | 46 + tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMismatching.jnlp | 57 + tests/reproducers/custom/MultipleSignaturesPerJar/srcs/Makefile | 56 + tests/reproducers/custom/MultipleSignaturesPerJar/srcs/somecrazytestpackage/MultipleSignaturesPerJarMain.java | 90 + tests/reproducers/custom/MultipleSignaturesPerJar/testcases/MultipleSignaturesPerJarTests.java | 129 + tests/reproducers/signed/ReadPropertiesSigned/README | 2 + tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest.html | 3 +- tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest1.jnlp | 1 + tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest1_requesting.jnlp | 1 + tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest2.jnlp | 1 + tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTestUsesPermissions.html | 43 + tests/reproducers/signed2/MultipleSignaturesTest/srcs/somecrazytestpackage/MultipleSignaturesTest.java | 18 +- tests/reproducers/signed2/MultipleSignaturesTest/testcases/MultipleSignaturesTestTests.java | 35 +- tests/reproducers/signed2/MultipleSignaturesTestSamePackage/testcases/MultipleSignaturesTestTestsSamePackage.java | 14 +- tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java | 145 ++ 33 files changed, 2548 insertions(+), 453 deletions(-) diffs (truncated from 3695 to 500 lines): diff -r cdc7637779f4 -r 9413fbdc5e3d ChangeLog --- a/ChangeLog Mon Oct 22 10:39:35 2012 -0400 +++ b/ChangeLog Mon Oct 22 11:44:07 2012 -0400 @@ -28,6 +28,155 @@ * tests/reproducers/custom/AppletFolderInArchiveTag/srcs/Makefile: and * tests/reproducers/custom/UnsignedContentInMETAINF/srcs/Makefile: following above renaming +2012-10-19 Adam Domurad + + Revised multiple signatures test to check for new message. Added more + accurate reproducer for PR822. + * tests/reproducers/signed2/MultipleSignaturesTest/srcs/somecrazytestpackage/MultipleSignaturesTest.java: + Made class take a classname parameter so different out-of-package + classes could be executed. + * tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest.html: + Added main-class parameter. + * tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest1.jnlp: + Same. + * tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest1_requesting.jnlp: + Same. + * tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest2.jnlp: + Same. + * tests/reproducers/signed2/MultipleSignaturesTest/testcases/MultipleSignaturesTestTests.java + (multipleSignaturesTestHtmlAppletUsesPermissions): New, tests if fully + signed HTML applets with varied signers can (as they should) execute + with full permissions. Reproduces PR822. + (multipleSignaturesTestJnlpApplicationRequesting): Check for + mismatching signers JNLP failure message. Remove known-to-fail & + inaccurate bug annotation. + * tests/reproducers/signed2/MultipleSignaturesTestSamePackage/testcases/MultipleSignaturesTestTestsSamePackage.java + (multipleSignaturesTestSamePackageJnlpApplicationRequesting): Check for + mismatching signers JNLP failure message. Remove known-to-fail & + inaccurate bug annotation. + +2012-10-19 Adam Domurad + + Reproduces PR822: Applets fail to load if jars have different signers. + Tests for applets & JNLPs with multiple signers per jar. + * tests/reproducers/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java: + Modified to end with standard applet finish message. + * tests/reproducers/simple/ReadProperties/srcs/ReadProperties.java: + * tests/reproducers/custom/MultipleSignaturesPerJar/README: Explains + dependence on ReadPropertiesSigned. + * tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMatching.html: + HTML applet test with a common signer. + * tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMatching.jnlp: + JNLP test with a common signer. + * tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMismatching.html: + HTML applet test without a common signer. + * tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMismatching.jnlp: + JNLP test without a common signer. + * tests/reproducers/custom/MultipleSignaturesPerJar/srcs/Makefile: + Custom makefile used to sign a jar with multiple signers. + * tests/reproducers/custom/MultipleSignaturesPerJar/srcs/somecrazytestpackage/MultipleSignaturesPerJarMain.java: + Accesses ReadPropertiesSigned from another package with different + signers. + * tests/reproducers/custom/MultipleSignaturesPerJar/testcases/MultipleSignaturesPerJarTests.java: + Test driver. + +2012-10-19 Adam Domurad + + New message for signer mismatch in JNLP applications. + * netx/net/sourceforge/jnlp/resources/Messages.properties: Added + message 'The JNLP application is not fully signed by a single cert.' + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Message + thrown when JNLP's jcv.allJarsSigned() is true but not + jcv.isFullySigned(); + +2012-10-19 Adam Domurad + + Fixes JCV#isTriviallySigned(). Reproducer 'EmptySignedJar' passes + again. + * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java: Remove + problematic 'triviallySigned' variable and instead determine + whether triviallySigned on the fly. Consider jars with 0 signable + entries as SIGNED_OK. + * tests/netx/unit/net/sourceforge/jnlp/tools/JarCertVerifierTest.java: + Update no-signers unit test. + +2012-10-19 Adam Domurad + + * netx/net/sourceforge/jnlp/security/AppVerifier.java: Use interface + types for declared types where applicable. + * netx/net/sourceforge/jnlp/security/PluginAppVerifier.java: Same. + * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java: Same. + +2012-10-19 Adam Domurad + + * netx/net/sourceforge/jnlp/security/AppVerifier.java: Use interface + types for declared types where applicable. + * netx/net/sourceforge/jnlp/security/PluginAppVerifier.java: Same. + * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java: Same. + +2012-10-19 Danesh Dadachanji + + Rework JarCertVerifier certificate management to handle multiple + certificates and use different algorithms to verify JNLPs and Applets. + * netx/net/sourceforge/jnlp/resources/Messages.properties: + Removed SHasUnsignedEntry. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: + Set JCV instance to final but uninitialized. + (JNLPClassLoader): Initialized JCV with runtime dependent verifier. + (addNewJar), (initializeResources), (verifySignedJNLP): + Replaced use of local JarCertVerifier variable with the instance variable. + Added calls to isFullySigned wherever signer verification is done. + (activateJars): No longer verifies nested jars. These receive the same + security permissions as their parent jar, regardless of the nested + jar's signing. + (checkTrustWithUser): Removed JCV param, reimplemented to wrap around + JCV's checkTrustWithUser method. + (verifyJars): Removed. + * netx/net/sourceforge/jnlp/security/AppVerifier.java: + New strategy pattern interface that specifies verification methods + required regardless of the runtime. + * netx/net/sourceforge/jnlp/security/JNLPAppVerifier.java: + * netx/net/sourceforge/jnlp/security/PluginAppVerifier.java: + New strategy pattern classes used to determine which algorithms to use + depending on the runtime. + * netx/net/sourceforge/jnlp/security/CertVerifier.java: + Added CertPath param to all the methods. + (noSigningIssues): Removed. + * netx/net/sourceforge/jnlp/security/CertWarningPane.java: + * netx/net/sourceforge/jnlp/security/CertsInfoPane.java: + * netx/net/sourceforge/jnlp/security/MoreInfoPane.java: + Updated calls to the verifier's methods with the new CertPath param. All + are set to null so far. + * netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java: + Added CertPath param to all the methods. It's mostly ignored though. + * netx/net/sourceforge/jnlp/tools/CertInformation.java: + New class to represent all the information about a signer with + with respect to all of the entries it has signed for the app. + * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java: + Completely reworked to use CertInformation and AppVerifier functionality. + (getCertPath), (getCertInformation), (checkTrustWithUser), + (getJarSignableEntries), (getTotalJarEntries): New method. + (noSigningIssues), (anyJarsSigned): Removed. + (verifyResult): Renamed enum to VerifyResult + (JarCertVerifier): New constructor used to set AppVerifier instance. + (getAlreadyTrustPublisher), (getRootInCacerts): Now uses strategy pattern. + (hasSigningIssues), (getDetails), (checkTrustedCerts), (checkCertUsage): + Now uses cert info class. + (getCerts): Renamed to getCertsList. + (isFullySignedByASingleCert): renamed to isFullySigned and to use + the strategy pattern. + (add): New public method that resets some instance vars and + calls verifyJars. + (verifyJars): Modifier changed to private, above method should be used. + Also skips jars that have been verified before. + (verifyJar): Removed actual verification code, only reads jars into the JVM. + (verifyJarEntryCerts): New method. Does actual verification of jars. + (getPublisher), (getRoot): Use hacky currentlyUsed variable as the signer. + * tests/netx/unit/net/sourceforge/jnlp/tools/JarCertVerifierTest.java: + Unit test JCV's verifyJarEntryCerts method. + * tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java: + Unit test helper that creates CodeSigner instances. + 2012-10-16 Adam Domurad * tests/reproducers/simple/AppletTakesLastParam/srcs/AppletTakesLastParam.java: diff -r cdc7637779f4 -r 9413fbdc5e3d NEWS --- a/NEWS Mon Oct 22 10:39:35 2012 -0400 +++ b/NEWS Mon Oct 22 11:44:07 2012 -0400 @@ -19,6 +19,7 @@ - PR955: regression: SweetHome3D fails to run - PR1145: IcedTea-Web can cause ClassCircularityError - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 + - PR822: Applets fail to load if jars have different signers New in release 1.3 (2012-XX-XX): * NetX diff -r cdc7637779f4 -r 9413fbdc5e3d netx-dist-tests-whitelist --- a/netx-dist-tests-whitelist Mon Oct 22 10:39:35 2012 -0400 +++ b/netx-dist-tests-whitelist Mon Oct 22 11:44:07 2012 -0400 @@ -1,1 +1,1 @@ -.* +MultipleSignaturesTest diff -r cdc7637779f4 -r 9413fbdc5e3d netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Mon Oct 22 10:39:35 2012 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Mon Oct 22 11:44:07 2012 -0400 @@ -78,11 +78,13 @@ LCantDetermineMainClassInfo=Could not determine the main class for this application. LUnsignedJarWithSecurity=Cannot grant permissions to unsigned jars. LUnsignedJarWithSecurityInfo=Application requested security permissions, but jars are not signed. +LSignedJNLPAppDifferentCerts=The JNLP application is not fully signed by a single cert. +LSignedJNLPAppDifferentCertsInfo=The JNLP application has its components individually signed, however there must be a common signer to all entries. LSignedAppJarUsingUnsignedJar=Signed application using unsigned jars. LSignedAppJarUsingUnsignedJarInfo=The main application jar is signed, but some of the jars it is using aren't. LSignedJNLPFileDidNotMatch=The signed JNLP file did not match the launching JNLP file. LNoSecInstance=Error: No security instance for {0}. The application may have trouble continuing -LCertFoundIn={0} found in cacerts ({1}) +LCertFoundIn={0} found in cacerts ({1}) LSingleInstanceExists=Another instance of this applet already exists and only one may be run at the same time. JNotApplet=File is not an applet. @@ -227,7 +229,6 @@ SBadKeyUsage=Resources contain entries whose signer certificate's KeyUsage extension doesn't allow code signing. SBadExtendedKeyUsage=Resources contain entries whose signer certificate's ExtendedKeyUsage extension doesn't allow code signing. SBadNetscapeCertType=Resources contain entries whose signer certificate's NetscapeCertType extension doesn't allow code signing. -SHasUnsignedEntry=Resources contain unsigned entries which have not been integrity-checked. SHasExpiredCert=The digital signature has expired. SHasExpiringCert=Resources contain entries whose signer certificate will expire within six months. SNotYetValidCert=Resources contain entries whose signer certificate is not yet valid. diff -r cdc7637779f4 -r 9413fbdc5e3d netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon Oct 22 10:39:35 2012 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon Oct 22 11:44:07 2012 -0400 @@ -79,8 +79,10 @@ import net.sourceforge.jnlp.cache.IllegalResourceDescriptorException; import net.sourceforge.jnlp.cache.ResourceTracker; import net.sourceforge.jnlp.cache.UpdatePolicy; +import net.sourceforge.jnlp.security.AppVerifier; +import net.sourceforge.jnlp.security.JNLPAppVerifier; +import net.sourceforge.jnlp.security.PluginAppVerifier; import net.sourceforge.jnlp.security.SecurityDialogs; -import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import net.sourceforge.jnlp.tools.JarCertVerifier; import net.sourceforge.jnlp.util.FileUtils; import sun.misc.JarIndex; @@ -153,14 +155,8 @@ /** all jars not yet part of classloader or active */ private List available = new ArrayList(); - /** all of the jar files that were verified */ - private ArrayList verifiedJars = null; - - /** all of the jar files that were not verified */ - private ArrayList unverifiedJars = null; - /** the jar cert verifier tool to verify our jars */ - private JarCertVerifier jcv = null; + private final JarCertVerifier jcv; private boolean signing = false; @@ -223,6 +219,16 @@ this.mainClass = mainName; + AppVerifier verifier; + + if (file instanceof PluginBridge && !((PluginBridge)file).useJNLPHref()) { + verifier = new PluginAppVerifier(); + } else { + verifier = new JNLPAppVerifier(); + } + + jcv = new JarCertVerifier(verifier); + // initialize extensions initializeExtensions(); @@ -311,7 +317,11 @@ * */ if (!file.getSecurity().getSecurityType().equals(SecurityDesc.SANDBOX_PERMISSIONS) && !signing) { - throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LUnsignedJarWithSecurity"), R("LUnsignedJarWithSecurityInfo")); + if (jcv.allJarsSigned()) { + throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LSignedJNLPAppDifferentCerts"), R("LSignedJNLPAppDifferentCertsInfo")); + } else { + throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LUnsignedJarWithSecurity"), R("LUnsignedJarWithSecurityInfo")); + } } else if (signing == true) { this.security = file.getSecurity(); } else { @@ -604,10 +614,8 @@ if (JNLPRuntime.isVerifying()) { - JarCertVerifier jcv; - try { - jcv = verifyJars(initialJars); + jcv.add(initialJars, tracker); } catch (Exception e) { //we caught an Exception from the JarCertVerifier class. //Note: one of these exceptions could be from not being able @@ -618,7 +626,7 @@ } //Case when at least one jar has some signing - if (jcv.anyJarsSigned() && jcv.isFullySignedByASingleCert()) { + if (jcv.isFullySigned()) { signing = true; if (!jcv.allJarsSigned() && @@ -650,10 +658,10 @@ // If main jar was found, but a signed JNLP file was not located if (!isSignedJNLP && foundMainJar) file.setSignedJNLPAsMissing(); - + //user does not trust this publisher - if (!jcv.getAlreadyTrustPublisher() && !jcv.isTriviallySigned()) { - checkTrustWithUser(jcv); + if (!jcv.isTriviallySigned()) { + checkTrustWithUser(); } else { /** * If the user trusts this publisher (i.e. the publisher's certificate @@ -864,7 +872,6 @@ private void verifySignedJNLP(JARDesc jarDesc, JarFile jarFile) throws LaunchException { - JarCertVerifier signer = new JarCertVerifier(); List desc = new ArrayList(); desc.add(jarDesc); @@ -875,9 +882,9 @@ InputStreamReader jnlpReader = null; try { - signer.verifyJars(desc, tracker); - - if (signer.allJarsSigned()) { // If the jar is signed + // NOTE: verification should have happened by now. In other words, + // calling jcv.verifyJars(desc, tracker) here should have no affect. + if (jcv.isFullySigned()) { Enumeration entries = jarFile.entries(); JarEntry je; @@ -961,7 +968,7 @@ /* * After this exception is caught, it is escaped. If an exception is * thrown while handling the jar file, (mainly for - * JarCertVerifier.verifyJars) it assumes the jar file is unsigned and + * JarCertVerifier.add) it assumes the jar file is unsigned and * skip the check for a signed JNLP file */ @@ -991,28 +998,18 @@ e.printStackTrace(System.err); } } - - private void checkTrustWithUser(JarCertVerifier jcv) throws LaunchException { + + /** + * Prompt the user for trust on all the signers that require approval. + * @throws LaunchException if the user does not approve every dialog prompt. + */ + private void checkTrustWithUser() throws LaunchException { if (JNLPRuntime.isTrustAll()){ return; } - if (!jcv.getRootInCacerts()) { //root cert is not in cacerts - boolean b = SecurityDialogs.showCertWarningDialog( - AccessType.UNVERIFIED, file, jcv); - if (!b) - throw new LaunchException(null, null, R("LSFatal"), - R("LCLaunching"), R("LNotVerified"), ""); - } else if (jcv.getRootInCacerts()) { //root cert is in cacerts - boolean b = false; - if (jcv.noSigningIssues()) - b = SecurityDialogs.showCertWarningDialog( - AccessType.VERIFIED, file, jcv); - else if (!jcv.noSigningIssues()) - b = SecurityDialogs.showCertWarningDialog( - AccessType.SIGNING_ERROR, file, jcv); - if (!b) - throw new LaunchException(null, null, R("LSFatal"), - R("LCLaunching"), R("LCancelOnUserRequest"), ""); + + if (jcv.isFullySigned() && !jcv.getAlreadyTrustPublisher()) { + jcv.checkTrustWithUser(file); } } @@ -1226,15 +1223,25 @@ continue; } - JarCertVerifier signer = new JarCertVerifier(); - List jars = new ArrayList(); - JARDesc jarDesc = new JARDesc(new File(extractedJarLocation).toURL(), null, null, false, false, false, false); - jars.add(jarDesc); tracker.addResource(new File(extractedJarLocation).toURL(), null, null, null); - signer.verifyJars(jars, tracker); - if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) { - checkTrustWithUser(signer); + URL codebase = file.getCodeBase(); + if (codebase == null) { + //FIXME: codebase should be the codebase of the Main Jar not + //the location. Although, it still works in the current state. + codebase = file.getResources().getMainJAR().getLocation(); + } + + SecurityDesc jarSecurity = null; + if (jcv.isFullySigned()) { + // Already trust application, nested jar should be given + jarSecurity = new SecurityDesc(file, + SecurityDesc.ALL_PERMISSIONS, + codebase.getHost()); + } else { + jarSecurity = new SecurityDesc(file, + SecurityDesc.SANDBOX_PERMISSIONS, + codebase.getHost()); } try { @@ -1244,25 +1251,6 @@ CachedJarFileCallback.getInstance().addMapping(fakeRemote, fileURL); addURL(fakeRemote); - SecurityDesc jarSecurity = file.getSecurity(); - - if (file instanceof PluginBridge) { - - URL codebase = null; - - if (file.getCodeBase() != null) { - codebase = file.getCodeBase(); - } else { - //Fixme: codebase should be the codebase of the Main Jar not - //the location. Although, it still works in the current state. - codebase = file.getResources().getMainJAR().getLocation(); - } - - jarSecurity = new SecurityDesc(file, - SecurityDesc.ALL_PERMISSIONS, - codebase.getHost()); - } - jarLocationSecurityMap.put(fakeRemote, jarSecurity); } catch (MalformedURLException mfue) { @@ -1475,18 +1463,6 @@ } /** - * Verifies code signing of jars to be used. - * - * @param jars the jars to be verified. - */ - private JarCertVerifier verifyJars(List jars) throws Exception { - - jcv = new JarCertVerifier(); - jcv.verifyJars(jars, tracker); - return jcv; - } - - /** * Find the loaded class in this loader or any of its extension loaders. */ protected Class findLoadedClassAll(String name) { @@ -1642,7 +1618,6 @@ // Verify if needed - final JarCertVerifier signer = new JarCertVerifier(); final List jars = new ArrayList(); jars.add(desc); @@ -1654,14 +1629,12 @@ AccessController.doPrivileged(new PrivilegedExceptionAction() { public Void run() throws Exception { - signer.verifyJars(jars, tracker); + jcv.add(jars, tracker); - if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) { - checkTrustWithUser(signer); - } + checkTrustWithUser(); final SecurityDesc security; - if (signer.anyJarsSigned()) { + if (jcv.isFullySigned()) { security = new SecurityDesc(file, SecurityDesc.ALL_PERMISSIONS, file.getCodeBase().getHost()); diff -r cdc7637779f4 -r 9413fbdc5e3d netx/net/sourceforge/jnlp/security/AppVerifier.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/AppVerifier.java Mon Oct 22 11:44:07 2012 -0400 @@ -0,0 +1,91 @@ +/* AppVerifier.java + Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an From bugzilla-daemon at icedtea.classpath.org Mon Oct 22 08:52:54 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 22 Oct 2012 15:52:54 +0000 Subject: [Bug 822] Applets fail to load if jars have different signers In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=822 --- Comment #18 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea-web?cmd=changeset;node=5b4a8c846308 author: Adam Domurad date: Mon Oct 22 11:15:48 2012 -0400 Reproducer for PR822 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121022/d47fa831/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Oct 22 08:53:00 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 22 Oct 2012 15:53:00 +0000 Subject: [Bug 822] Applets fail to load if jars have different signers In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=822 --- Comment #19 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea-web?cmd=changeset;node=9413fbdc5e3d author: Adam Domurad date: Mon Oct 22 11:44:07 2012 -0400 Revise MultipleSignaturesTest to demonstrate PR822 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121022/bd06c3f3/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Oct 22 08:59:23 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 22 Oct 2012 15:59:23 +0000 Subject: [Bug 822] Applets fail to load if jars have different signers In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=822 Adam Domurad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #20 from Adam Domurad --- This should now be fixed in HEAD. Would appreciate if you verified this for yourself (seems working to me). Cheers, - Adam -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121022/83dd15cf/attachment.html From adomurad at icedtea.classpath.org Mon Oct 22 09:39:39 2012 From: adomurad at icedtea.classpath.org (adomurad at icedtea.classpath.org) Date: Mon, 22 Oct 2012 16:39:39 +0000 Subject: /hg/icedtea-web: Fixing whitelist content Message-ID: changeset 52aca680875f in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=52aca680875f author: Adam Domurad date: Mon Oct 22 12:42:14 2012 -0400 Fixing whitelist content diffstat: netx-dist-tests-whitelist | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (6 lines): diff -r 9413fbdc5e3d -r 52aca680875f netx-dist-tests-whitelist --- a/netx-dist-tests-whitelist Mon Oct 22 11:44:07 2012 -0400 +++ b/netx-dist-tests-whitelist Mon Oct 22 12:42:14 2012 -0400 @@ -1,1 +1,1 @@ -MultipleSignaturesTest +.* From adomurad at redhat.com Mon Oct 22 09:32:52 2012 From: adomurad at redhat.com (Adam Domurad) Date: Mon, 22 Oct 2012 12:32:52 -0400 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "set" tests In-Reply-To: <50855E32.3090505@redhat.com> References: <506C75F2.7010505@redhat.com> <5075D156.90604@redhat.com> <50855E32.3090505@redhat.com> Message-ID: <50857534.9020206@redhat.com> On 10/22/2012 10:54 AM, Jana Fabrikova wrote: > Hello Adam, > > thank you for the comments. I modified the JSToJSet reproducer > according to your suggestions, please see the attached patch (new > version of the JSToJSet reproducer). Thank you very much for the update! I don't mean to torture you with rewrites, but I do find this a lot more tasteful :). Overall looks a lot better, small comments inline. > > The behaviour when using eval and reflection is different in 2 ways: > - the testcase arrayBeyondLength was meaningless from the Java side, > so it is not included > - all the testcases look only at the string output, so the values are > tested, but the types are not (I guess this is not a problem, since > the variables in Java have its defined types and a problem will occur > if JS tries to set a variable to a value of a bad type anyway), Sounds fine to me. > > Jana > > diff --git a/adding_JSToJSet_reproducer_improved.patch > b/adding_JSToJSet_reproducer_improved.patch > new file mode 100644 > diff --git a/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html > b/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html > @@ -0,0 +1,25 @@ > + > + > + > + JavaScript to Java LiveConnect - Set values from applet > + > + > + > + > + > + > + > +

The JSToJSet html page

> + > + id="jstojSetApplet" MAYSCRIPT> > + > + > + > +
> + > + > + > + > + > diff --git > a/tests/reproducers/simple/JSToJSet/resources/JSToJava_Set.js > b/tests/reproducers/simple/JSToJSet/resources/JSToJava_Set.js > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/JSToJSet/resources/JSToJava_Set.js > @@ -0,0 +1,39 @@ > +function doSetTests( ){ > + > + var urlArgs = document.URL.split("?"); > + var testParams = urlArgs[1].split(";"); > + var applet = document.getElementById('jstojSetApplet'); > + var field = testParams[0]; > + var value = testParams[1]; > + > + if( value === "JavaScript"){ > + if( field === "_char"){ > + value = 97; > + } > + > + if( field === "_Character"){ > + value = new (applet.Packages).java.lang.Character(65); > + } > + > + if( field === "_specialString"){ > + value = "????$????"; > + } > + }else if(value.indexOf('[') != -1){ > + > + var elem = value.substring(1); > + value = new Array(); > + eval('value[0] = elem'); > + > + } > + > + eval('applet.' + field + '= value'); > + > + //modifiing _intArray[0] into _intArray > + // _DoubleArray[0] into _DoubleArray > + var nameEnd = field.indexOf('['); > + if( nameEnd != -1){ > + field = field.substring(0,nameEnd); > + } > + > + applet.printNewValueAndFinish(field); > +} > diff --git > a/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp > b/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp > @@ -0,0 +1,21 @@ > + > + > + > + JavaScript to Java LiveConnect - Set > + RedHat > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> > + LiveConnect - tests for setting members on Java > side. > + > + > + > + + href="http://java.sun.com/products/autodl/j2se"/> > + > + > + + name="JS to J Set" > + main-class="JSToJSet" > + width="1000" > + height="100"> > + > + > diff --git a/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java > b/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java > @@ -0,0 +1,73 @@ > +import java.applet.*; > +import java.awt.*; > +import java.lang.reflect.Array; > +import java.lang.reflect.Field; > + > +public class JSToJSet extends Applet { > + > + public int _int; > + public double _double; > + public float _float; > + public long _long; > + public boolean _boolean; > + public char _char; > + public byte _byte; > + public String _String; > + public String _specialString; > + public Object _Object; > + public int[] _intArray = new int[1]; > + public Integer _Integer; > + public Double _Double; > + public Float _Float; > + public Long _Long; > + public Boolean _Boolean; > + public Character _Character; > + public Byte _Byte; > + public Double[] _DoubleArray = new Double[10]; > + public Double[] _DoubleArray2 = null; > + public char[] _charArray = new char[1]; > + public Character[] _CharacterArray = new Character[1]; > + > + public void init() { > + String initStr = "JSToJSet applet initialized."; > + System.out.println(initStr); > + > + // setting up variables that will be accessed by JS > + _int = 0; > + _double = 0.0; > + _float = 0F; > + _long = 0L; > + _boolean = false; > + _char = 'A'; > + _byte = 0; Can you remove all the assignments that are already default for members ( I may be missing a reason why not, in which case do say so)? (In Java all numbers default to 0, booleans default to false, objects to null.) > + _String = ""; > + _specialString = ""; > + _Object = new String("non-null object"); I think it'd be clearer and shorter if the _Object assignment was in the _Object definition. > + _Integer = 0; > + _Double = 0.0; > + _Float = 0F; > + _Long = 0L; > + _Boolean = false; > + _Character = 'B'; Similarly, anything that isn't default can be moved to the definition. > + _Byte = null; > + > + _intArray[0] = 0; > + _DoubleArray[0] = 0.0; The 0s are already default contents and not needed (unless theres a need for the assignment that I'm missing). > + > + String setupStr = "JSToJSet applet set up for SET tests."; > + System.out.println(setupStr); > + > + } > + > + public void printNewValueAndFinish(String fieldname) throws Exception { > + Field field = getClass().getDeclaredField(fieldname); > + Object value = field.get(this); > + if (value != null && value.getClass().isArray()) { > + System.out.println("New array value is: " + Array.get(value, 0)); > + } else { > + System.out.println("New value is: " + value); > + } > + System.out.println("afterTests"); > + } > + > +} > diff --git > a/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java > b/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java > new file mode 100644 > --- /dev/null > +++ b/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java > @@ -0,0 +1,258 @@ > +/* JSToJSetTest.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import net.sourceforge.jnlp.ProcessResult; > +import net.sourceforge.jnlp.ServerAccess; > +import net.sourceforge.jnlp.browsertesting.BrowserTest; > +import net.sourceforge.jnlp.browsertesting.Browsers; > +import net.sourceforge.jnlp.closinglisteners.CountingClosingListener; > +import net.sourceforge.jnlp.annotations.NeedsDisplay; > +import net.sourceforge.jnlp.annotations.TestInBrowsers; > +import org.junit.Assert; > + > +import org.junit.Test; > + > +public class JSToJSetTest extends BrowserTest { > + > + private final String exceptionStr = "xception"; > + private final String errorStr = "rror"; > + private final String initStr = "JSToJSet applet initialized."; > + private final String setupStr = "JSToJSet applet set up for SET tests."; > + private final String afterStr = "afterTests"; > + > + private class CountingClosingListenerImpl extends > CountingClosingListener { > + > + @Override > + protected boolean isAlowedToFinish(String s) { > + if (s.contains(exceptionStr) || s.contains(errorStr)) { > + return true; > + } > + return (s.contains(initStr) && s.contains(setupStr) && > s.contains(afterStr)); > + } > + } > + > + private void evaluateStdoutContents(String expectedStdout, > ProcessResult pr) { > + // Assert that the applet was initialized. > + Assert.assertTrue("JSToJSetTest stdout should contain \"" + initStr > + + "\" but it didn't.", pr.stdout.contains(initStr)); > + > + // Assert that the applet was set up for the SM tests. > + Assert.assertTrue("JSToJSetTest stdout should contain \"" + setupStr > + + "\" but it didn't.", pr.stdout.contains(setupStr)); > + > + // Assert that there were no errors / exceptions > + Assert.assertFalse("There were problems: "+pr.stdout, > + pr.stdout.contains(errorStr) || pr.stdout.contains(exceptionStr) ); Unless I'm missing something here, this should be checking stderr (uncaught exceptions always print in standard error). Another issue here though is that the applet can randomly print exceptions when the applet window is closed. This will cause the tests to erroneously come up as failures. I would recommend checking one or more specific exceptions that are likely to occur, and generally assume that the test will fail on the next 'assertTrue' if an exception interrupts normal execution. > + > + // Assert that the values set by JavaScript are ok > + Assert.assertTrue("The output should be: "+expectedStdout+", but is: > "+pr.stdout, > + pr.stdout.contains(expectedStdout)); > + > + } > + > + private void jsToJavaSetNormalTest(String fieldStr, String valueStr) > throws Exception { > + String strURL = "/JSToJSet.html?" + fieldStr + ";" + valueStr; > + ProcessResult pr = server.executeBrowser(strURL, new > CountingClosingListenerImpl(), new CountingClosingListenerImpl()); > + String expectedStdout = "New value is: " + valueStr; > + evaluateStdoutContents(expectedStdout, pr); > + } > + > + private void jsToJavaSetSpecialTest(String fieldStr, String > valueStr, int testType) throws Exception { > + String strURL = "/JSToJSet.html?"; > + String expectedStdout = ""; > + switch( testType ){ > + case 0://array element > + strURL += fieldStr + ";" + valueStr; > + expectedStdout = "New array value is: "+valueStr; > + break; > + case 1://whole array, set 1st element > + strURL += fieldStr + ";[" + valueStr; > + expectedStdout = "New array value is: "+valueStr; > + break; > + case 2://char et al - to be set at JS side > + strURL += fieldStr + ";JavaScript"; > + expectedStdout = "New value is: "+valueStr; > + break; > + default: > + break; > + } > + > + ProcessResult pr = server.executeBrowser(strURL, new > CountingClosingListenerImpl(), new CountingClosingListenerImpl()); > + evaluateStdoutContents(expectedStdout, pr); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_int_Test() throws Exception { > + jsToJavaSetNormalTest("_int", "1"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_double_Test() throws Exception { > + jsToJavaSetNormalTest("_double", "1.0"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_float_Test() throws Exception { > + jsToJavaSetNormalTest("_float", "1.1"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_long_Test() throws Exception { > + jsToJavaSetNormalTest("_long", "10000"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_boolean_Test() throws Exception { > + jsToJavaSetNormalTest("_boolean", "true"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_char_Test() throws Exception { > + jsToJavaSetSpecialTest("_char", "a", 2); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_byte_Test() throws Exception { > + jsToJavaSetNormalTest("_byte", "10"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_intArrayElement_Test() throws Exception { > + jsToJavaSetSpecialTest("_intArray[0]", "1", 0); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_regularString_Test() throws Exception { > + jsToJavaSetNormalTest("_String", "teststring"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_specialCharsString_Test() throws Exception { > + jsToJavaSetSpecialTest("_specialString", "????$????", 2); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_null_Test() throws Exception { > + jsToJavaSetNormalTest("_Object", "null"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_Integer_Test() throws Exception { > + jsToJavaSetNormalTest("_Integer", "1"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_Double_Test() throws Exception { > + jsToJavaSetNormalTest("_Double", "1.0"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_Float_Test() throws Exception { > + jsToJavaSetNormalTest("_Float", "1.1"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_Long_Test() throws Exception { > + jsToJavaSetNormalTest("_Long", "10000"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_Boolean_Test() throws Exception { > + jsToJavaSetNormalTest("_Boolean", "true"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_Character_Test() throws Exception { > + jsToJavaSetSpecialTest("_Character", "A", 2); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_Byte_Test() throws Exception { > + jsToJavaSetNormalTest("_Byte", "100"); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_DoubleArrayElement_Test() throws Exception { > + jsToJavaSetSpecialTest("_DoubleArray[0]", "1.1", 0); > + } > + > + @Test > + @TestInBrowsers(testIn = { Browsers.all }) > + @NeedsDisplay > + public void AppletJSToJSet_DoubleFullArray_Test() throws Exception { > + jsToJavaSetSpecialTest("_DoubleArray", "0.1", 1); > + } > + > +} Good work! Really. It's structured a lot more like a test should be now (with the testcases/ test class responsible for determining if a test passes or fails). Very close to push-ready. Cheers, - Adam From andrew at icedtea.classpath.org Mon Oct 22 10:49:25 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Mon, 22 Oct 2012 17:49:25 +0000 Subject: /hg/release/icedtea6-1.11: Prepare for next release cycle. Message-ID: changeset ad6dcbef91ef in /hg/release/icedtea6-1.11 details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=ad6dcbef91ef author: Andrew John Hughes date: Mon Oct 22 18:49:12 2012 +0100 Prepare for next release cycle. 2012-10-22 Andrew John Hughes * NEWS: Cleanup. Add section for 1.11.6. * configure.ac: Bump to 1.11.6pre. diffstat: ChangeLog | 6 ++++++ NEWS | 7 +++++-- configure.ac | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diffs (49 lines): diff -r 2e4b16eaaf3f -r ad6dcbef91ef ChangeLog --- a/ChangeLog Tue Oct 16 21:23:51 2012 +0100 +++ b/ChangeLog Mon Oct 22 18:49:12 2012 +0100 @@ -1,3 +1,9 @@ +2012-10-22 Andrew John Hughes + + * NEWS: Cleanup. Add section for + 1.11.6. + * configure.ac: Bump to 1.11.6pre. + 2012-10-15 Andrew John Hughes * Makefile.am: diff -r 2e4b16eaaf3f -r ad6dcbef91ef NEWS --- a/NEWS Tue Oct 16 21:23:51 2012 +0100 +++ b/NEWS Mon Oct 22 18:49:12 2012 +0100 @@ -10,6 +10,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY +New in release 1.11.6 (20XX-XX-XX): + New in release 1.11.5 (2012-10-16): * Security fixes @@ -34,11 +36,12 @@ - S7158804: Improve config file parsing - S7176337: Additional changes needed for 7158801 fix - S7198606, CVE-2012-4416: Improve VM optimization -* Bug fixes - - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default +* Backports - S7175845: "jar uf" changes file permissions unexpectedly - S7177216: native2ascii changes file permissions of input file - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo +* Bug fixes + - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default New in release 1.11.4 (2012-08-31): diff -r 2e4b16eaaf3f -r ad6dcbef91ef configure.ac --- a/configure.ac Tue Oct 16 21:23:51 2012 +0100 +++ b/configure.ac Mon Oct 22 18:49:12 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea6],[1.11.5],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.11.6pre],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From bugzilla-daemon at icedtea.classpath.org Mon Oct 22 13:17:32 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 22 Oct 2012 20:17:32 +0000 Subject: [Bug 1199] New: NullPointerException in JNLPClassLoader.getPermissions with Apache Derby/Open Wonderland client Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1199 Priority: P3 Bug ID: 1199 CC: unassigned at icedtea.classpath.org Assignee: omajid at redhat.com Summary: NullPointerException in JNLPClassLoader.getPermissions with Apache Derby/Open Wonderland client Severity: normal Classification: Unclassified OS: Linux Reporter: OmegaPhil+IcedTea.bugs at gmail.com Hardware: x86_64 Status: NEW Version: unspecified Component: NetX (javaws) Product: IcedTea-Web Created attachment 777 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=777&action=edit Apache Derby log The Open Wonderland client is a Java WebStart client to access virtual worlds (https://en.wikipedia.org/wiki/Open_Wonderland). Attempting to run the client to access the following working public server: ============================================================================ wget http://owf2.virtualnorthstar.org:8080/wonderland-web-front/app/Wonderland.jnlp && javaws Wonderland.jnlp ============================================================================ Results in a number of errors associated with failures to cache assets - it later fails to start completely, I assume because of this? I don't know Java, so I have attempted to ask the Open Wonderland google group to help work out how to post a useful bug (see lengthy thread https://groups.google.com/d/msg/openwonderland/-c3P211bjGI/9fa2yKp_BMUJ and onwards), however this hasnt come to much. The best I have so far is the attached Derby log which presumably is responsible for the failures? The google group has many attempts with logs posted if this is not enough - but they may be too specific to Open Wonderland, hence they are not here. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121022/e259bf27/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Oct 22 13:19:10 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 22 Oct 2012 20:19:10 +0000 Subject: [Bug 1199] NullPointerException in JNLPClassLoader.getPermissions with Apache Derby/Open Wonderland client In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1199 --- Comment #1 from OmegaPhil+IcedTea.bugs at gmail.com --- OS: Debian Testing (Wheezy). java version "1.7.0_03" OpenJDK Runtime Environment (IcedTea7 2.1.2) (7u3-2.1.2-2) OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode) aptitude iceatea-netx version: 1.3-2 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121022/339232af/attachment.html From helpcrypto at gmail.com Tue Oct 23 00:23:36 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Tue, 23 Oct 2012 09:23:36 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <5075BE35.5050502@redhat.com> <508514E1.80005@redhat.com> Message-ID: Another buggy behaviour. Can you please confirm it before filling any bug? I think this one is not icedtea-web, but openjdk/core. string file="path-to-pkcs11-module-library"; PKCS11 pkcs11=PKCS11.getInstance(file, "C_GetFunctionList", null, false); long []slots=pkcs11.C_GetSlotList(true); pkcs11.C_Finalize(null); pkcs11=PKCS11.getInstance(file, "C_GetFunctionList", null, false); slots=pkcs11.C_GetSlotList(true); //returns a CKR_CRIPTOKI_NOT_INITIALIZED, altought it should return a valid slot list. Thanks a lot From amiko212 at 126.com Tue Oct 23 00:31:57 2012 From: amiko212 at 126.com (liu chao jun) Date: Tue, 23 Oct 2012 15:31:57 +0800 (CST) Subject: Here need your help In-Reply-To: <1c63f8d2.184b7a.13a4973e2d4.Coremail.amiko212@126.com> References: <1c63f8d2.184b7a.13a4973e2d4.Coremail.amiko212@126.com> Message-ID: <620dcc55.b2b8.13a8c88f772.Coremail.amiko212@126.com> Hi all when i compiled llvm-3.0 with icedtea1.11.4 together,A memory_barrier error happened ,And now I write to all of you for the following questions need your help and suggestion : 1, Is any function which can replace the "make_function" in the following function, 2 , Or is there any different paramters in make_function with the similar action with the following one 3 ,Is there a function similar with "nop" which can return a address in LLVM or Shark , Value* SharkBuilder::memory_barrier() { return make_function( #if defined(ARM) (address) 0xffff0fa0, // __kernel_dmb #else "llvm.memory.barrier", #endif // ARM "11111", "v"); } what's more the Dir of the function is :/openjdk-ecj/hotspot/src/share/vm/shark/sharkBuild.cpp Thank you very much and looking forward to your reply BR//Amiko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121023/bf86d52f/attachment.html From jvanek at icedtea.classpath.org Tue Oct 23 00:51:06 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Tue, 23 Oct 2012 07:51:06 +0000 Subject: /hg/icedtea-web: KnownToFail texts are now bold in html report Message-ID: changeset c52fcd37dbd8 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c52fcd37dbd8 author: Jiri Vanek date: Tue Oct 23 09:56:26 2012 +0200 KnownToFail texts are now bold in html report diffstat: ChangeLog | 6 ++++++ tests/report-styles/jreport.xsl | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diffs (38 lines): diff -r 52aca680875f -r c52fcd37dbd8 ChangeLog --- a/ChangeLog Mon Oct 22 12:42:14 2012 -0400 +++ b/ChangeLog Tue Oct 23 09:56:26 2012 +0200 @@ -1,3 +1,9 @@ +2012-10-23 Jiri Vanek + + KnownToFail texts are now bold in html report + * tests/report-styles/jreport.xsl: all text outputs of + test="@known-to-fail=true" conditions are marked with . + 2012-10-19 Adam Domurad * tests/reproducers/custom/AdditionalJarsInMetaInfIndexList/testcases/AdditionalJarsInMetaInfIndexListTests.java diff -r 52aca680875f -r c52fcd37dbd8 tests/report-styles/jreport.xsl --- a/tests/report-styles/jreport.xsl Mon Oct 22 12:42:14 2012 -0400 +++ b/tests/report-styles/jreport.xsl Tue Oct 23 09:56:26 2012 +0200 @@ -261,10 +261,10 @@ - " - WARNING This test is known to fail, but have passed! + " - WARNING This test is known to fail, but have passed! - - This test is known to fail + - This test is known to fail @@ -276,7 +276,7 @@ FAILED (s) - - This test is known to fail + - This test is known to fail From jvanek at redhat.com Tue Oct 23 01:02:10 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 23 Oct 2012 10:02:10 +0200 Subject: [icedtea-web] Potential ClosingListener bug? In-Reply-To: <507C80F3.1080704@redhat.com> References: <507C80F3.1080704@redhat.com> Message-ID: <50864F02.9050305@redhat.com> On 10/15/2012 11:32 PM, Adam Domurad wrote: > (For Jiri primarily, but posted on list for potential discussion's sake.) > > Hi Jiri. I am running into strange troubles with the attached patch. > > The troubles is with the new patch I get: > > FAILED: launchInternalClassloaderWithDownloadedResourceAsHtmlAppletHack - firefox(InternalClassloaderWithDownloadedResourceTest) Stdout should contain `Good simple javaws exapmle` but didn't > > > The problem goes away when I remove the ClosingListener on launchInternalClassloaderWithDownloadedResourceAsHtmlAppletHack. > > With the closinglistener: Closing listener matches 'Good simple javaws exapmle' as it should, however the output log prints before this message. The output is cut off before this match. Increasing the 'assassin process' delay a lot didnt seem to help. > > Without: Acts as intended. > > I'm not sure why this could be happening, could you tell me if you have all tests pass with the applied patch ? (this was with Fedora16+java7+firefox). > > Thanks, > - Adam Hi. I have this tests passing in long-term. But still it sounds to me like one older issue, which looks like something is sometimes consuming part of stdout/err. However, listeners should not affect internal implementation of reading it. Thanx for keeping an eye on it :) J. From jvanek at redhat.com Tue Oct 23 02:08:11 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 23 Oct 2012 11:08:11 +0200 Subject: [rfc][icedtea-web] Extract JNLPClassLoader#CodeBaseClassLoader as non-inner class In-Reply-To: <506B4337.4080702@redhat.com> References: <506B42BB.3040704@redhat.com> <506B4337.4080702@redhat.com> Message-ID: <50865E7B.4010808@redhat.com> On 10/02/2012 09:40 PM, Adam Domurad wrote: > On 10/02/2012 03:38 PM, Adam Domurad wrote: >> JNLPClassLoader.java needs some components broken off, and this is an easy start. >> >> This changes no functionality, the class has simply been moved and references updated. >> Note that the class can not be made package-private as would be ideal, because of a reference in PluginAppletViewer.java. >> >> ChangeLog: >> 2012-10-02 Adam Domurad >> >> Extract out JNLPClassLoader#CodeBaseClassLoader as a non-inner class. >> * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Extracted CodeBaseClassLoader out. >> * netx/net/sourceforge/jnlp/runtime/CodeBaseClassLoader.java: New, put >> CodeBaseClassLoader here. >> * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java: Updated >> CodeBaseClassLoader reference to correct location. >> * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: Updated >> CodeBaseClassLoader reference to correct location. >> * tests/netx/unit/net/sourceforge/jnlp/runtime/CodeBaseClassLoaderTest.java: >> Updated CodeBaseClassLoader reference to correct location. >> > Apologies hit send prematurely, patch attached now. I agree with this refactoring. J. From jvanek at redhat.com Tue Oct 23 02:14:09 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 23 Oct 2012 11:14:09 +0200 Subject: [rfc][icedtea-web] JNLPClassLoader oldstyle forloops made to for-each loops, minor cleanup In-Reply-To: <506B3AF0.6060005@redhat.com> References: <1341602908.16030.31.camel@voip-10-15-18-79.yyz.redhat.com> <4FFAE052.1080408@redhat.com> <506B3AF0.6060005@redhat.com> Message-ID: <50865FE1.8080007@redhat.com> On 10/02/2012 09:05 PM, Adam Domurad wrote: > On 07/09/2012 09:44 AM, Jiri Vanek wrote: >> On 07/06/2012 09:28 PM, Adam Domurad wrote: >>> You may notice I don't like looking at old style for loops ... >>> >>> 2012-07-06 Adam Domurad >>> >>> * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: >>> Changed some old-style for-loops -> for-each loops. Small code cleanup >>> and generic type Class references changed to Class. >> >> Do you mind to add unittests to all methods you are touching? (any souch a touch is good reason to add some;) ) >> With unittests, I'm ok for head, 1.3, and 1.2. >> >> >> J. > Ping. Never did come up with any worthwhile unit tests, can you elaborate on what you had in mind? This change must be tested. You can do some extendings of tested classes you are touching, and at least execute the methods you have modified. When you will try it for several outputs and investigate outputs by anyway. Even some dummy counter of iterations or type checking... Most important will be that the code will be executed. I can see that evaluate correctness of such a method will be nearly impossible. J. > > Thanks, > - Adam From jvanek at redhat.com Tue Oct 23 02:17:27 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 23 Oct 2012 11:17:27 +0200 Subject: Fwd: Re: [RFC][icedtea-web]: Fix PR909 - The Java applet at http://de.gosupermodel.com/games/wardrobegame.jsp fails Message-ID: <508660A7.2020200@redhat.com> http://stackoverflow.com/questions/4858108/url-to-uri-encoding-problem i think this is expalining the issue. -------- Original Message -------- Subject: Re: [RFC][icedtea-web]: Fix PR909 - The Java applet at http://de.gosupermodel.com/games/wardrobegame.jsp fails Date: Tue, 23 Oct 2012 11:04:43 +0200 From: Jiri Vanek To: Saad Mohammad CC: distro-pkg-dev at openjdk.java.net On 09/27/2012 12:21 AM, Saad Mohammad wrote: > Hello, > > I have taken a look into URI.encode() and it seems to be doing the percent > encoding correctly. Please take a look at my patch and let me know if you have > any objections to this way of 'normalizing' an URL. Hi! Looks much better:) There is unit test for this behaviour in tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java a) ensure it is passing with your fix* b) add unit test with @bug which is testing your new behaviour (focused on 909 simulation) * I'm not sure how your patch is behaving when unexpected (encoded/decoded to expected decoded/encoded) (lines 52-64 of your patch) state of coding is delivered. If your fix pass above test, then it should be ok. As far as I tested it, you are failing for item 1 an 3 in unittest:( For 1 it is clear failure - try eg "http://localhost:44321/gg%2Ffgg%15fdgfd%45fdg" where it is better to see, for 2, you can remove this test. The failure (1) is hard to explain. Just from quick check - it looks like url and uri are making different encding/decoding. Please, investigate on it. Otherwise I have no objection against code and logic. Than you for fixing it. J. ps: ALWAYS run unit-test (and reproducers) BEFORE and AFTER fix and compare results. Every difference must make you more suspecting! > > Thanks! > > ChangeLog: > > 2012-09-26 Saad Mohammad > > Fix PR909 - URL is invalid after normalization. > * netx/net/sourceforge/jnlp/cache/ResourceTracker.java (normalizeUrl): > Converts the URL to an URI object which handles all percent encodings. > > > > -- Cheers, Saad Mohammad > > > patch0-7.patch > > > diff --git a/ChangeLog b/ChangeLog > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,9 @@ > +2012-09-26 Saad Mohammad > + > + Fix PR909 - URL is invalid after normalization. > + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java (normalizeUrl): > + Converts the URL to an URI object which handles all percent encodings. > + > 2012-09-25 Jiri Vanek > > Added rules listeners > diff --git a/NEWS b/NEWS > --- a/NEWS > +++ b/NEWS > @@ -18,6 +18,7 @@ > - PR1049: Extension jnlp's signed jar with the content of only META-INF/* is considered > - PR955: regression: SweetHome3D fails to run > - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 > + - PR909: The Java applet athttp://de.gosupermodel.com/games/wardrobegame.jsp fails > > New in release 1.3 (2012-XX-XX): > * NetX > diff --git a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java > --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java > +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java > @@ -27,10 +27,11 @@ > import java.io.UnsupportedEncodingException; > import java.net.HttpURLConnection; > import java.net.MalformedURLException; > +import java.net.URI; > +import java.net.URISyntaxException; > import java.net.URL; > import java.net.URLConnection; > import java.net.URLDecoder; > -import java.net.URLEncoder; > import java.security.AccessController; > import java.security.PrivilegedAction; > import java.util.ArrayList; > @@ -1143,115 +1144,29 @@ > } > }; > > - private static String normalizeChunk(String base, boolean debug) throws UnsupportedEncodingException { > - if (base == null) { > - return base; > - } > - if ("".equals(base)) { > - return base; > - } > - String result = base; > - String ssE = URLDecoder.decode(base, UTF8); > - // System.out.println("*" + base + "*"); > - // System.out.println("-" + ssE + "-"); > - if (base.equals(ssE)) { > - result = URLEncoder.encode(base, UTF8); > - if (debug) { > - System.out.println(base + " chunk needs to be encoded => " + result); > - } > - } else { > - if (debug) { > - System.out.println(base + " chunk already encoded"); > - } > - } > - return result; > - } > - > - public static URL normalizeUrl(URL u, boolean debug) throws MalformedURLException, UnsupportedEncodingException { > + public static URL normalizeUrl(URL u, boolean debug) throws MalformedURLException, UnsupportedEncodingException, URISyntaxException { > if (u == null) { > return null; > } > String protocol = u.getProtocol(); > + > if (protocol == null || "file".equals(protocol)) { > return u; > } > - String file = u.getPath(); > - if (file == null) { > + > + if (u.getPath() == null) { > return u; > } > - String host = u.getHost(); > - String ref = u.getRef(); > - int port = u.getPort(); > - String query = u.getQuery(); > - String[] qq = {}; > - if (query != null) { > - qq = query.split(QUERY_DELIMITER); > - } > - String[] ss = file.split(PATH_DELIMITER); > - int normalized = 0; > - if (debug) { > - System.out.println("normalizing path " + file + " in " + u.toString()); > - } > - for (int i = 0; i< ss.length; i++) { > - String base = ss[i]; > - String r = normalizeChunk(base, debug); > - if (!r.equals(ss[i])) { > - normalized++; > - } > - ss[i] = r; > - } > - if (debug) { > - System.out.println("normalizing query " + query + " in " + u.toString()); > - } > - for (int i = 0; i< qq.length; i++) { > - String base = qq[i]; > - String r = normalizeChunk(base, debug); > - if (!r.equals(qq[i])) { > - normalized++; > - } > - qq[i] = r; > - } > - if (normalized == 0) { > - if (debug) { > - System.out.println("Nothing was normalized in this url"); > - } > - return u; > - } else { > - if (debug) { > - System.out.println(normalized + " chunks normalized, rejoining url"); > - } > - } > - StringBuilder composed = new StringBuilder(""); > - for (int i = 0; i< ss.length; i++) { > - String string = ss[i]; > - if (ss.length<= 1 || (string != null&& !"".equals(string))) { > - composed.append(PATH_DELIMITER_MARK).append(string); > - } > - } > - String composed1 = composed.toString(); > - if (query != null&& !query.trim().equals("")) { > - composed.append(QUERY_MARK); > - for (int i = 0; i< qq.length; i++) { > - String string = qq[i]; > - if ((string != null&& !"".equals(string))) { > - composed.append(string); > - if (i != qq.length - 1) { > - composed.append(QUERY_DELIMITER_MARK); > - } > - } > - } > - } > - String composed2 = composed.substring(composed1.length() - 1); > - if (ref != null&& !ref.trim().equals("")) { > - composed.append(HREF_MARK).append(ref); > - } > > - URL result = new URL(protocol, host, port, composed.toString()); > + //Decode the URL before encoding > + URL decodedURL = new URL(URLDecoder.decode(u.toString(), UTF8)); > > - if (debug) { > - System.out.println("normalized `" + composed1 + "` and `" + composed2 + "` in " + result.toString()); > - } > - return result; > + //Create URI with the decoded URL > + URI uri = new URI(decodedURL.getProtocol(), null, decodedURL.getHost(), decodedURL.getPort(), decodedURL.getPath(), decodedURL.getQuery(), null); > > + //Returns the encoded URL > + URL encodedURL = new URL(uri.toASCIIString()); > + > + return encodedURL; > } > } From ahughes at redhat.com Tue Oct 23 02:15:39 2012 From: ahughes at redhat.com (Andrew Hughes) Date: Tue, 23 Oct 2012 05:15:39 -0400 (EDT) Subject: Moving applet from Oracle jre: first tries In-Reply-To: Message-ID: <1448013674.4638900.1350983739794.JavaMail.root@redhat.com> ----- Original Message ----- > Another buggy behaviour. Can you please confirm it before filling any > bug? > I think this one is not icedtea-web, but openjdk/core. > > string file="path-to-pkcs11-module-library"; > PKCS11 pkcs11=PKCS11.getInstance(file, "C_GetFunctionList", null, > false); > long []slots=pkcs11.C_GetSlotList(true); > pkcs11.C_Finalize(null); > pkcs11=PKCS11.getInstance(file, "C_GetFunctionList", null, false); > slots=pkcs11.C_GetSlotList(true); //returns a > CKR_CRIPTOKI_NOT_INITIALIZED, altought it should return a valid slot > list. > > Thanks a lot > Can I ask why you're calling the provider directly? What am I missing here? -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From jvanek at redhat.com Tue Oct 23 02:04:43 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 23 Oct 2012 11:04:43 +0200 Subject: [RFC][icedtea-web]: Fix PR909 - The Java applet at http://de.gosupermodel.com/games/wardrobegame.jsp fails In-Reply-To: <50637FEB.6090709@redhat.com> References: <85828911.69079417.1347544752233.JavaMail.root@redhat.com> <50570F99.1060506@redhat.com> <50637FEB.6090709@redhat.com> Message-ID: <50865DAB.5010904@redhat.com> On 09/27/2012 12:21 AM, Saad Mohammad wrote: > Hello, > > I have taken a look into URI.encode() and it seems to be doing the percent > encoding correctly. Please take a look at my patch and let me know if you have > any objections to this way of 'normalizing' an URL. Hi! Looks much better:) There is unit test for this behaviour in tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java a) ensure it is passing with your fix* b) add unit test with @bug which is testing your new behaviour (focused on 909 simulation) * I'm not sure how your patch is behaving when unexpected (encoded/decoded to expected decoded/encoded) (lines 52-64 of your patch) state of coding is delivered. If your fix pass above test, then it should be ok. As far as I tested it, you are failing for item 1 an 3 in unittest:( For 1 it is clear failure - try eg "http://localhost:44321/gg%2Ffgg%15fdgfd%45fdg" where it is better to see, for 2, you can remove this test. The failure (1) is hard to explain. Just from quick check - it looks like url and uri are making different encding/decoding. Please, investigate on it. Otherwise I have no objection against code and logic. Than you for fixing it. J. ps: ALWAYS run unit-test (and reproducers) BEFORE and AFTER fix and compare results. Every difference must make you more suspecting! > > Thanks! > > ChangeLog: > > 2012-09-26 Saad Mohammad > > Fix PR909 - URL is invalid after normalization. > * netx/net/sourceforge/jnlp/cache/ResourceTracker.java (normalizeUrl): > Converts the URL to an URI object which handles all percent encodings. > > > > -- Cheers, Saad Mohammad > > > patch0-7.patch > > > diff --git a/ChangeLog b/ChangeLog > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,9 @@ > +2012-09-26 Saad Mohammad > + > + Fix PR909 - URL is invalid after normalization. > + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java (normalizeUrl): > + Converts the URL to an URI object which handles all percent encodings. > + > 2012-09-25 Jiri Vanek > > Added rules listeners > diff --git a/NEWS b/NEWS > --- a/NEWS > +++ b/NEWS > @@ -18,6 +18,7 @@ > - PR1049: Extension jnlp's signed jar with the content of only META-INF/* is considered > - PR955: regression: SweetHome3D fails to run > - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 > + - PR909: The Java applet athttp://de.gosupermodel.com/games/wardrobegame.jsp fails > > New in release 1.3 (2012-XX-XX): > * NetX > diff --git a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java > --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java > +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java > @@ -27,10 +27,11 @@ > import java.io.UnsupportedEncodingException; > import java.net.HttpURLConnection; > import java.net.MalformedURLException; > +import java.net.URI; > +import java.net.URISyntaxException; > import java.net.URL; > import java.net.URLConnection; > import java.net.URLDecoder; > -import java.net.URLEncoder; > import java.security.AccessController; > import java.security.PrivilegedAction; > import java.util.ArrayList; > @@ -1143,115 +1144,29 @@ > } > }; > > - private static String normalizeChunk(String base, boolean debug) throws UnsupportedEncodingException { > - if (base == null) { > - return base; > - } > - if ("".equals(base)) { > - return base; > - } > - String result = base; > - String ssE = URLDecoder.decode(base, UTF8); > - // System.out.println("*" + base + "*"); > - // System.out.println("-" + ssE + "-"); > - if (base.equals(ssE)) { > - result = URLEncoder.encode(base, UTF8); > - if (debug) { > - System.out.println(base + " chunk needs to be encoded => " + result); > - } > - } else { > - if (debug) { > - System.out.println(base + " chunk already encoded"); > - } > - } > - return result; > - } > - > - public static URL normalizeUrl(URL u, boolean debug) throws MalformedURLException, UnsupportedEncodingException { > + public static URL normalizeUrl(URL u, boolean debug) throws MalformedURLException, UnsupportedEncodingException, URISyntaxException { > if (u == null) { > return null; > } > String protocol = u.getProtocol(); > + > if (protocol == null || "file".equals(protocol)) { > return u; > } > - String file = u.getPath(); > - if (file == null) { > + > + if (u.getPath() == null) { > return u; > } > - String host = u.getHost(); > - String ref = u.getRef(); > - int port = u.getPort(); > - String query = u.getQuery(); > - String[] qq = {}; > - if (query != null) { > - qq = query.split(QUERY_DELIMITER); > - } > - String[] ss = file.split(PATH_DELIMITER); > - int normalized = 0; > - if (debug) { > - System.out.println("normalizing path " + file + " in " + u.toString()); > - } > - for (int i = 0; i< ss.length; i++) { > - String base = ss[i]; > - String r = normalizeChunk(base, debug); > - if (!r.equals(ss[i])) { > - normalized++; > - } > - ss[i] = r; > - } > - if (debug) { > - System.out.println("normalizing query " + query + " in " + u.toString()); > - } > - for (int i = 0; i< qq.length; i++) { > - String base = qq[i]; > - String r = normalizeChunk(base, debug); > - if (!r.equals(qq[i])) { > - normalized++; > - } > - qq[i] = r; > - } > - if (normalized == 0) { > - if (debug) { > - System.out.println("Nothing was normalized in this url"); > - } > - return u; > - } else { > - if (debug) { > - System.out.println(normalized + " chunks normalized, rejoining url"); > - } > - } > - StringBuilder composed = new StringBuilder(""); > - for (int i = 0; i< ss.length; i++) { > - String string = ss[i]; > - if (ss.length<= 1 || (string != null&& !"".equals(string))) { > - composed.append(PATH_DELIMITER_MARK).append(string); > - } > - } > - String composed1 = composed.toString(); > - if (query != null&& !query.trim().equals("")) { > - composed.append(QUERY_MARK); > - for (int i = 0; i< qq.length; i++) { > - String string = qq[i]; > - if ((string != null&& !"".equals(string))) { > - composed.append(string); > - if (i != qq.length - 1) { > - composed.append(QUERY_DELIMITER_MARK); > - } > - } > - } > - } > - String composed2 = composed.substring(composed1.length() - 1); > - if (ref != null&& !ref.trim().equals("")) { > - composed.append(HREF_MARK).append(ref); > - } > > - URL result = new URL(protocol, host, port, composed.toString()); > + //Decode the URL before encoding > + URL decodedURL = new URL(URLDecoder.decode(u.toString(), UTF8)); > > - if (debug) { > - System.out.println("normalized `" + composed1 + "` and `" + composed2 + "` in " + result.toString()); > - } > - return result; > + //Create URI with the decoded URL > + URI uri = new URI(decodedURL.getProtocol(), null, decodedURL.getHost(), decodedURL.getPort(), decodedURL.getPath(), decodedURL.getQuery(), null); > > + //Returns the encoded URL > + URL encodedURL = new URL(uri.toASCIIString()); > + > + return encodedURL; > } > } From bugzilla-daemon at icedtea.classpath.org Tue Oct 23 03:07:44 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 23 Oct 2012 10:07:44 +0000 Subject: [Bug 1201] New: lazy loading of multiple JARs leads to crashes and general mayhem Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1201 Priority: P3 Bug ID: 1201 CC: unassigned at icedtea.classpath.org Assignee: dbhole at redhat.com Summary: lazy loading of multiple JARs leads to crashes and general mayhem Severity: normal Classification: Unclassified OS: Linux Reporter: ralf at ark.in-berlin.de URL: http://jchempaint.github.com/EditorApplet.html Hardware: x86_64 Status: NEW Version: 1.2 Component: Plugin Product: IcedTea-Web The JChemPaint applet has three bugs filed that show only with icedtea-web and can be worked around by doing a seemingly unrelated action before triggering the problematic action, suggesting that some jar couldn't be loaded in time. https://github.com/JChemPaint/jchempaint/issues/140 https://github.com/JChemPaint/jchempaint/issues/149 https://github.com/JChemPaint/jchempaint/issues/150 140: the JS button (see applet URL, below applet) "set CCCC SMILES" crashes unless user clicks on canvas (creating a one-bond molecule) before 149: the JS buttons "get ...SMILES" don't react unless user choses Create SMILES from Tools menu before. 150: the toolbar tooltips don't show unless user choses Create SMILES from Tools menu before. There are no such problems with Sun JDK. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121023/177889d1/attachment.html From ptisnovs at icedtea.classpath.org Tue Oct 23 03:08:28 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 23 Oct 2012 10:08:28 +0000 Subject: /hg/gfx-test: Added eight new tests to the test suite Message-ID: changeset f649871e5624 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=f649871e5624 author: Pavel Tisnovsky date: Tue Oct 23 12:11:13 2012 +0200 Added eight new tests to the test suite src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java | 120 +++++++++++++ 2 files changed, 125 insertions(+), 0 deletions(-) diffs (142 lines): diff -r d1e778d4c093 -r f649871e5624 ChangeLog --- a/ChangeLog Fri Oct 19 12:00:31 2012 +0200 +++ b/ChangeLog Tue Oct 23 12:11:13 2012 +0200 @@ -1,3 +1,8 @@ +2012-10-23 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java: + Added eight new tests to this test suite. + 2012-10-19 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltCropImage.java: diff -r d1e778d4c093 -r f649871e5624 src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java --- a/src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java Fri Oct 19 12:00:31 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java Tue Oct 23 12:11:13 2012 +0200 @@ -258,6 +258,126 @@ } /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB. + * No flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntARGBNoFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB, false, false); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB. + * Horizontal flip is performed on that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntARGBHorizontalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB, true, false); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB. + * Vertical flip is performed on that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntARGBVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB, false, true); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB. + * Horizontal and vertical flips are performed on that image.. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntARGBHorizontalAndVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB, true, true); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB_PRE. + * No flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntARGB_PreNoFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, false, false); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB_PRE. + * Horizontal flip is performed on that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntARGB_PreHorizontalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, true, false); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB_PRE. + * Vertical flip is performed on that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntARGB_PreVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, false, true); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB_PRE. + * Horizontal and vertical flips are performed on that image.. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntARGB_PreHorizontalAndVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, true, true); + } + + /** * Entry point to the test suite. * * @param args From ptisnovs at icedtea.classpath.org Tue Oct 23 04:32:44 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 23 Oct 2012 11:32:44 +0000 Subject: /hg/rhino-tests: Added two classes used by ReportGenerator, othe... Message-ID: changeset c9ebb01301a7 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=c9ebb01301a7 author: Pavel Tisnovsky date: Tue Oct 23 13:35:27 2012 +0200 Added two classes used by ReportGenerator, other minor enhancements (JavaDoc, Locale, StringBuffer for text concatenations etc.) diffstat: ChangeLog | 16 +++++ src/org/RhinoTests/Reporter/CommandLineParameters.java | 18 +++++- src/org/RhinoTests/Reporter/GraphPagesGenerator.java | 3 +- src/org/RhinoTests/Reporter/LogPagesGenerator.java | 3 +- src/org/RhinoTests/Reporter/Reporter.java | 3 +- src/org/RhinoTests/Reporter/StringUtils.java | 15 +++- src/org/RhinoTests/Reporter/TestResult.java | 44 +++++++------- src/org/RhinoTests/Reporter/TestStatus.java | 55 ++++++++++++++++++ src/org/RhinoTests/Reporter/TestType.java | 54 +++++++++++++++++ 9 files changed, 179 insertions(+), 32 deletions(-) diffs (346 lines): diff -r bff3d4a426f4 -r c9ebb01301a7 ChangeLog --- a/ChangeLog Thu Oct 18 10:55:40 2012 +0200 +++ b/ChangeLog Tue Oct 23 13:35:27 2012 +0200 @@ -1,3 +1,19 @@ +2012-10-23 Pavel Tisnovsky + + * src/org/RhinoTests/Reporter/StringUtils.java: + Added usage of Locale for string operations, other minor enhancements + StringBuffer is used for text concatenations etc. + * src/org/RhinoTests/Reporter/TestStatus.java: + Added, this class will be used by ReportGenerator. + * src/org/RhinoTests/Reporter/TestType.java: + Added, this class will be used by ReportGenerator. + * src/org/RhinoTests/Reporter/CommandLineParameters.java: + * src/org/RhinoTests/Reporter/GraphPagesGenerator.java: + * src/org/RhinoTests/Reporter/LogPagesGenerator.java: + * src/org/RhinoTests/Reporter/Reporter.java: + * src/org/RhinoTests/Reporter/TestResult.java: + Javadoc. + 2012-10-18 Pavel Tisnovsky * src/org/RhinoTests/ScriptEngineClassTest.java: diff -r bff3d4a426f4 -r c9ebb01301a7 src/org/RhinoTests/Reporter/CommandLineParameters.java --- a/src/org/RhinoTests/Reporter/CommandLineParameters.java Thu Oct 18 10:55:40 2012 +0200 +++ b/src/org/RhinoTests/Reporter/CommandLineParameters.java Tue Oct 23 13:35:27 2012 +0200 @@ -46,9 +46,8 @@ import java.util.Set; import java.util.TreeSet; - - /** + * Instances of this class are used to store all command line parameters. * * @author Pavel Tisnovsky */ @@ -69,12 +68,24 @@ private String date = null; private Set tests = new TreeSet(); + /** + * Constructor which starts processing all command line parameters. + * + * @param args + * command line parameters stored as a array of Strings + */ public CommandLineParameters(String[] args) { processAllArgs(args); checkAllArgs(); } + /** + * Process all command line parameters. + * + * @param args + * command line parameters stored as a array of Strings + */ private void processAllArgs(String[] args) { for (String arg : args) { @@ -98,6 +109,9 @@ } } + /** + * Basic check if all arguments are correct. + */ private void checkAllArgs() { checkTemplateDir(); checkLogDir(); diff -r bff3d4a426f4 -r c9ebb01301a7 src/org/RhinoTests/Reporter/GraphPagesGenerator.java --- a/src/org/RhinoTests/Reporter/GraphPagesGenerator.java Thu Oct 18 10:55:40 2012 +0200 +++ b/src/org/RhinoTests/Reporter/GraphPagesGenerator.java Tue Oct 23 13:35:27 2012 +0200 @@ -47,7 +47,8 @@ /** - * + * Generator for HTML pages which contains graphs with test results. + * * @author Pavel Tisnovsky */ public class GraphPagesGenerator { diff -r bff3d4a426f4 -r c9ebb01301a7 src/org/RhinoTests/Reporter/LogPagesGenerator.java --- a/src/org/RhinoTests/Reporter/LogPagesGenerator.java Thu Oct 18 10:55:40 2012 +0200 +++ b/src/org/RhinoTests/Reporter/LogPagesGenerator.java Tue Oct 23 13:35:27 2012 +0200 @@ -47,7 +47,8 @@ import java.util.Map.Entry; /** - * + * Log pages generator. + * * @author Pavel Tisnovsky */ public class LogPagesGenerator diff -r bff3d4a426f4 -r c9ebb01301a7 src/org/RhinoTests/Reporter/Reporter.java --- a/src/org/RhinoTests/Reporter/Reporter.java Thu Oct 18 10:55:40 2012 +0200 +++ b/src/org/RhinoTests/Reporter/Reporter.java Tue Oct 23 13:35:27 2012 +0200 @@ -48,7 +48,8 @@ import java.util.TreeSet; /** - * + * Main reporter class. + * * @author Pavel Tisnovsky */ public class Reporter { diff -r bff3d4a426f4 -r c9ebb01301a7 src/org/RhinoTests/Reporter/StringUtils.java --- a/src/org/RhinoTests/Reporter/StringUtils.java Thu Oct 18 10:55:40 2012 +0200 +++ b/src/org/RhinoTests/Reporter/StringUtils.java Tue Oct 23 13:35:27 2012 +0200 @@ -40,6 +40,8 @@ package org.RhinoTests.Reporter; +import java.util.Locale; + /** @@ -90,12 +92,15 @@ * @return camel case variant of the input string */ public static String toCamelCase(String string) { + // all underscores (+character after it) should be replaced by the + // uppercased variant of this character String[] parts = string.split("_"); - String camelCaseString = ""; + StringBuffer camelCaseString = new StringBuffer(); + // properly convert all words (which were separated by underscore) for (String part : parts) { - camelCaseString = camelCaseString + convertToProperCase(part); + camelCaseString.append(convertToProperCase(part)); } - return camelCaseString; + return camelCaseString.toString(); } /** @@ -107,7 +112,7 @@ * @return input string with capitalized first letter */ public static String convertToProperCase(String string) { - return string.substring(0, 1).toUpperCase() + string.substring(1).toLowerCase(); + return string.substring(0, 1).toUpperCase(Locale.ENGLISH) + string.substring(1).toLowerCase(Locale.ENGLISH); } /** @@ -120,7 +125,7 @@ public static String getPlaceholderMethodName(String placeholderName) { String temporaryName = placeholderName.substring(1); temporaryName = temporaryName.substring(1, temporaryName.length() - 1); - temporaryName = "get" + StringUtils.toCamelCase(temporaryName.toLowerCase()); + temporaryName = "get" + StringUtils.toCamelCase(temporaryName.toLowerCase(Locale.ENGLISH)); return temporaryName; } diff -r bff3d4a426f4 -r c9ebb01301a7 src/org/RhinoTests/Reporter/TestResult.java --- a/src/org/RhinoTests/Reporter/TestResult.java Thu Oct 18 10:55:40 2012 +0200 +++ b/src/org/RhinoTests/Reporter/TestResult.java Tue Oct 23 13:35:27 2012 +0200 @@ -53,7 +53,7 @@ private int passed; private int failed; private int error; - private String date; + private String date; public TestResult() { this.setPassed(0); @@ -126,35 +126,35 @@ } public String getDate() { - return this.date; + return this.date; } public String getOsName() { - return System.getProperty("os.name"); - } + return System.getProperty("os.name"); + } - public String getOsVer() { - return System.getProperty("os.version"); - } + public String getOsVer() { + return System.getProperty("os.version"); + } - public String getOsArch() { - return System.getProperty("os.arch"); - } + public String getOsArch() { + return System.getProperty("os.arch"); + } - public String getJavaVersion() { - return System.getProperty("java.version"); - } + public String getJavaVersion() { + return System.getProperty("java.version"); + } - public String getVmName() { - return System.getProperty("java.vm.version"); - } + public String getVmName() { + return System.getProperty("java.vm.name"); + } - public String getVmVersion() { - return System.getProperty("java.vm.name"); - } + public String getVmVersion() { + return System.getProperty("java.vm.version"); + } - public void setDate(String date) { - this.date = date; - } + public void setDate(String date) { + this.date = date; + } } diff -r bff3d4a426f4 -r c9ebb01301a7 src/org/RhinoTests/Reporter/TestStatus.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/RhinoTests/Reporter/TestStatus.java Tue Oct 23 13:35:27 2012 +0200 @@ -0,0 +1,55 @@ +/* + Rhino test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + + + +package org.RhinoTests.Reporter; + +/** + * Test status. + * + * @author Pavel Tisnovsky + */ +public enum TestStatus +{ + PASSED, + FAILED, + NOT_FOUND +} diff -r bff3d4a426f4 -r c9ebb01301a7 src/org/RhinoTests/Reporter/TestType.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/RhinoTests/Reporter/TestType.java Tue Oct 23 13:35:27 2012 +0200 @@ -0,0 +1,54 @@ +/* + Rhino test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + + + +package org.RhinoTests.Reporter; + +/** + * Type of tests to use for a graph or a table. + * + * @author Pavel Tisnovsky + */ +public enum TestType +{ + ALL, + FAILED +} From helpcrypto at gmail.com Tue Oct 23 07:30:43 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Tue, 23 Oct 2012 16:30:43 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: <1448013674.4638900.1350983739794.JavaMail.root@redhat.com> References: <1448013674.4638900.1350983739794.JavaMail.root@redhat.com> Message-ID: Hi Andrew, Using SunPkcs11 provider we detected the template its not properly filled when creating an object using setCertificateEntry+store (ie: import cert on a card). So, for example, a 1024RSA cert with digitalSignature ONLY, was converted somewhere between the call and the card in a signature+keyEncipherment. This is why we use PKCS11 object instead. Should I fill another bug with a test case? Anyway, this should work, isnt it? On Tue, Oct 23, 2012 at 11:15 AM, Andrew Hughes wrote: > Can I ask why you're calling the provider directly? What am I missing here? From gnu.andrew at redhat.com Tue Oct 23 09:01:46 2012 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Tue, 23 Oct 2012 12:01:46 -0400 (EDT) Subject: Moving applet from Oracle jre: first tries In-Reply-To: Message-ID: <806875178.5138081.1351008106554.JavaMail.root@redhat.com> ----- Original Message ----- > Hi Andrew, > > Using SunPkcs11 provider we detected the template its not properly > filled when creating an object using setCertificateEntry+store (ie: > import cert on a card). > So, for example, a 1024RSA cert with digitalSignature ONLY, was > converted somewhere between the call and the card in a > signature+keyEncipherment. > This is why we use PKCS11 object instead. > > Should I fill another bug with a test case? > Yes, that would be helpful. > Anyway, this should work, isnt it? I'm not sure without looking into it in depth. It could be the original problems are due to something you're not doing manually which is done by the provider. > > > On Tue, Oct 23, 2012 at 11:15 AM, Andrew Hughes > wrote: > > Can I ask why you're calling the provider directly? What am I > > missing here? > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From lberk at redhat.com Tue Oct 23 09:53:30 2012 From: lberk at redhat.com (Lukas Berk) Date: Tue, 23 Oct 2012 12:53:30 -0400 Subject: [RFC] Enhanced Garbage Collection Probe Points In-Reply-To: <2117489537.1010362.1348510598749.JavaMail.root@redhat.com> References: <20120831200639.GA3000@redhat.com> <2117489537.1010362.1348510598749.JavaMail.root@redhat.com> Message-ID: <20121023165330.GA3498@redhat.com> Hey, * Jon VanAlten [2012-09-24 14:16]: > > > > > > > Is this ok to commit? > > > > > > > > > > With caveats noted above, I say yes :) > > > > > > > Thanks! Please let me know if there is anything else you'd like to > > know, > > updated patch is attached. > > > > Hi, > > This has been in my TODO for some time, so I am very sorry not to > have responded earlier. From looking at the patch, it seems okay > now. I intend to push this to HEAD on your behalf, unless someone > else has some reason why not. (Now is your chance to speak up > about that, if you have such a reason!). But, I do feel responsible > to build with it myself and verify that things seem to be working as > intended. Various other things have been jumping my work queue, but > I may have time this week to give this a sanity check and finally > get it into hg. Thanks for persisting! > > cheers, > Jon I've updated the patch slightly to reflect a correction in psScavenge.cpp that was causing a build error when icedtea-debug wasn't specified. The rest of the patch is unchanged from before. Cheers, Lukas -------------- next part -------------- diff -r 727519ab8096 Makefile.am --- a/Makefile.am Fri Aug 24 01:53:20 2012 +0100 +++ b/Makefile.am Fri Aug 31 15:47:32 2012 -0400 @@ -291,7 +291,9 @@ endif if ENABLE_SYSTEMTAP -ICEDTEA_PATCHES += patches/systemtap.patch +ICEDTEA_PATCHES += \ + patches/systemtap.patch \ + patches/systemtap_gc.patch endif if ENABLE_NSS @@ -764,6 +766,7 @@ tapset/hotspot.stp.in \ tapset/hotspot_jni.stp.in \ tapset/jstack.stp.in \ + tapset/hotspot_gc.stp.in \ scripts/jni_create_stap.c \ scripts/jni_desc \ rewriter/agpl-3.0.txt \ @@ -1730,11 +1733,16 @@ sed -e '/\/client\/libjvm.so/d' \ < $(abs_top_builddir)/tapset/hotspot_jni.stp \ > $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_jni.stp; \ + sed -e '/\/client\/libjvm.so/d' \ + < $(abs_top_builddir)/tapset/hotspot_gc.stp \ + > $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_gc.stp; \ else \ cp $(abs_top_builddir)/tapset/hotspot.stp \ $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot.stp; \ cp $(abs_top_builddir)/tapset/hotspot_jni.stp \ $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_jni.stp; \ + cp $(abs_top_builddir)/tapset/hotspot_gc.stp \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_gc.stp; \ fi; \ cp $(abs_top_builddir)/tapset/jstack.stp \ $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/jstack.stp @@ -1796,11 +1804,16 @@ sed -e '/\/client\/libjvm.so/d' \ < $(abs_top_builddir)/tapset/hotspot_jni.stp \ > $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_jni.stp; \ + sed -e '/\/client\/libjvm.so/d' \ + < $(abs_top_builddir)/tapset/hotspot_gc.stp \ + > $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_gc.stp; \ else \ cp $(abs_top_builddir)/tapset/hotspot.stp \ $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot.stp; \ cp $(abs_top_builddir)/tapset/hotspot_jni.stp \ $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_jni.stp; \ + cp $(abs_top_builddir)/tapset/hotspot_gc.stp \ + $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_gc.stp; \ fi; \ cp $(abs_top_builddir)/tapset/jstack.stp \ $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/jstack.stp diff -r 727519ab8096 configure.ac --- a/configure.ac Fri Aug 24 01:53:20 2012 +0100 +++ b/configure.ac Fri Aug 31 15:47:32 2012 -0400 @@ -315,6 +315,7 @@ AC_CONFIG_FILES([tapset/hotspot.stp]) AC_CONFIG_FILES([tapset/hotspot_jni.stp]) AC_CONFIG_FILES([tapset/jstack.stp]) + AC_CONFIG_FILES([tapset/hotspot_gc.stp]) fi dnl Check for libXtst headers and libraries. diff -r 727519ab8096 patches/systemtap_gc.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/systemtap_gc.patch Fri Aug 31 15:47:32 2012 -0400 @@ -0,0 +1,369 @@ +--- openjdk.orig/hotspot/src/share/vm/compiler/oopMap.cpp 2012-06-26 09:24:22.390325184 -0400 ++++ openjdk/hotspot/src/share/vm/compiler/oopMap.cpp 2012-07-06 10:12:44.981413003 -0400 +@@ -33,9 +33,13 @@ + #include "memory/resourceArea.hpp" + #include "runtime/frame.inline.hpp" + #include "runtime/signature.hpp" ++#include "utilities/dtrace.hpp" + #ifdef COMPILER1 + #include "c1/c1_Defs.hpp" + #endif ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL1(provider, gc__collection__delete, *uintptr_t); ++#endif /* !USDT2 */ + + // OopMapStream + +@@ -677,6 +681,9 @@ + " - Derived: " INTPTR_FORMAT " Base: " INTPTR_FORMAT " (Offset: %d)", + derived_loc, (address)*derived_loc, (address)base, offset); + } ++#ifndef USDT2 ++ HS_DTRACE_PROBE1(hotspot, gc__collection__delete, entry); ++#endif /* !USDT2 */ + + // Delete entry + delete entry; +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2012-07-12 09:48:40.349999515 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2012-07-19 18:38:07.560757426 -0400 +@@ -53,11 +53,18 @@ + #include "runtime/vmThread.hpp" + #include "services/management.hpp" + #include "services/memoryService.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/events.hpp" + #include "utilities/stack.inline.hpp" + + #include + ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__ParallelCompact__clear, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__parallel__collect, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__move, *uintptr_t, *uintptr_t, *uintptr_t, *uintptr_t); ++#endif /* !USDT2 */ ++ + // All sizes are in HeapWords. + const size_t ParallelCompactData::Log2RegionSize = 9; // 512 words + const size_t ParallelCompactData::RegionSize = (size_t)1 << Log2RegionSize; +@@ -433,6 +439,9 @@ + + void ParallelCompactData::clear() + { ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__ParallelCompact__clear, &_region_data, _region_data->data_location()); ++#endif /* !USDT2 */ + memset(_region_data, 0, _region_vspace->committed_size()); + } + +@@ -1970,6 +1979,9 @@ + "should be in vm thread"); + + ParallelScavengeHeap* heap = gc_heap(); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__parallel__collect, heap, heap->gc_cause()); ++#endif /* !USDT2 */ + GCCause::Cause gc_cause = heap->gc_cause(); + assert(!heap->is_gc_active(), "not reentrant"); + +@@ -3376,6 +3388,9 @@ + // past the end of the partial object entering the region (if any). + HeapWord* const dest_addr = sd.partial_obj_end(dp_region); + HeapWord* const new_top = _space_info[space_id].new_top(); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__move, &beg_addr, &end_addr, &dest_addr, &new_top); ++#endif /* !USDT2 */ + assert(new_top >= dest_addr, "bad new_top value"); + const size_t words = pointer_delta(new_top, dest_addr); + +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp 2012-08-15 12:04:43.837439833 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp 2012-08-15 12:01:47.897745719 -0400 +@@ -45,8 +45,13 @@ + #include "runtime/thread.hpp" + #include "runtime/vmThread.hpp" + #include "utilities/copy.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/events.hpp" + ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__G1__begin, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__G1__end, *uintptr_t, *uintptr_t); ++ #endif /* !USDT2 */ + class HeapRegion; + + void G1MarkSweep::invoke_at_safepoint(ReferenceProcessor* rp, +@@ -84,6 +89,9 @@ + // The marking doesn't preserve the marks of biased objects. + BiasedLocking::preserve_marks(); + ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__G1__begin, &sh, sh->gc_cause()); ++#endif /* !USDT2 */ + mark_sweep_phase1(marked_for_unloading, clear_all_softrefs); + + mark_sweep_phase2(); +@@ -103,6 +111,9 @@ + GenRemSet* rs = sh->rem_set(); + rs->invalidate(sh->perm_gen()->used_region(), true /*whole_heap*/); + ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__G1__end, &sh, sh->gc_cause()); ++#endif /* !USDT2 */ + // "free at last gc" is calculated from these. + // CHF: cheating for now!!! + // Universe::set_heap_capacity_at_last_gc(Universe::heap()->capacity()); +--- openjdk.orig/hotspot/src/share/vm/memory/tenuredGeneration.cpp 2012-08-15 12:03:43.009543167 -0400 ++++ openjdk/hotspot/src/share/vm/memory/tenuredGeneration.cpp 2012-08-15 12:14:25.414381449 -0400 +@@ -33,6 +33,12 @@ + #include "memory/tenuredGeneration.hpp" + #include "oops/oop.inline.hpp" + #include "runtime/java.hpp" ++#include "utilities/dtrace.hpp" ++ ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__tenured__begin, bool, bool, size_t, bool); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__tenured__end, bool, bool, size_t, bool); ++#endif /* !USDT2 */ + + TenuredGeneration::TenuredGeneration(ReservedSpace rs, + size_t initial_byte_size, int level, +@@ -307,8 +313,14 @@ + size_t size, + bool is_tlab) { + retire_alloc_buffers_before_full_gc(); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__tenured__begin, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + OneContigSpaceCardGeneration::collect(full, clear_all_soft_refs, + size, is_tlab); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__tenured__end, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + } + + void TenuredGeneration::update_gc_stats(int current_level, +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2012-08-15 12:03:43.039543116 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2012-08-15 12:18:57.181932342 -0400 +@@ -49,6 +49,12 @@ + #include "utilities/copy.hpp" + #include "utilities/globalDefinitions.hpp" + #include "utilities/workgroup.hpp" ++#include "utilities/dtrace.hpp" ++ ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__parnew__begin, bool, bool, size_t, bool); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__parnew__end, bool, bool, size_t, bool); ++#endif /* !USDT2 */ + + #ifdef _MSC_VER + #pragma warning( push ) +@@ -878,6 +884,9 @@ + bool clear_all_soft_refs, + size_t size, + bool is_tlab) { ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__parnew__begin, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + assert(full || size > 0, "otherwise we don't want to collect"); + GenCollectedHeap* gch = GenCollectedHeap::heap(); + assert(gch->kind() == CollectedHeap::GenCollectedHeap, +@@ -1032,6 +1041,10 @@ + gch->print_heap_change(gch_prev_used); + } + ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__parnew__end, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ ++ + if (PrintGCDetails && ParallelGCVerbose) { + TASKQUEUE_STATS_ONLY(thread_state_set.print_termination_stats()); + TASKQUEUE_STATS_ONLY(thread_state_set.print_taskqueue_stats()); +--- openjdk.orig/hotspot/src/share/vm/memory/defNewGeneration.cpp 2012-08-15 12:03:43.010543164 -0400 ++++ openjdk/hotspot/src/share/vm/memory/defNewGeneration.cpp 2012-08-15 12:21:41.076673646 -0400 +@@ -38,6 +38,7 @@ + #include "oops/oop.inline.hpp" + #include "runtime/java.hpp" + #include "utilities/copy.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/stack.inline.hpp" + #ifdef TARGET_OS_FAMILY_linux + # include "thread_linux.inline.hpp" +@@ -51,7 +52,10 @@ + #ifdef TARGET_OS_FAMILY_bsd + # include "thread_bsd.inline.hpp" + #endif +- ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__defnew__begin, bool, bool, size_t, bool); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__defnew__end, bool, bool, size_t, bool); ++#endif /* !USDT2 */ + // + // DefNewGeneration functions. + +@@ -528,6 +532,9 @@ + bool clear_all_soft_refs, + size_t size, + bool is_tlab) { ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__defnew__begin, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + assert(full || size > 0, "otherwise we don't want to collect"); + GenCollectedHeap* gch = GenCollectedHeap::heap(); + _next_gen = gch->next_gen(this); +@@ -661,6 +668,10 @@ + // does not guarantee monotonicity. + jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC; + update_time_of_last_gc(now); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__defnew__end, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ ++ + } + + class RemoveForwardPointerClosure: public ObjectClosure { +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2012-08-15 12:03:43.044543106 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2012-08-15 12:25:26.632316692 -0400 +@@ -55,6 +55,12 @@ + #include "runtime/vmThread.hpp" + #include "services/memoryService.hpp" + #include "services/runtimeService.hpp" ++#include "utilities/dtrace.hpp" ++ ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__begin, bool, bool, size_t, bool); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__end, bool, bool, size_t, bool); ++#endif /* !USDT2 */ + + // statics + CMSCollector* ConcurrentMarkSweepGeneration::_collector = NULL; +@@ -1647,7 +1653,13 @@ + size_t size, + bool tlab) + { ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__contig__begin, full, clear_all_soft_refs, size, tlab); ++#endif /* !USDT2 */ + collector()->collect(full, clear_all_soft_refs, size, tlab); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__contig__end, full, clear_all_soft_refs, size, tlab); ++#endif /* !USDT2 */ + } + + void CMSCollector::collect(bool full, +--- openjdk.orig/hotspot/src/share/vm/memory/generation.cpp 2012-08-15 12:03:43.009543167 -0400 ++++ openjdk/hotspot/src/share/vm/memory/generation.cpp 2012-08-15 12:27:46.378095083 -0400 +@@ -39,8 +39,14 @@ + #include "oops/oop.inline.hpp" + #include "runtime/java.hpp" + #include "utilities/copy.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/events.hpp" + ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__begin, bool, bool, size_t, bool); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__end, bool, bool, size_t, bool); ++#endif /* !USDT2 */ ++ + Generation::Generation(ReservedSpace rs, size_t initial_size, int level) : + _level(level), + _ref_processor(NULL) { +@@ -470,7 +476,13 @@ + // refs discovery is over the entire heap, not just this generation + ReferenceProcessorSpanMutator + x(ref_processor(), GenCollectedHeap::heap()->reserved_region()); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__contig__begin, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + GenMarkSweep::invoke_at_safepoint(_level, ref_processor(), clear_all_soft_refs); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__contig__end, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + SpecializationStats::print(); + } + +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp 2012-07-25 13:24:07.000000000 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp 2012-08-17 10:26:44.181117802 -0400 +@@ -51,8 +51,17 @@ + #include "runtime/vmThread.hpp" + #include "runtime/vm_operations.hpp" + #include "services/memoryService.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/stack.inline.hpp" + ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSScavenge__begin, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSScavenge__end, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSParallelCompact__begin, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSParallelCompact__end, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSMarkSweep__begin, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSMarkSweep__end, *uintptr_t, *uintptr_t); ++#endif /* !USDT2 */ + + HeapWord* PSScavenge::_to_space_top_before_gc = NULL; + int PSScavenge::_consecutive_skipped_scavenges = 0; +@@ -226,7 +235,13 @@ + PSAdaptiveSizePolicy* policy = heap->size_policy(); + IsGCActiveMark mark; + ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSScavenge__begin, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + const bool scavenge_done = PSScavenge::invoke_no_policy(); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSScavenge__end, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + const bool need_full_gc = !scavenge_done || + policy->should_full_GC(heap->old_gen()->free_in_bytes()); + bool full_gc_done = false; +@@ -243,9 +258,21 @@ + const bool clear_all_softrefs = cp->should_clear_all_soft_refs(); + + if (UseParallelOldGC) { ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSParallelCompact__begin, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + full_gc_done = PSParallelCompact::invoke_no_policy(clear_all_softrefs); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSParallelCompact__end, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + } else { ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSMarkSweep__begin, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + full_gc_done = PSMarkSweep::invoke_no_policy(clear_all_softrefs); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSMarkSweep__end, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + } + } + +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp 2012-07-25 13:24:07.000000000 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp 2012-08-31 15:14:23.936576341 -0400 +@@ -40,8 +40,14 @@ + #include "runtime/handles.inline.hpp" + #include "runtime/java.hpp" + #include "runtime/vmThread.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/vmError.hpp" + ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__parscavenge__heap__begin, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__parscavenge__heap__end, *uintptr_t, *uintptr_t); ++#endif /* !USDT2 */ ++ + PSYoungGen* ParallelScavengeHeap::_young_gen = NULL; + PSOldGen* ParallelScavengeHeap::_old_gen = NULL; + PSPermGen* ParallelScavengeHeap::_perm_gen = NULL; +@@ -806,7 +812,13 @@ + } + + VM_ParallelGCSystemGC op(gc_count, full_gc_count, cause); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__parscavenge__heap__begin, &op, cause); ++#endif /* !USDT2 */ + VMThread::execute(&op); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__parscavenge__heap__end, &op, cause); ++#endif /* !USDT2 */ + } + + // This interface assumes that it's being called by the diff -r 727519ab8096 tapset/hotspot_gc.stp.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tapset/hotspot_gc.stp.in Fri Aug 31 15:47:32 2012 -0400 @@ -0,0 +1,534 @@ +/* + * probe - gc_collect_contig_begin + * + * @name: gc_collect_contig_begin + * @is_full: If TRUE, attempt a full collection of the generation. + * Else; perform a scavenge + * @size: The collection should achieve a minimum region of available + * memory to allow for an allocation of 'size'. + * @is_tlab: Is this a Thread Local Allocation Buffer? + * + * Description: This marks the start of a contiguous space generation collection. + * + */ + +probe hotspot.gc_collect_contig_begin = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__contig__begin"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__contig__begin") +{ + + name = "gc_collect_contig_begin"; + is_full = $arg2; + size = $arg3; + is_tlab = $arg4; + probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab); + +} + +/* + * probe - gc_collect_contig_end + * + * @name: gc_collect_contig_end_ + * @is_full: If TRUE, attempt a full collection of the generation. + * Else; perform a scavenge. + * @size: The collection should achieve a minimum region of available + * memory to allow for an allocation of 'size'. + * @is_tlab: Is this a Thread Local Allocation Buffer? + * + * Description: This marks the end of a contiguous space generation collection. + * + */ + +probe hotspot.gc_collect_contig_end = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__contig__end"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__contig__end") +{ + + name = "gc_collect_contig_end"; + is_full = $arg2; + size = $arg3; + is_tlab = $arg4; + probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab); + +} + +/* + * probe - gc_collect_parnew_begin + * + * @name: gc_collect_parnew_begin + * @is_full: If TRUE, attempt a full collection of the generation. + * Else; perform a scavenge + * @size: The collection should achieve a minimum region of available + * memory to allow for an allocation of 'size'. + * @is_tlab: Is this a Thread Local Allocation Buffer? + * + * Description: This marks the beginning of a parallel collection of a new + * generation. + * + */ + +probe hotspot.gc_collect_parnew = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__parnew__begin"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__parnew__begin") +{ + + name = "gc_collect_parnew_begin"; + is_full = $arg2; + size = $arg3; + is_tlab = $arg4; + probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab); + +} + +/* + * probe - gc_collect_parnew_end + * + * @name: gc_collect_parnew_end + * @is_full: If TRUE, attempt a full collection of the generation. + * Else; perform a scavenge + * @size: The collection should achieve a minimum region of available + * memory to allow for an allocation of 'size'. + * @is_tlab: Is this a Thread Local Allocation Buffer? + * + * Description: This marks the end of a parallel collection of a new + * generation. + * + */ + +probe hotspot.gc_collect_parnew_end = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__parnew__end"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__parnew__end") +{ + + name = "gc_collect_parnew_end"; + is_full = $arg2; + size = $arg3; + is_tlab = $arg4; + probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab); + +} + +/* + * probe - gc_collect_defnew_begin + * + * @name: gc_collect_defnew_begin + * @is_full: If TRUE, attempt a full collection of the generation. + * Else; perform a scavenge + * @size: The collection should achieve a minimum region of available + * memory to allow for an allocation of 'size'. + * @is_tlab: Is this a Thread Local Allocation Buffer? + * + * Description: This marks the start of a newly defined generation + * collection + * + */ + +probe hotspot.gc_collect_defnew_begin = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__defnew__begin"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__defnew__begin") +{ + + name = "gc_collect_defnew_begin"; + is_full = $arg2; + size = $arg3; + is_tlab = $arg4; + probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab); + +} + +/* + * probe - gc_collect_defnew_end + * + * @name: gc_collect_defnew_end + * @is_full: If TRUE, attempt a full collection of the generation. + * Else; perform a scavenge + * @size: The collection should achieve a minimum region of available + * memory to allow for an allocation of 'size'. + * @is_tlab: Is this a Thread Local Allocation Buffer? + * + * Description: This marks the end of a newly defined generation + * collection + * + */ + +probe hotspot.gc_collect_defnew_end = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__defnew__end"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__defnew__end") +{ + + name = "gc_collect_defnew_end"; + is_full = $arg2; + size = $arg3; + is_tlab = $arg4; + probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab); + +} + +/* + * probe - gc_collect_tenured_begin + * + * @name: gc_collect_tenured_begin + * @is_full: If TRUE, attempt a full collection of the generation. + * Else; perform a scavenge + * @size: The collection should achieve a minimum region of available + * memory to allow for an allocation of 'size'. + * @is_tlab: Is this a Thread Local Allocation Buffer? + * + * Description: This is the start of a collection of a tenured generation + * (a generation that has survived multiple garbage collections and is + * now in a 'tenured' object space. + * + */ + +probe hotspot.gc_collect_tenured_begin = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__tenured__begin"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__tenured__begin") +{ + + name = "gc_collect_tenured_begin"; + is_full = $arg2; + size = $arg3; + is_tlab = $arg4; + probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab); + +} + +/* + * probe - gc_collect_tenured_end + * + * @name: gc_collect_tenured_end + * @is_full: If TRUE, attempt a full collection of the generation. + * Else; perform a scavenge + * @size: The collection should achieve a minimum region of available + * memory to allow for an allocation of 'size'. + * @is_tlab: Is this a Thread Local Allocation Buffer? + * + * Description: This is the end of a collection of a tenured generation + * (a generation that has survived multiple garbage collections and is + * now in a 'tenured' object space. + * + */ + +probe hotspot.gc_collect_tenured_end = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__tenured__end"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__tenured__end") +{ + + name = "gc_collect_tenured_end"; + is_full = $arg2; + size = $arg3; + is_tlab = $arg4; + probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab); + +} + +/* + * probe - gc_collect_parallel_scavenge_heap_begin + * + * @name: gc_collect_parallel_scavenge_heap_begin + * @address: Address of region being collected. + * @cause: Cause of the collection. + * + * Description: This is a parallel heap scavenge beginning, the jvm process doesn't + * have to halt while the gc is being completed. + */ + +probe hotspot.gc_collect_parallel_scavenge = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__parscavenge__heap__begin"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__parscavenge__heap__begin") +{ + name = "gc_collect_parallel_scavenge_heap_begin"; + address = sprintf("0x%x", $arg1); + cause = $arg2; + probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause); +} + +/* + * probe - gc_collect_parallel_scavenge_heap_end + * + * @name: gc_collect_parallel_scavenge_heap_end + * @address: Address of region being collected. + * @cause: Cause of the collection. + * + * Description: This is a parallel heap scavenge ending, the jvm process doesn't + * have to halt while the gc is being completed. + */ + +probe hotspot.gc_collect_parallel_scavenge_heap_end = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__parscavenge__heap__end"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__parscavenge__heap__end") +{ + name = "gc_collect_parallel_scavenge_heap_end"; + address = sprintf("0x%x", $arg1); + cause = $arg2; + probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause); +} + +/* + * probe - gc_collect_parallel_collect + * + * @name: gc_collect_parallel_collect + * @address: Address of object being collected. + * @cause: Cause of the collection. + * + * Description: This marks a parallel collection. + * + */ + +probe hotspot.gc_collect_parallel_collect = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__parallel__collect"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__parallel__collect") +{ + name = "gc_collect_parallel_collect"; + address = sprintf("0x%x", $arg1); + cause = $arg2; + probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause); +} + +/* + * probe - gc_collect_g1_begin + * + * @name: gc_collect_g1_begin + * @address: Address of object being collected. + * @cause: Cause of the collection. + * + * Description: This marks the start of a G1 style garbage collection + * (Garbage-First Garbage Collector). + * + */ + +probe hotspot.gc_collect_g1_begin = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__G1__begin"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__G1__begin") +{ + name = "gc_collect_g1_begin"; + address = sprintf("0x%x", $arg1); + cause = $arg2; + probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause); +} + +/* + * probe - gc_collect_g1_end + * + * @name: gc_collect_g1_end + * @address: Address of object being collected. + * @cause: Cause of the collection. + * + * Description: This marks then end of a G1 style garbage collection + * (Garbage-First Garbage Collector). + * + */ + +probe hotspot.gc_collect_g1_end = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__G1__end"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__G1__end") +{ + name = "gc_collect_g1_end"; + address = sprintf("0x%x", $arg1); + cause = $arg2; + probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause); +} + +/* + * probe - gc_collect_delete + * + * @name: gc_collect_delete + * @address: Address of object being collected. + * @cause: Cause of the collection. + * + * Description: A delete statement of an object. + * + */ + +probe hotspot.gc_collect_delete = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__delete"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__delete") +{ + name = "gc_collect_delete"; + address = sprintf("0x%x", $arg1); + probestr = sprintf("%s(address='%s')", name, address); +} + +/* + * probe - gc_collect_PSScavenge_begin + * + * @name: gc_collect_PSScavenge_begin + * @address: Address of scavenge + * @cause: Cause of the collection. + * + * Description: A parallel scavenge begins. A scavenge is a partial garbage + * collection which should be much more common than a full garbage collection + * throughout the course of the java program. + * + */ + +probe hotspot.gc_collect_PSScavenge_begin = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__PSScavenge__begin"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__PSScavenge__begin") +{ + name = "gc_collect_PSScavenge_begin"; + address = sprintf("0x%x", $arg1); + cause = $arg2; + probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause); +} + +/* + * probe - gc_collect_PSScavenge_end + * + * @name: gc_collect_PSScavenge_end + * @address: Address of scavenge. + * @cause: Cause of the collection. + * + * Description: The end of the parallel scavenge. The beginning and end of + * the scavenge is noted due to the possbility of multiple scavenges occuring + * at the same time. + * + */ + +probe hotspot.gc_collect_PSScavenge_end = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__PSScavenge__end"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__PSScavenge__end") +{ + name = "gc_collect_PSScavenge_end"; + address = sprintf("0x%x", $arg1); + cause = $arg2; + probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause); +} + +/* + * probe - gc_collect_PSParallelCompact_begin + * + * @name: gc_collect_PSParallelCompact_begin + * @address: Address of compaction. + * @cause: Cause of the collection. + * + * Description: This marks the start of a parallel compaction. + * + */ + +probe hotspot.gc_collect_PSParallelCompact_begin = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__PSParallelCompact__begin"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__PSParallelCompact__begin") +{ + name = "gc_collect_PSParallelCompact_begin"; + address = sprintf("0x%x", $arg1); + cause = $arg2; + probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause); +} + +/* + * probe - gc_collect_PSParallelCompact_end + * + * @name: gc_collect_PSParallelCompact_end + * @address: Address of compaction. + * @cause: Cause of the collection. + * + * Description: This marks the end of a parallel compaction. + * + */ + +probe hotspot.gc_collect_PSParallelCompact_end = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__PSParallelCompact__end"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__PSParallelCompact__end") +{ + name = "gc_collect_PSParallelCompact_end"; + address = sprintf("0x%x", $arg1); + cause = $arg2; + probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause); +} + +/* + * probe - gc_collect_PSMarkSweep_begin + * + * @name: gc_collect_PSMarkSweep_begin + * @address: Address of parallel mark sweep process. + * @cause: Cause of the collection. + * + * Description: This marks the start of a parallel mark sweep for + * objects that require collection. + * + */ + +probe hotspot.gc_collect_PSMarkSweep_begin = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__PSMarkSweep__begin"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__PSMarkSweep__begin") +{ + name = "gc_collect_PSMarkSweep_begin"; + address = sprintf("0x%x", $arg1); + cause = $arg2; + probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause); +} + +/* + * probe - gc_collect_PSMarkSweep_end + * + * @name: gc_collect_PSMarkSweep_end + * @address: Address of parallel mark sweep process. + * @cause: Cause of the collection. + * + * Description: This marks the start of a parallel mark sweep for + * objects that require collection. + * + */ + +probe hotspot.gc_collect_PSMarkSweep_end = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__PSMarkSweep__end"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__PSMarkSweep__end") +{ + name = "gc_collect_PSMarkSweep_end"; + address = sprintf("0x%x", $arg1); + cause = $arg2; + probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause); +} + +/* + * probe - gc_collect_move + * + * @name: gc_collect_move + * @from_bottom_address: The bottom address of the object being moved. + * @from_top_address: The top address of the object being moved. + * @to_bottom_address: The bottom address of where the object is being moved to. + * @to_top_address: The top address of where the object is being moved to. + * @cause: Cause of the collection. + * + * Description: During garbage collections there are times where objects or + * blocks of memory need to be moved. This probe will detail from where + * the memory is moving and where to. + * + */ + +probe hotspot.gc_collect_move = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__move"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__move") +{ + name = "gc_collect_move"; + from_bottom_address = sprintf("0x%x", $arg1); + from_top_address = sprintf("0x%x", $arg2); + to_bottom_address = sprintf("0x%x", $arg3); + to_top_address = sprintf("0x%x", $arg4); + probestr = sprintf("%s(from_bottom_address='%s', from_top_address='%s', to_bottom_address='%s', to_top_address='%s')", name, from_bottom_address, from_top_address, to_bottom_address, to_top_address); + +} + +/* + * probe - gc_collect_clear + * + * @name: gc_collect_clear + * @address: Address of object being collected. + * @cause: Cause of the collection. + * + * Description: This probe dictates the region of data that needs to be + * cleared in a compaction action. + * + */ + +probe hotspot.gc_collect_clear = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__ParallelCompact__clear"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__ParallelCompact__clear") +{ + name = "gc_collect_clear"; + region_data = sprintf("0x%x", $arg1); + data_location = sprintf("0x%x", $arg2); + probestr = sprintf("%s(region_data='%s', data_location='%s')", name, region_data, data_location); + +} -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121023/ec1bcce9/attachment.bin From aph at redhat.com Tue Oct 23 09:45:19 2012 From: aph at redhat.com (Andrew Haley) Date: Tue, 23 Oct 2012 17:45:19 +0100 Subject: We're doing an ARM64 OpenJDK port! Message-ID: <5086C99F.4060305@redhat.com> Article at http://www.advogato.org/article/1067.html Andrew. From jvanek at redhat.com Tue Oct 23 10:51:06 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 23 Oct 2012 19:51:06 +0200 Subject: Icedtea-web splashscreen implementation In-Reply-To: <507C4A48.2020404@redhat.com> References: <501928CB.4090002@redhat.com> <5019354B.3020100@redhat.com> <501983CD.4080405@redhat.com> <5020D6D8.6050302@redhat.com> <5021400A.1050804@redhat.com> <50291A05.1080606@redhat.com> <507C4A48.2020404@redhat.com> Message-ID: <5086D90A.5020701@redhat.com> On 10/15/2012 07:39 PM, Omair Majid wrote: > Hi Jiri, > > Sorry for the long delay in reviewing this. Np:) Thank you! > > On 08/13/2012 11:15 AM, Jiri Vanek wrote: >> Attached is patch with integration "adapted for head" > > Comments in-line below. > >> + synchronized (mutex) { > > Please consider renaming 'mutex' to indicate what code it is making > mutually exclusive. I have checked, and it is simple Object lock. As far as I have not touched this code i kept it as it was. > >> + try { >> + SwingUtilities.invokeAndWait(new Runnable() { >> >> - splashScreen.setSplashImageURL(splashImageURL); >> + @Override >> + public void run() { >> + splashScreen = new JNLPSplashScreen(resourceTracker, file); >> + } >> + }); >> + } catch (InterruptedException ie) { >> + // Wait till splash screen is created >> + while (splashScreen == null); >> + } catch (InvocationTargetException ite) { >> + ite.printStackTrace(); >> } >> + try { >> + SwingUtilities.invokeAndWait(new Runnable() { >> + >> + @Override >> + public void run() { >> + splashScreen.setSplashImageURL(splashImageURL); >> + } >> + }); >> + } catch (InterruptedException ie) { >> + // Wait till splash screen is created >> + while (splashScreen == null); > > This doesn't make sense to me. The variable would have bee initialized > in the previous try block. If it didn't (say an invocation exception was > thrown in the previous try block and this try block throws an > interrupted exception), than this will cause an infinite loop. You are right! It does no sense at all. I have overlooked. As I'm loading image in this step, I have added loop to wait to until image is loaded. Thank you for catch this! > >> + // Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); >> + // setLocation((screenSize.width - minimumWidth) / 2, >> + // (screenSize.height - minimumHeight) / 2); >> + //Above works always, but center only to middle of all monitors >> + //below works on 1.4 and higher, and center to middle of primary monmtor > > Please remove the commented out code. The comment by itself should be > enough: > // center to middle of primary monitor > Fixed. Although I have added a little bit longer comment. >> + setLocationRelativeTo(null); >> } > > Also, is it possible to center to monitor where the application was > started (as opposed to the primary monitor)? I mus admit I don't know how:( At the end i have just desperately googled whole sentences..:-/shame on me/-: Instead of primary monitor I can show on active (or random :) )monitor. But it is quite a lot of code to do something I'm not sure is good idea. So i have left untouched for now:( > > >> + AppletInstance applet = null; >> try { >> - AppletInstance applet = createApplet(file, enableCodeBase, cont); >> + applet = createApplet(file, enableCodeBase, cont); >> applet.initialize(); >> >> applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance >> return applet; >> } catch (LaunchException lex) { >> + SplashUtils.showErrorCaught(lex, applet); > > Please consider letting LaunchHander (or some new interface) handle this > without invoking SplashUtils directly. It just adds extra code > everywhere we want to handle exceptions. It's easy for a programmer to > miss it. I have extracted to already widely used launchError method. > snip... > >> diff -r a86af88a8ecd plugin/icedteanp/java/sun/applet/PluginAppletViewer.java >> --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Mon Aug 13 15:52:03 2012 +0200 >> +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Mon Aug 13 16:52:21 2012 +0200 > > I am not very familiar with this code. Another set of eyes will be > appreciated! No volunteer :( > > >> appletFrame.appletEventListener = new AppletEventListener(appletFrame, appletFrame); ... typos fixed ... >> >> + public void run() { >> + splashPanel.getSplashComponent().setVisible(false); >> + splashPanel.stopAnimation(); > > stopAnimation is called twice here too. > Well it is :) I wanted probably to be double sure :) Count of calls reduced to one for each method (I was hesitating which one is better. At the end I kept stopAnimation in run{} block) > >> * the parent class's update() just does a couple of checks (both of >> * which are accounted for) and then calls paint anyway. >> */ >> - public void update(Graphics g) { >> + public void paint(Graphics g) { >> >> // If the image or the graphics don't exist, create new ones >> if (bufFrameImg == null || bufFrameImgGraphics == null) { >> @@ -2112,11 +2248,18 @@ >> } >> >> // Paint off-screen >> - paint(bufFrameImgGraphics); >> + for (Component c: this.getComponents()) { >> + c.update(bufFrameImgGraphics); > > This should be c.paint(), no? Fixed > > But perhaps a better approach would be to only override paintComponent() > method in this class, and not paint()/update(). Well probably. But I'm hesitating to touch this class more then I'm already touching. > Thank you for comments! J. -------------- next part -------------- A non-text attachment was scrubbed... Name: splash_Integration_VIII.diff Type: text/x-patch Size: 32647 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121023/0f06cec5/splash_Integration_VIII.diff From jvanek at redhat.com Tue Oct 23 11:27:49 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 23 Oct 2012 20:27:49 +0200 Subject: Icedtea-web splashscreen implementation In-Reply-To: <5086DEFE.3070106@redhat.com> References: <501928CB.4090002@redhat.com> <5019354B.3020100@redhat.com> <501983CD.4080405@redhat.com> <5020D6D8.6050302@redhat.com> <5021400A.1050804@redhat.com> <50291A05.1080606@redhat.com> <507C4A48.2020404@redhat.com> <5086D90A.5020701@redhat.com> <5086DEFE.3070106@redhat.com> Message-ID: <5086E1A5.5000301@redhat.com> On 10/23/2012 08:16 PM, Jiri Vanek wrote: > On 10/23/2012 07:51 PM, Jiri Vanek wrote: >> On 10/15/2012 07:39 PM, Omair Majid wrote: >>> Hi Jiri, >>> >>> Sorry for the long delay in reviewing this. >> >> Np:) >> Thank you! >> >>> >>> On 08/13/2012 11:15 AM, Jiri Vanek wrote: >>>> Attached is patch with integration "adapted for head" >>> >>> Comments in-line below. >>> >>>> + synchronized (mutex) { >>> >>> Please consider renaming 'mutex' to indicate what code it is making >>> mutually exclusive. >> >> I have checked, and it is simple Object lock. As far as I have not touched this code i kept it as it was. >>> >>>> + try { >>>> + SwingUtilities.invokeAndWait(new Runnable() { >>>> >>>> - splashScreen.setSplashImageURL(splashImageURL); >>>> + @Override >>>> + public void run() { >>>> + splashScreen = new JNLPSplashScreen(resourceTracker, file); >>>> + } >>>> + }); >>>> + } catch (InterruptedException ie) { >>>> + // Wait till splash screen is created >>>> + while (splashScreen == null); >>>> + } catch (InvocationTargetException ite) { >>>> + ite.printStackTrace(); >>>> } >>>> + try { >>>> + SwingUtilities.invokeAndWait(new Runnable() { >>>> + >>>> + @Override >>>> + public void run() { >>>> + splashScreen.setSplashImageURL(splashImageURL); >>>> + } >>>> + }); >>>> + } catch (InterruptedException ie) { >>>> + // Wait till splash screen is created >>>> + while (splashScreen == null); >>> >>> This doesn't make sense to me. The variable would have bee initialized >>> in the previous try block. If it didn't (say an invocation exception was >>> thrown in the previous try block and this try block throws an >>> interrupted exception), than this will cause an infinite loop. >> >> You are right! It does no sense at all. I have overlooked. As I'm loading image in this step, I have added loop to wait to until image is loaded. Thank you for catch this! >>> >>>> + // Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); >>>> + // setLocation((screenSize.width - minimumWidth) / 2, >>>> + // (screenSize.height - minimumHeight) / 2); >>>> + //Above works always, but center only to middle of all monitors >>>> + //below works on 1.4 and higher, and center to middle of primary monmtor >>> >>> Please remove the commented out code. The comment by itself should be >>> enough: >>> // center to middle of primary monitor >>> >> >> Fixed. Although I have added a little bit longer comment. >>>> + setLocationRelativeTo(null); >>>> } >>> >>> Also, is it possible to center to monitor where the application was >>> started (as opposed to the primary monitor)? >> I mus admit I don't know how:( >> At the end i have just desperately googled whole sentences..:-/shame on me/-: >> Instead of primary monitor I can show on active (or random :) )monitor. But it is quite a lot of code to do something I'm not sure is good idea. >> So i have left untouched for now:( >> >>> >>> >>>> + AppletInstance applet = null; >>>> try { >>>> - AppletInstance applet = createApplet(file, enableCodeBase, cont); >>>> + applet = createApplet(file, enableCodeBase, cont); >>>> applet.initialize(); >>>> >>>> applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance >>>> return applet; >>>> } catch (LaunchException lex) { >>>> + SplashUtils.showErrorCaught(lex, applet); >>> >>> Please consider letting LaunchHander (or some new interface) handle this >>> without invoking SplashUtils directly. It just adds extra code >>> everywhere we want to handle exceptions. It's easy for a programmer to >>> miss it. >> >> I have extracted to already widely used launchError method. >>> >> snip... >>> >>>> diff -r a86af88a8ecd plugin/icedteanp/java/sun/applet/PluginAppletViewer.java >>>> --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Mon Aug 13 15:52:03 2012 +0200 >>>> +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Mon Aug 13 16:52:21 2012 +0200 >>> >>> I am not very familiar with this code. Another set of eyes will be >>> appreciated! >> >> No volunteer :( >> >>> >>> >>>> appletFrame.appletEventListener = new AppletEventListener(appletFrame, appletFrame); >> >> ... >> >> typos fixed >> >> ... >>>> >>>> + public void run() { >>>> + splashPanel.getSplashComponent().setVisible(false); >>>> + splashPanel.stopAnimation(); >>> >>> stopAnimation is called twice here too. >>> >> >> Well it is :) I wanted probably to be double sure :) >> Count of calls reduced to one for each method (I was hesitating which one is better. At the end I kept stopAnimation in run{} block) >>> >>>> * the parent class's update() just does a couple of checks (both of >>>> * which are accounted for) and then calls paint anyway. >>>> */ >>>> - public void update(Graphics g) { >>>> + public void paint(Graphics g) { >>>> >>>> // If the image or the graphics don't exist, create new ones >>>> if (bufFrameImg == null || bufFrameImgGraphics == null) { >>>> @@ -2112,11 +2248,18 @@ >>>> } >>>> >>>> // Paint off-screen >>>> - paint(bufFrameImgGraphics); >>>> + for (Component c: this.getComponents()) { >>>> + c.update(bufFrameImgGraphics); >>> >>> This should be c.paint(), no? >> >> Fixed >> >>> >>> But perhaps a better approach would be to only override paintComponent() >>> method in this class, and not paint()/update(). >> >> Well probably. But I'm hesitating to touch this class more then I'm already touching. >> >>> >> >> Thank you for comments! >> J. > > Between this patch and the last one, I have noticed regression, that applets splash have started to blink ( really a lot, it is actually useless now). Although the changes in drawing are really minor! (eg update->paint, removed @Override update...) > I will elaborate a bit on this. If you will find time during review, do you mind to verify? (maybe because of my machine can be tired because of late hour?:o) > Wou. And even one more regression - vector splash for javaws stoped to show itself completely. Damn it :( > J. From bugzilla-daemon at icedtea.classpath.org Tue Oct 23 12:15:09 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 23 Oct 2012 19:15:09 +0000 Subject: [Bug 1201] lazy loading of multiple JARs leads to crashes and general mayhem In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1201 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|dbhole at redhat.com |jvanek at redhat.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121023/e518a04b/attachment.html From jvanek at redhat.com Tue Oct 23 11:16:30 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 23 Oct 2012 20:16:30 +0200 Subject: Icedtea-web splashscreen implementation In-Reply-To: <5086D90A.5020701@redhat.com> References: <501928CB.4090002@redhat.com> <5019354B.3020100@redhat.com> <501983CD.4080405@redhat.com> <5020D6D8.6050302@redhat.com> <5021400A.1050804@redhat.com> <50291A05.1080606@redhat.com> <507C4A48.2020404@redhat.com> <5086D90A.5020701@redhat.com> Message-ID: <5086DEFE.3070106@redhat.com> On 10/23/2012 07:51 PM, Jiri Vanek wrote: > On 10/15/2012 07:39 PM, Omair Majid wrote: >> Hi Jiri, >> >> Sorry for the long delay in reviewing this. > > Np:) > Thank you! > >> >> On 08/13/2012 11:15 AM, Jiri Vanek wrote: >>> Attached is patch with integration "adapted for head" >> >> Comments in-line below. >> >>> + synchronized (mutex) { >> >> Please consider renaming 'mutex' to indicate what code it is making >> mutually exclusive. > > I have checked, and it is simple Object lock. As far as I have not touched this code i kept it as it was. >> >>> + try { >>> + SwingUtilities.invokeAndWait(new Runnable() { >>> >>> - splashScreen.setSplashImageURL(splashImageURL); >>> + @Override >>> + public void run() { >>> + splashScreen = new JNLPSplashScreen(resourceTracker, file); >>> + } >>> + }); >>> + } catch (InterruptedException ie) { >>> + // Wait till splash screen is created >>> + while (splashScreen == null); >>> + } catch (InvocationTargetException ite) { >>> + ite.printStackTrace(); >>> } >>> + try { >>> + SwingUtilities.invokeAndWait(new Runnable() { >>> + >>> + @Override >>> + public void run() { >>> + splashScreen.setSplashImageURL(splashImageURL); >>> + } >>> + }); >>> + } catch (InterruptedException ie) { >>> + // Wait till splash screen is created >>> + while (splashScreen == null); >> >> This doesn't make sense to me. The variable would have bee initialized >> in the previous try block. If it didn't (say an invocation exception was >> thrown in the previous try block and this try block throws an >> interrupted exception), than this will cause an infinite loop. > > You are right! It does no sense at all. I have overlooked. As I'm loading image in this step, I have added loop to wait to until image is loaded. Thank you for catch this! >> >>> + // Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); >>> + // setLocation((screenSize.width - minimumWidth) / 2, >>> + // (screenSize.height - minimumHeight) / 2); >>> + //Above works always, but center only to middle of all monitors >>> + //below works on 1.4 and higher, and center to middle of primary monmtor >> >> Please remove the commented out code. The comment by itself should be >> enough: >> // center to middle of primary monitor >> > > Fixed. Although I have added a little bit longer comment. >>> + setLocationRelativeTo(null); >>> } >> >> Also, is it possible to center to monitor where the application was >> started (as opposed to the primary monitor)? > I mus admit I don't know how:( > At the end i have just desperately googled whole sentences..:-/shame on me/-: > Instead of primary monitor I can show on active (or random :) )monitor. But it is quite a lot of code to do something I'm not sure is good idea. > So i have left untouched for now:( > >> >> >>> + AppletInstance applet = null; >>> try { >>> - AppletInstance applet = createApplet(file, enableCodeBase, cont); >>> + applet = createApplet(file, enableCodeBase, cont); >>> applet.initialize(); >>> >>> applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance >>> return applet; >>> } catch (LaunchException lex) { >>> + SplashUtils.showErrorCaught(lex, applet); >> >> Please consider letting LaunchHander (or some new interface) handle this >> without invoking SplashUtils directly. It just adds extra code >> everywhere we want to handle exceptions. It's easy for a programmer to >> miss it. > > I have extracted to already widely used launchError method. >> > snip... >> >>> diff -r a86af88a8ecd plugin/icedteanp/java/sun/applet/PluginAppletViewer.java >>> --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Mon Aug 13 15:52:03 2012 +0200 >>> +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Mon Aug 13 16:52:21 2012 +0200 >> >> I am not very familiar with this code. Another set of eyes will be >> appreciated! > > No volunteer :( > >> >> >>> appletFrame.appletEventListener = new AppletEventListener(appletFrame, appletFrame); > > ... > > typos fixed > > ... >>> >>> + public void run() { >>> + splashPanel.getSplashComponent().setVisible(false); >>> + splashPanel.stopAnimation(); >> >> stopAnimation is called twice here too. >> > > Well it is :) I wanted probably to be double sure :) > Count of calls reduced to one for each method (I was hesitating which one is better. At the end I kept stopAnimation in run{} block) >> >>> * the parent class's update() just does a couple of checks (both of >>> * which are accounted for) and then calls paint anyway. >>> */ >>> - public void update(Graphics g) { >>> + public void paint(Graphics g) { >>> >>> // If the image or the graphics don't exist, create new ones >>> if (bufFrameImg == null || bufFrameImgGraphics == null) { >>> @@ -2112,11 +2248,18 @@ >>> } >>> >>> // Paint off-screen >>> - paint(bufFrameImgGraphics); >>> + for (Component c: this.getComponents()) { >>> + c.update(bufFrameImgGraphics); >> >> This should be c.paint(), no? > > Fixed > >> >> But perhaps a better approach would be to only override paintComponent() >> method in this class, and not paint()/update(). > > Well probably. But I'm hesitating to touch this class more then I'm already touching. > >> > > Thank you for comments! > J. Between this patch and the last one, I have noticed regression, that applets splash have started to blink ( really a lot, it is actually useless now). Although the changes in drawing are really minor! (eg update->paint, removed @Override update...) I will elaborate a bit on this. If you will find time during review, do you mind to verify? (maybe because of my machine can be tired because of late hour?:o) J. From bugzilla-daemon at icedtea.classpath.org Tue Oct 23 13:03:12 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 23 Oct 2012 20:03:12 +0000 Subject: [Bug 1198] JSObject is not valid on Javascript side In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1198 --- Comment #1 from Deepak Bhole --- Hi, The supplied code has a bug. JSObject has no field named code: http://www.docjar.com/docs/api/netscape/javascript/JSObject.html I am not sure what it is that the oracle plugin is setting, but it shouldn't work there either. I looked through what icedtea-web is doing and it correctly detects that there is no field named code and therefore sets nothing. Is your intent to recursively set a java object field via javascript? If so, why do it recursively instead of in-code? -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121023/cf807649/attachment.html From andrew at icedtea.classpath.org Tue Oct 23 22:04:13 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 24 Oct 2012 05:04:13 +0000 Subject: /hg/icedtea6: 2 new changesets Message-ID: changeset 362d237b55fa in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=362d237b55fa author: Andrew John Hughes date: Wed Oct 24 04:08:07 2012 +0100 Apply 2012/10/16 security patches. 2012-10-11 Andrew John Hughes * Makefile.am: (SECURITY_PATCHES): Add new patches. * patches/ecj/override.patch: Add new cases in P11Key and RMIConnectionImpl introduced by security patches. * patches/openjdk/p11cipher-4898461-support_ecb_and_cbc.patch, * patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch: Regenerated to still apply after security patches. * patches/security/20121016/6631398.patch, * patches/security/20121016/7093490.patch, * patches/security/20121016/7143535.patch, * patches/security/20121016/7158800.patch, * patches/security/20121016/7158801.patch, * patches/security/20121016/7158804.patch, * patches/security/20121016/7167656.patch, * patches/security/20121016/7169884.patch, * patches/security/20121016/7169888.patch, * patches/security/20121016/7172522.patch, * patches/security/20121016/7176337.patch, * patches/security/20121016/7186286.patch, * patches/security/20121016/7189103.patch, * patches/security/20121016/7189490.patch, * patches/security/20121016/7189567.patch, * patches/security/20121016/7192975.patch, * patches/security/20121016/7195194.patch, * patches/security/20121016/7195917.patch, * patches/security/20121016/7195919.patch, * patches/security/20121016/7198296.patch, * patches/security/20121016/7198606.patch: New patches. changeset 7b0d155c59eb in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=7b0d155c59eb author: Andrew John Hughes date: Wed Oct 24 06:03:58 2012 +0100 Add latest releases to NEWS. 2012-10-24 Andrew John Hughes * NEWS: Add 1.10.10 & 1.11.5 releases. diffstat: ChangeLog | 37 + Makefile.am | 23 +- NEWS | 63 + patches/ecj/override.patch | 22 + patches/openjdk/p11cipher-4898461-support_ecb_and_cbc.patch | 42 +- patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch | 51 +- patches/security/20121016/6631398.patch | 20 + patches/security/20121016/7093490.patch | 28 + patches/security/20121016/7143535.patch | 31 + patches/security/20121016/7158800.patch | 1413 +++++++++++ patches/security/20121016/7158801.patch | 30 + patches/security/20121016/7158804.patch | 28 + patches/security/20121016/7167656.patch | 75 + patches/security/20121016/7169884.patch | 349 ++ patches/security/20121016/7169888.patch | 125 + patches/security/20121016/7172522.patch | 36 + patches/security/20121016/7176337.patch | 29 + patches/security/20121016/7186286.patch | 552 ++++ patches/security/20121016/7189103.patch | 39 + patches/security/20121016/7189490.patch | 55 + patches/security/20121016/7189567.patch | 95 + patches/security/20121016/7192975.patch | 35 + patches/security/20121016/7195194.patch | 29 + patches/security/20121016/7195917.patch | 88 + patches/security/20121016/7195919.patch | 63 + patches/security/20121016/7198296.patch | 114 + patches/security/20121016/7198606.patch | 28 + 27 files changed, 3449 insertions(+), 51 deletions(-) diffs (truncated from 3853 to 500 lines): diff -r b2594f302584 -r 7b0d155c59eb ChangeLog --- a/ChangeLog Tue Sep 25 19:08:50 2012 +0100 +++ b/ChangeLog Wed Oct 24 06:03:58 2012 +0100 @@ -1,3 +1,40 @@ +2012-10-24 Andrew John Hughes + + * NEWS: Add 1.10.10 & 1.11.5 releases. + +2012-10-23 Andrew John Hughes + + * Makefile.am: + (SECURITY_PATCHES): Add new patches. + * patches/ecj/override.patch: + Add new cases in P11Key and RMIConnectionImpl + introduced by security patches. + * patches/openjdk/p11cipher-4898461-support_ecb_and_cbc.patch, + * patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch: + Regenerated to still apply after security patches. + * patches/security/20121016/6631398.patch, + * patches/security/20121016/7093490.patch, + * patches/security/20121016/7143535.patch, + * patches/security/20121016/7158800.patch, + * patches/security/20121016/7158801.patch, + * patches/security/20121016/7158804.patch, + * patches/security/20121016/7167656.patch, + * patches/security/20121016/7169884.patch, + * patches/security/20121016/7169888.patch, + * patches/security/20121016/7172522.patch, + * patches/security/20121016/7176337.patch, + * patches/security/20121016/7186286.patch, + * patches/security/20121016/7189103.patch, + * patches/security/20121016/7189490.patch, + * patches/security/20121016/7189567.patch, + * patches/security/20121016/7192975.patch, + * patches/security/20121016/7195194.patch, + * patches/security/20121016/7195917.patch, + * patches/security/20121016/7195919.patch, + * patches/security/20121016/7198296.patch, + * patches/security/20121016/7198606.patch: + New patches. + 2012-09-25 Andrew John Hughes * NEWS: List PR1176. diff -r b2594f302584 -r 7b0d155c59eb Makefile.am --- a/Makefile.am Tue Sep 25 19:08:50 2012 +0100 +++ b/Makefile.am Wed Oct 24 06:03:58 2012 +0100 @@ -198,7 +198,28 @@ ICEDTEA_FSG_PATCHES = SECURITY_PATCHES = \ - patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch + patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch \ + patches/security/20121016/6631398.patch \ + patches/security/20121016/7093490.patch \ + patches/security/20121016/7143535.patch \ + patches/security/20121016/7158800.patch \ + patches/security/20121016/7158801.patch \ + patches/security/20121016/7158804.patch \ + patches/security/20121016/7167656.patch \ + patches/security/20121016/7169884.patch \ + patches/security/20121016/7169888.patch \ + patches/security/20121016/7172522.patch \ + patches/security/20121016/7176337.patch \ + patches/security/20121016/7186286.patch \ + patches/security/20121016/7189103.patch \ + patches/security/20121016/7189490.patch \ + patches/security/20121016/7189567.patch \ + patches/security/20121016/7192975.patch \ + patches/security/20121016/7195194.patch \ + patches/security/20121016/7195917.patch \ + patches/security/20121016/7195919.patch \ + patches/security/20121016/7198296.patch \ + patches/security/20121016/7198606.patch SPECIAL_SECURITY_PATCH = patches/security/20120214/7112642.patch diff -r b2594f302584 -r 7b0d155c59eb NEWS --- a/NEWS Tue Sep 25 19:08:50 2012 +0100 +++ b/NEWS Wed Oct 24 06:03:58 2012 +0100 @@ -63,6 +63,69 @@ - Add missing REF_TO_OBJs for references passed from JNI, this enable JamVM to run Qt-Jambi +New in release 1.11.5 (2012-10-16): + +* Security fixes + - S6631398, CVE-2012-3216: FilePermission improved path checking + - S7093490: adjust package access in rmiregistry + - S7143535, CVE-2012-5068: ScriptEngine corrected permissions + - S7167656, CVE-2012-5077: Multiple Seeders are being created + - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types + - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector + - S7172522, CVE-2012-5072: Improve DomainCombiner checking + - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC + - S7189103, CVE-2012-5069: Executors needs to maintain state + - S7189490: More improvements to DomainCombiner checking + - S7189567, CVE-2012-5085: java net obselete protocol + - S7192975, CVE-2012-5071: Conditional usage check is wrong + - S7195194, CVE-2012-5084: Better data validation for Swing + - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved + - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance + - S7198296, CVE-2012-5089: Refactor classloader usage + - S7158800: Improve storage of symbol tables + - S7158801: Improve VM CompileOnly option + - S7158804: Improve config file parsing + - S7176337: Additional changes needed for 7158801 fix + - S7198606, CVE-2012-4416: Improve VM optimization +* Backports + - S7175845: "jar uf" changes file permissions unexpectedly + - S7177216: native2ascii changes file permissions of input file + - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo +* Bug fixes + - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default + +New in release 1.10.10 (2012-10-16): + +* Security fixes + - S6631398, CVE-2012-3216: FilePermission improved path checking + - S7093490: adjust package access in rmiregistry + - S7143535, CVE-2012-5068: ScriptEngine corrected permissions + - S7167656, CVE-2012-5077: Multiple Seeders are being created + - S7169884, CVE-2012-5073: LogManager checks do not work correctly for sub-types + - S7169888, CVE-2012-5075: Narrowing resource definitions in JMX RMI connector + - S7172522, CVE-2012-5072: Improve DomainCombiner checking + - S7186286, CVE-2012-5081: TLS implementation to better adhere to RFC + - S7189103, CVE-2012-5069: Executors needs to maintain state + - S7189490: More improvements to DomainCombiner checking + - S7189567, CVE-2012-5085: java net obselete protocol + - S7192975, CVE-2012-5071: Conditional usage check is wrong + - S7195194, CVE-2012-5084: Better data validation for Swing + - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved + - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance + - S7198296, CVE-2012-5089: Refactor classloader usage + - S7158800: Improve storage of symbol tables + - S7158801: Improve VM CompileOnly option + - S7158804: Improve config file parsing + - S7176337: Additional changes needed for 7158801 fix + - S7198606, CVE-2012-4416: Improve VM optimization +* Backports + - S7092186: adjust package access in rmiregistry +* Bug fixes + - PR1194: IcedTea tries to build with /usr/lib/jvm/java-openjdk (now a 1.7 VM) by default + - S7175845: "jar uf" changes file permissions unexpectedly + - S7177216: native2ascii changes file permissions of input file + - S7199153: TEST_BUG: try-with-resources syntax pushed to 6-open repo + New in release 1.11.4 (2012-08-31): * Security fixes diff -r b2594f302584 -r 7b0d155c59eb patches/ecj/override.patch --- a/patches/ecj/override.patch Tue Sep 25 19:08:50 2012 +0100 +++ b/patches/ecj/override.patch Wed Oct 24 06:03:58 2012 +0100 @@ -219,6 +219,28 @@ public int compareTo(X509IssuerSerial another) { int cissuer = issuer.toString() .compareTo(another.issuer.toString()); +diff -Nru openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java +--- openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:58:37.130814619 +0100 ++++ openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:59:39.699829277 +0100 +@@ -168,7 +168,6 @@ + this.defaultContextClassLoader = + AccessController.doPrivileged( + new PrivilegedAction() { +- @Override + public ClassLoader run() { + return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), + dcl); +diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java +--- openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:18:07.340676704 +0100 ++++ openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:17:40.092039288 +0100 +@@ -216,7 +216,6 @@ + /** + * Return bit length of the key. + */ +- @Override + public int length() { + return keyLength; + } diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java openjdk-ecj/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java --- openjdk-ecj.orig/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java 2011-01-07 21:33:03.000000000 +0000 +++ openjdk-ecj/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java 2012-06-13 17:39:06.625931390 +0100 diff -r b2594f302584 -r 7b0d155c59eb patches/openjdk/p11cipher-4898461-support_ecb_and_cbc.patch --- a/patches/openjdk/p11cipher-4898461-support_ecb_and_cbc.patch Tue Sep 25 19:08:50 2012 +0100 +++ b/patches/openjdk/p11cipher-4898461-support_ecb_and_cbc.patch Wed Oct 24 06:03:58 2012 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java ---- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java 2011-11-14 22:12:05.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java 2012-05-09 23:50:29.255993679 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java 2012-10-23 18:00:58.332289584 +0100 ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java 2012-10-23 18:10:13.013034333 +0100 @@ -22,10 +22,10 @@ * or visit www.oracle.com if you need additional information or have any * questions. @@ -206,7 +206,7 @@ } else { throw new NoSuchPaddingException("Unsupported padding " + padding); } -@@ -174,7 +246,7 @@ +@@ -174,7 +247,7 @@ // see JCE spec protected byte[] engineGetIV() { @@ -215,7 +215,7 @@ } // see JCE spec -@@ -184,8 +256,9 @@ +@@ -184,8 +257,9 @@ } IvParameterSpec ivSpec = new IvParameterSpec(iv); try { @@ -227,7 +227,7 @@ params.init(ivSpec); return params; } catch (GeneralSecurityException e) { -@@ -209,38 +282,38 @@ +@@ -209,38 +283,38 @@ protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException { @@ -275,7 +275,7 @@ } // actual init() implementation -@@ -249,31 +322,31 @@ +@@ -249,31 +323,31 @@ throws InvalidKeyException, InvalidAlgorithmParameterException { cancelOperation(); switch (opmode) { @@ -319,7 +319,7 @@ } // generate random IV if (random == null) { -@@ -284,7 +357,7 @@ +@@ -284,7 +358,7 @@ } else { if (iv.length != blockSize) { throw new InvalidAlgorithmParameterException @@ -328,7 +328,7 @@ } } } -@@ -330,63 +403,43 @@ +@@ -330,63 +404,43 @@ session = token.getOpSession(); } if (encrypt) { @@ -411,7 +411,7 @@ } // see JCE spec -@@ -396,6 +449,7 @@ +@@ -396,6 +450,7 @@ int n = engineUpdate(in, inOfs, inLen, out, 0); return P11Util.convert(out, 0, n); } catch (ShortBufferException e) { @@ -419,7 +419,7 @@ throw new ProviderException(e); } } -@@ -408,6 +462,7 @@ +@@ -408,6 +463,7 @@ } // see JCE spec @@ -427,7 +427,7 @@ protected int engineUpdate(ByteBuffer inBuffer, ByteBuffer outBuffer) throws ShortBufferException { return implUpdate(inBuffer, outBuffer); -@@ -421,14 +476,15 @@ +@@ -421,14 +477,15 @@ int n = engineDoFinal(in, inOfs, inLen, out, 0); return P11Util.convert(out, 0, n); } catch (ShortBufferException e) { @@ -445,7 +445,7 @@ int n = 0; if ((inLen != 0) && (in != null)) { n = engineUpdate(in, inOfs, inLen, out, outOfs); -@@ -439,8 +495,10 @@ +@@ -439,8 +496,10 @@ } // see JCE spec @@ -457,7 +457,7 @@ int n = engineUpdate(inBuffer, outBuffer); n += implDoFinal(outBuffer); return n; -@@ -453,18 +511,55 @@ +@@ -453,18 +512,55 @@ } try { ensureInitialized(); @@ -520,7 +520,7 @@ throw new ProviderException("update() failed", e); } } -@@ -480,101 +575,167 @@ +@@ -480,101 +576,167 @@ if (outLen < updateLength(inLen)) { throw new ShortBufferException(); } @@ -731,7 +731,7 @@ throw new ShortBufferException(); } -@@ -582,30 +743,54 @@ +@@ -582,30 +744,54 @@ ensureInitialized(); long outAddr = 0; @@ -797,7 +797,7 @@ outBuffer.put(outArray, outOfs, k); } else { outBuffer.position(outBuffer.position() + k); -@@ -616,20 +801,21 @@ +@@ -616,20 +802,21 @@ throw new ProviderException("doFinal() failed", e); } finally { initialized = false; @@ -826,14 +826,14 @@ } // see JCE spec -@@ -648,9 +834,22 @@ +@@ -648,9 +835,22 @@ } // see JCE spec + @Override protected int engineGetKeySize(Key key) throws InvalidKeyException { int n = P11SecretKeyFactory.convertKey - (token, key, keyAlgorithm).keyLength(); + (token, key, keyAlgorithm).length(); return n; } + @@ -850,8 +850,8 @@ + } } diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java openjdk/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java ---- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java 2011-11-14 22:12:06.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java 2012-05-09 23:50:46.680268637 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java 2012-09-21 20:03:48.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java 2012-10-23 18:09:25.964291180 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. @@ -890,7 +890,7 @@ // XXX RSA_X_509, RSA_OAEP not yet supported diff -Nru openjdk.orig/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java openjdk/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java --- openjdk.orig/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java 2012-05-09 23:44:55.766718025 +0100 ++++ openjdk/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java 2012-10-23 18:09:25.976291370 +0100 @@ -0,0 +1,282 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. diff -r b2594f302584 -r 7b0d155c59eb patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch --- a/patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch Tue Sep 25 19:08:50 2012 +0100 +++ b/patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch Wed Oct 24 06:03:58 2012 +0100 @@ -1,13 +1,6 @@ diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java ---- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java 2012-05-10 00:54:52.640846834 +0100 -+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java 2012-05-10 01:39:21.084801155 +0100 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2003, 2011, 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 +--- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java 2012-10-23 18:11:19.306081852 +0100 ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java 2012-10-24 03:20:31.807709327 +0100 @@ -42,14 +42,12 @@ * Cipher implementation class. This class currently supports * DES, DESede, AES, ARCFOUR, and Blowfish. @@ -46,7 +39,7 @@ private byte[] iv; // number of bytes buffered internally by the native mechanism and padBuffer -@@ -212,6 +212,8 @@ +@@ -213,6 +213,8 @@ ("CBC mode not supported with stream ciphers"); } result = MODE_CBC; @@ -55,7 +48,7 @@ } else { throw new NoSuchAlgorithmException("Unsupported mode " + mode); } -@@ -227,6 +229,10 @@ +@@ -228,6 +230,10 @@ if (padding.equals("NOPADDING")) { paddingType = PAD_NONE; } else if (padding.equals("PKCS5PADDING")) { @@ -66,7 +59,7 @@ paddingType = PAD_PKCS5; if (mechanism != CKM_DES_CBC_PAD && mechanism != CKM_DES3_CBC_PAD && mechanism != CKM_AES_CBC_PAD) { -@@ -347,11 +353,14 @@ +@@ -348,11 +354,14 @@ ("IV not used in ECB mode"); } } @@ -84,7 +77,7 @@ } // generate random IV if (random == null) { -@@ -409,13 +418,15 @@ +@@ -410,13 +419,15 @@ if (session == null) { session = token.getOpSession(); } @@ -105,8 +98,8 @@ } catch (PKCS11Exception ex) { // release session when initialization failed diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java openjdk/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java ---- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java 2012-05-10 00:54:52.528845045 +0100 -+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java 2012-05-10 01:40:21.933694906 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java 2012-10-23 18:11:19.250080966 +0100 ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java 2012-10-24 03:20:31.807709327 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. @@ -125,7 +118,7 @@ diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS.java openjdk/jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS.java --- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS.java 2012-05-10 01:39:21.084801155 +0100 ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS.java 2012-10-24 03:20:31.823709582 +0100 @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. @@ -194,8 +187,8 @@ + } +} diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java openjdk/jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java ---- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java 2011-11-14 22:12:06.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java 2012-05-10 01:39:21.084801155 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java 2012-09-21 20:03:48.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java 2012-10-24 03:20:31.823709582 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. @@ -223,8 +216,8 @@ this.mechanism = mechanism; this.pParameter = pParameter; diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/wrapper/PKCS11Constants.java openjdk/jdk/src/share/classes/sun/security/pkcs11/wrapper/PKCS11Constants.java ---- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/wrapper/PKCS11Constants.java 2011-11-14 22:12:06.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/security/pkcs11/wrapper/PKCS11Constants.java 2012-05-10 01:39:21.092801272 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/security/pkcs11/wrapper/PKCS11Constants.java 2012-09-21 20:03:48.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/security/pkcs11/wrapper/PKCS11Constants.java 2012-10-24 03:20:31.823709582 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. @@ -298,8 +291,8 @@ /* The following encoding parameter sources are defined */ public static final long CKZ_DATA_SPECIFIED = 0x00000001L; diff -Nru openjdk.orig/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c openjdk/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c ---- openjdk.orig/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c 2012-05-10 00:54:52.584845940 +0100 -+++ openjdk/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c 2012-05-10 01:40:10.989534096 +0100 +--- openjdk.orig/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c 2012-10-23 18:11:19.274081347 +0100 ++++ openjdk/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c 2012-10-24 03:20:31.823709582 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. @@ -405,7 +398,7 @@ if (jRsaPkcsOaepParamsClass == NULL) { return; } diff -Nru openjdk.orig/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs-11v2-20a3.h openjdk/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs-11v2-20a3.h --- openjdk.orig/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs-11v2-20a3.h 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs-11v2-20a3.h 2012-05-10 01:39:21.096801331 +0100 ++++ openjdk/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs-11v2-20a3.h 2012-10-24 03:20:31.823709582 +0100 @@ -0,0 +1,124 @@ +/* pkcs-11v2-20a3.h include file for the PKCS #11 Version 2.20 Amendment 3 + document. */ @@ -532,8 +525,8 @@ + +#endif diff -Nru openjdk.orig/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h openjdk/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h ---- openjdk.orig/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h 2012-05-10 00:54:52.592846067 +0100 -+++ openjdk/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h 2012-05-10 01:40:01.709397757 +0100 +--- openjdk.orig/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h 2012-10-23 18:11:19.282081473 +0100 ++++ openjdk/jdk/src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h 2012-10-24 03:20:31.823709582 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. @@ -558,8 +551,8 @@ /* function to convert a PKCS#11 return value other than CK_OK into a Java Exception * or to throw a PKCS11RuntimeException diff -Nru openjdk.orig/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java openjdk/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java ---- openjdk.orig/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java 2012-05-10 00:54:52.532845109 +0100 -+++ openjdk/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java 2012-05-10 01:39:21.096801331 +0100 +--- openjdk.orig/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java 2012-10-23 18:11:19.250080966 +0100 ++++ openjdk/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java 2012-10-24 03:20:31.823709582 +0100 @@ -33,7 +33,7 @@ /** @@ -585,8 +578,8 @@ private static StringBuffer debugBuf = new StringBuffer(); diff -Nru openjdk.orig/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java openjdk/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java From andrew.zhogin at gmail.com Tue Oct 23 23:01:13 2012 From: andrew.zhogin at gmail.com (Andrew Zhogin) Date: Wed, 24 Oct 2012 13:01:13 +0700 Subject: Here need your help (liu chao jun) Message-ID: Hi. Openjdk-Shark not compiles with llvm > 2.9 (by default). http://stackoverflow.com/questions/8365452/how-to-build-openjdk-shark-against-llvm-3-0. For example, all calls to builder()->CreateMemoryBarrier() should be replaced with builder()->CreateFence(); Best regards, Andrew Zhogin. > Date: Tue, 23 Oct 2012 15:31:57 +0800 (CST) > From: "liu chao jun" > Subject: Here need your help > To: distro-pkg-dev at openjdk.java.net > Message-ID: <620dcc55.b2b8.13a8c88f772.Coremail.amiko212 at 126.com> > Content-Type: text/plain; charset="gbk" > > Hi all > > when i compiled llvm-3.0 with icedtea1.11.4 together,A memory_barrier error happened ,And now I write to all of you for the following questions need your help and suggestion : > 1, Is any function which can replace the "make_function" in the following function, > 2 , Or is there any different paramters in make_function with the similar action with the following one > 3 ,Is there a function similar with "nop" which can return a address in LLVM or Shark , > > Value* SharkBuilder::memory_barrier() { > return make_function( > #if defined(ARM) > (address) 0xffff0fa0, // __kernel_dmb > #else > "llvm.memory.barrier", > #endif // ARM > "11111", "v"); > } > > what's more the Dir of the function is :/openjdk-ecj/hotspot/src/share/vm/shark/sharkBuild.cpp > > Thank you very much and looking forward to your reply > > BR//Amiko > > From bugzilla-daemon at icedtea.classpath.org Wed Oct 24 00:41:04 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 24 Oct 2012 07:41:04 +0000 Subject: [Bug 1202] New: SunPKCS11 ends with an incorrect template when importing sign-only (no decrypt) on card, PKCS11 does well Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1202 Priority: P3 Bug ID: 1202 CC: unassigned at icedtea.classpath.org Assignee: gnu.andrew at redhat.com Summary: SunPKCS11 ends with an incorrect template when importing sign-only (no decrypt) on card, PKCS11 does well Severity: normal Classification: Unclassified OS: Windows Reporter: helpcrypto at gmail.com Hardware: x86 Status: NEW Version: unspecified Component: IcedTea Product: IcedTea When importing a cert (with ONLY digitalSignature use / ONLY keyEncipherment use) from P12 on a card using SunPkcs11 class, the object is imported with incorrect attributes (template). When importing the same cert using PKCS11 class, the template provided is correct. Attach some example code and some certs to test. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121024/6fe5b4db/attachment.html From bugzilla-daemon at icedtea.classpath.org Wed Oct 24 00:41:47 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 24 Oct 2012 07:41:47 +0000 Subject: [Bug 1202] SunPKCS11 ends with an incorrect template when importing sign-only (no decrypt) on card, PKCS11 does well In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1202 --- Comment #1 from helpcrypto at gmail.com --- Created attachment 778 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=778&action=edit 2 method test -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121024/706553f1/attachment.html From bugzilla-daemon at icedtea.classpath.org Wed Oct 24 00:43:06 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 24 Oct 2012 07:43:06 +0000 Subject: [Bug 1202] SunPKCS11 ends with an incorrect template when importing sign-only (no decrypt) on card, PKCS11 does well In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1202 --- Comment #2 from helpcrypto at gmail.com --- Created attachment 779 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=779&action=edit keyEncipherment ONLY p12 c10241.p12 password is c10241 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121024/384bb17f/attachment.html From bugzilla-daemon at icedtea.classpath.org Wed Oct 24 00:43:40 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 24 Oct 2012 07:43:40 +0000 Subject: [Bug 1202] SunPKCS11 ends with an incorrect template when importing sign-only (no decrypt) on card, PKCS11 does well In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1202 --- Comment #3 from helpcrypto at gmail.com --- Created attachment 780 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=780&action=edit digitalSignature ONLY p12 f10241.p12 password is f10241 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121024/aa4dc5fa/attachment.html From bugzilla-daemon at icedtea.classpath.org Wed Oct 24 00:44:17 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 24 Oct 2012 07:44:17 +0000 Subject: [Bug 1202] SunPKCS11 ends with an incorrect template when importing sign-only (no decrypt) on card, PKCS11 does well In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1202 --- Comment #4 from helpcrypto at gmail.com --- Created attachment 781 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=781&action=edit nonRepudiation ONLY p12 nr10241.p12 password is nr10241 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121024/37a02487/attachment.html From bugzilla-daemon at icedtea.classpath.org Wed Oct 24 00:45:14 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 24 Oct 2012 07:45:14 +0000 Subject: [Bug 1202] SunPKCS11 ends with an incorrect template when importing sign-only (no decrypt) on card, PKCS11 does well In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1202 --- Comment #5 from helpcrypto at gmail.com --- Created attachment 782 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=782&action=edit digitalSignature+noRepudiation+keyEnchipherment p12 fnrc10241.p12 password is fnrc10241 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121024/0d3260c5/attachment.html From bugzilla-daemon at icedtea.classpath.org Wed Oct 24 00:46:05 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 24 Oct 2012 07:46:05 +0000 Subject: [Bug 1202] SunPKCS11 ends with an incorrect template when importing sign-only (no decrypt) on card, PKCS11 does well In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1202 --- Comment #6 from helpcrypto at gmail.com --- Created attachment 783 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=783&action=edit digitalSignature+noRepudiation keyusages ONLY fnr10241.p12 password is fnr10241 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121024/938e70ee/attachment.html From helpcrypto at gmail.com Wed Oct 24 00:48:37 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Wed, 24 Oct 2012 09:48:37 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: <806875178.5138081.1351008106554.JavaMail.root@redhat.com> References: <806875178.5138081.1351008106554.JavaMail.root@redhat.com> Message-ID: > Yes, that would be helpful. Filed here: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1202 > I'm not sure without looking into it in depth. It could be the original > problems are due to something you're not doing manually which is done by > the provider. IMHO it _should_. Using PKCS#11 API could be more "difficult", but should work to handle crypto devices on a hardcore way! From bugzilla-daemon at icedtea.classpath.org Wed Oct 24 00:59:51 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 24 Oct 2012 07:59:51 +0000 Subject: [Bug 1198] JSObject is not valid on Javascript side In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1198 --- Comment #2 from helpcrypto at gmail.com --- Hi (In reply to comment #1) > The supplied code has a bug. JSObject has no field named code: > http://www.docjar.com/docs/api/netscape/javascript/JSObject.html ?? What line are you talking about? Im setting a member, setting an attribute to JSObject to be used on JS side. > I am not sure what it is that the oracle plugin is setting, but it shouldn't > work there either. I looked through what icedtea-web is doing and it > correctly detects that there is no field named code and therefore sets > nothing. In the URL you provided: setMember public void setMember(java.lang.String name, java.lang.Object value) Sets a named member of a JavaScript object. Equivalent to "this.name = value" in JavaScript. > Is your intent to recursively set a java object field via javascript? If so, > why do it recursively instead of in-code? What? Javascript is a "weak" language, so Im able to add and remove object attributes anytime I need. Im adding an attribute called "code" on JAVA and then trying to read it on JS. Sorry if i didnt explained myself ot the problem properly, lack on english. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121024/5f728474/attachment.html From andrew at icedtea.classpath.org Wed Oct 24 01:47:31 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 24 Oct 2012 08:47:31 +0000 Subject: /hg/icedtea6-hg: 11 new changesets Message-ID: changeset c1c7d4617bea in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=c1c7d4617bea author: Andrew John Hughes date: Wed Sep 19 23:24:23 2012 +0100 PR1119: Test explicitly if javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener is missing (GCC#42003). 2012-09-19 Andrew John Hughes PR1119: Only add classes to rt-source-files.txt if the class (or one or more of its methods/fields) are actually missing from the boot JDK * Makefile.am: (ICEDTEA_BOOTSTRAP_CLASSES): Only include javax.swing.plaf.basic.BasicDirectoryModel if PR42003 is present in the boot JDK. * NEWS: List PR1119. Correct previous use of PR1119 which should be PR1121. * acinclude.m4: (IT_FIND_JAVAC): Add missing requirement of IT_CHECK_FOR_JDK. (IT_FIND_JAVA): Likewise. (IT_FIND_JAVAH): Likewise. (IT_FIND_JAR): Likewise. (IT_FIND_RMIC): Likewise. (IT_FIND_NATIVE2ASCII): Likewise. (IT_CHECK_FOR_METHOD): New macro to check for a method both at build-time and run-time. * configure.ac: Call IT_CHECK_FOR_METHOD for javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener. changeset 36b093404170 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=36b093404170 author: Andrew John Hughes date: Thu Sep 20 16:33:37 2012 +0100 PR1119: Remove com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel from bootstrap classes. Unneeded. 2012-09-20 Andrew John Hughes * Makefile.am: (ICEDTEA_BOOTSTRAP_CLASSES): Remove com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel. changeset 99dd5321a045 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=99dd5321a045 author: Andrew John Hughes date: Mon Sep 24 20:32:40 2012 +0100 Merge in icedtea6-hg for b26 changeset 8bfbcf3a5d93 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=8bfbcf3a5d93 author: Andrew John Hughes date: Tue Sep 25 17:22:04 2012 +0100 Update to b26 tarball. Include new changes in b25 & b26 in NEWS. 2012-09-25 Andrew John Hughes * Makefile.am: (OPENJDK_DATE): Updated to that of b26 tarball. (OPENJDK_SHA256SUM): Likewise. * NEWS: Add updates in b25 & b26 not already present in previous releases. changeset d9d8e88ece00 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=d9d8e88ece00 author: Andrew John Hughes date: Tue Sep 25 18:04:11 2012 +0100 PR1114: Provide option to turn off downloading of tarballs (--disable-downloading) 2012-09-25 Andrew John Hughes * NEWS: List PR1114. 2012-04-11 Andrew John Hughes * Makefile.am: (download-openjdk): Don't download unless enable_downloading is set. (download-cacao): Likewise. (download-jamvm): Likewise. (download-hotspot): Likewise. (download-jaxp-drop): Likewise. (download-jaxws-drop): Likewise. (download-jaf-drop): Likewise. * acinclude.m4: (IT_CHECK_FOR_DOWNLOADING): New option --disable-downloading. * configure.ac: Call IT_CHECK_FOR_DOWNLOADING. changeset 9fe1e3e1d4dc in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=9fe1e3e1d4dc author: Andrew John Hughes date: Tue Sep 25 18:06:05 2012 +0100 PR1114: Fix enable_downloading syntax. 2012-04-12 Andrew John Hughes * Makefile.am: (download-openjdk): Fix syntax. (download-cacao): Likewise. (download-jamvm): Likewise. (download-hotspot): Likewise. (download-jaxp-drop): Likewise. (download-jaxws-drop): Likewise. (download-jaf-drop): Likewise. changeset b2594f302584 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=b2594f302584 author: Andrew John Hughes date: Tue Sep 25 19:08:50 2012 +0100 PR1176: Synchronise CACAO rules between IcedTea6/7/8 where possible 2012-09-25 Andrew John Hughes * NEWS: List PR1176. 2012-09-25 Stefan Ring * patches/cacao/ignore-jdi-tests.patch: Removed. * patches/cacao/ignore-tests.patch: Likewise. * Makefile.am: Synchronize CACAO sections with icedtea7, removing test-disabling patches. (cacao): Pass -j$(PARALLEL_JOBS) to make. 2009-11-02 Andrew John Hughes (extract-cacao): Test the actual CACAO source directory exists, not just the directory above. Use $@ to create stamp. changeset 362d237b55fa in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=362d237b55fa author: Andrew John Hughes date: Wed Oct 24 04:08:07 2012 +0100 Apply 2012/10/16 security patches. 2012-10-11 Andrew John Hughes * Makefile.am: (SECURITY_PATCHES): Add new patches. * patches/ecj/override.patch: Add new cases in P11Key and RMIConnectionImpl introduced by security patches. * patches/openjdk/p11cipher-4898461-support_ecb_and_cbc.patch, * patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch: Regenerated to still apply after security patches. * patches/security/20121016/6631398.patch, * patches/security/20121016/7093490.patch, * patches/security/20121016/7143535.patch, * patches/security/20121016/7158800.patch, * patches/security/20121016/7158801.patch, * patches/security/20121016/7158804.patch, * patches/security/20121016/7167656.patch, * patches/security/20121016/7169884.patch, * patches/security/20121016/7169888.patch, * patches/security/20121016/7172522.patch, * patches/security/20121016/7176337.patch, * patches/security/20121016/7186286.patch, * patches/security/20121016/7189103.patch, * patches/security/20121016/7189490.patch, * patches/security/20121016/7189567.patch, * patches/security/20121016/7192975.patch, * patches/security/20121016/7195194.patch, * patches/security/20121016/7195917.patch, * patches/security/20121016/7195919.patch, * patches/security/20121016/7198296.patch, * patches/security/20121016/7198606.patch: New patches. changeset 7b0d155c59eb in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=7b0d155c59eb author: Andrew John Hughes date: Wed Oct 24 06:03:58 2012 +0100 Add latest releases to NEWS. 2012-10-24 Andrew John Hughes * NEWS: Add 1.10.10 & 1.11.5 releases. changeset a91f927b72f2 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=a91f927b72f2 author: Andrew John Hughes date: Wed Oct 24 09:44:50 2012 +0100 Bump to b27 and remove upstream security patches. 2012-10-24 Andrew John Hughes * Makefile.am: (OPENJDK_VERSION): Bump to next release, b27. (SECURITY_PATCHES): Drop security patches now available in upstream hg. * patches/security/20121016/6631398.patch, * patches/security/20121016/7093490.patch, * patches/security/20121016/7143535.patch, * patches/security/20121016/7158800.patch, * patches/security/20121016/7158801.patch, * patches/security/20121016/7158804.patch, * patches/security/20121016/7167656.patch, * patches/security/20121016/7169884.patch, * patches/security/20121016/7169888.patch, * patches/security/20121016/7172522.patch, * patches/security/20121016/7176337.patch, * patches/security/20121016/7186286.patch, * patches/security/20121016/7189103.patch, * patches/security/20121016/7189490.patch, * patches/security/20121016/7189567.patch, * patches/security/20121016/7192975.patch, * patches/security/20121016/7195194.patch, * patches/security/20121016/7195917.patch, * patches/security/20121016/7195919.patch, * patches/security/20121016/7198296.patch, * patches/security/20121016/7198606.patch: Removed; upstream. changeset 09db58b50cb3 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=09db58b50cb3 author: Andrew John Hughes date: Wed Oct 24 09:47:15 2012 +0100 Fix my e-mail address. 2011-10-24 Andrew John Hughes * AUTHORS: Update my e-mail address. * ChangeLog: Likewise. diffstat: AUTHORS | 2 +- ChangeLog | 1174 +- Makefile.am | 186 +- NEWS | 104 +- acinclude.m4 | 87 + configure.ac | 9 +- patches/cacao/ignore-jdi-tests.patch | 1496 ---- patches/cacao/ignore-tests.patch | 11 - patches/ecj/override.patch | 115 +- patches/merge_fix.patch | 288 +- patches/nomotif-6706121.patch | 216 +- patches/openjdk/6610244-modal-fatal-error-windows.patch | 125 - patches/openjdk/6633275-shaped_translucent_windows.patch | 663 +- patches/openjdk/6797195-hw_lw_mixing.patch | 128 +- patches/openjdk/7103224-glibc_name_collision.patch | 236 - patches/openjdk/7140882-dont-return-booleans-from-methods-returning-pointers.patch | 12 - patches/openjdk/7185678-xmenuitem_peer_npe.patch | 21 - patches/openjdk/p11cipher-4898461-support_ecb_and_cbc.patch | 42 +- patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch | 51 +- patches/openjdk/remove-mimpure-option-to-gcc.patch | 162 - patches/security/20120612/7079902.patch | 508 - patches/security/20120612/7110720.patch | 129 - patches/security/20120612/7143606.patch | 644 - patches/security/20120612/7143614.patch | 165 - patches/security/20120612/7143617.patch | 72 - patches/security/20120612/7143851.patch | 74 - patches/security/20120612/7143872.patch | 400 - patches/security/20120612/7145239.patch | 68 - patches/security/20120612/7152811.patch | 107 - patches/security/20120612/7157609.patch | 56 - patches/security/20120612/7160677.patch | 19 - patches/security/20120612/7160757.patch | 26 - patches/security/20120830/7162476-xmldecoder_via_classfinder.patch | 2522 ------ patches/security/20120830/7163201-simplify_toolkit_internal_references.patch | 3713 ---------- patches/support_linux_3.patch | 19 - 35 files changed, 1791 insertions(+), 11859 deletions(-) diffs (truncated from 18820 to 500 lines): diff -r 7fe15479d719 -r 09db58b50cb3 AUTHORS --- a/AUTHORS Mon Sep 03 20:06:53 2012 +0200 +++ b/AUTHORS Wed Oct 24 09:47:15 2012 +0100 @@ -15,7 +15,7 @@ Kyle Galloway Dennis Gilmore Andrew Haley -Andrew John Hughes +Andrew John Hughes Tomas Hurka Ioana Ivan Matthias Klose diff -r 7fe15479d719 -r 09db58b50cb3 ChangeLog --- a/ChangeLog Mon Sep 03 20:06:53 2012 +0200 +++ b/ChangeLog Wed Oct 24 09:47:15 2012 +0100 @@ -1,15 +1,198 @@ +2011-10-24 Andrew John Hughes + + * AUTHORS: Update my e-mail address. + * ChangeLog: Likewise. + +2012-10-24 Andrew John Hughes + + * Makefile.am: + (OPENJDK_VERSION): Bump to next release, b27. + (SECURITY_PATCHES): Drop security patches now + available in upstream hg. + * patches/security/20121016/6631398.patch, + * patches/security/20121016/7093490.patch, + * patches/security/20121016/7143535.patch, + * patches/security/20121016/7158800.patch, + * patches/security/20121016/7158801.patch, + * patches/security/20121016/7158804.patch, + * patches/security/20121016/7167656.patch, + * patches/security/20121016/7169884.patch, + * patches/security/20121016/7169888.patch, + * patches/security/20121016/7172522.patch, + * patches/security/20121016/7176337.patch, + * patches/security/20121016/7186286.patch, + * patches/security/20121016/7189103.patch, + * patches/security/20121016/7189490.patch, + * patches/security/20121016/7189567.patch, + * patches/security/20121016/7192975.patch, + * patches/security/20121016/7195194.patch, + * patches/security/20121016/7195917.patch, + * patches/security/20121016/7195919.patch, + * patches/security/20121016/7198296.patch, + * patches/security/20121016/7198606.patch: + Removed; upstream. + +2012-10-24 Andrew John Hughes + + * NEWS: Add 1.10.10 & 1.11.5 releases. + +2012-10-23 Andrew John Hughes + + * Makefile.am: + (SECURITY_PATCHES): Add new patches. + * patches/ecj/override.patch: + Add new cases in P11Key and RMIConnectionImpl + introduced by security patches. + * patches/openjdk/p11cipher-4898461-support_ecb_and_cbc.patch, + * patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch: + Regenerated to still apply after security patches. + * patches/security/20121016/6631398.patch, + * patches/security/20121016/7093490.patch, + * patches/security/20121016/7143535.patch, + * patches/security/20121016/7158800.patch, + * patches/security/20121016/7158801.patch, + * patches/security/20121016/7158804.patch, + * patches/security/20121016/7167656.patch, + * patches/security/20121016/7169884.patch, + * patches/security/20121016/7169888.patch, + * patches/security/20121016/7172522.patch, + * patches/security/20121016/7176337.patch, + * patches/security/20121016/7186286.patch, + * patches/security/20121016/7189103.patch, + * patches/security/20121016/7189490.patch, + * patches/security/20121016/7189567.patch, + * patches/security/20121016/7192975.patch, + * patches/security/20121016/7195194.patch, + * patches/security/20121016/7195917.patch, + * patches/security/20121016/7195919.patch, + * patches/security/20121016/7198296.patch, + * patches/security/20121016/7198606.patch: + New patches. + +2012-09-25 Andrew John Hughes + + * NEWS: List PR1176. + +2012-09-25 Stefan Ring + + * patches/cacao/ignore-jdi-tests.patch: Removed. + * patches/cacao/ignore-tests.patch: Likewise. + * Makefile.am: + Synchronize CACAO sections with icedtea7, + removing test-disabling patches. + (cacao): Pass -j$(PARALLEL_JOBS) to make. + +2009-11-02 Andrew John Hughes + + (extract-cacao): Test the actual CACAO source + directory exists, not just the directory above. + Use $@ to create stamp. + +2012-04-12 Andrew John Hughes + + * Makefile.am: + (download-openjdk): Fix syntax. + (download-cacao): Likewise. + (download-jamvm): Likewise. + (download-hotspot): Likewise. + (download-jaxp-drop): Likewise. + (download-jaxws-drop): Likewise. + (download-jaf-drop): Likewise. + +2012-09-25 Andrew John Hughes + + * NEWS: List PR1114. + +2012-04-11 Andrew John Hughes + + * Makefile.am: + (download-openjdk): Don't download unless + enable_downloading is set. + (download-cacao): Likewise. + (download-jamvm): Likewise. + (download-hotspot): Likewise. + (download-jaxp-drop): Likewise. + (download-jaxws-drop): Likewise. + (download-jaf-drop): Likewise. + * acinclude.m4: + (IT_CHECK_FOR_DOWNLOADING): New option + --disable-downloading. + * configure.ac: Call IT_CHECK_FOR_DOWNLOADING. + +2012-09-25 Andrew John Hughes + + * Makefile.am: + (OPENJDK_DATE): Updated to that of b26 tarball. + (OPENJDK_SHA256SUM): Likewise. + * NEWS: + Add updates in b25 & b26 not already present + in previous releases. + +2012-09-20 Andrew John Hughes + + * Makefile.am: + (ICEDTEA_BOOTSTRAP_CLASSES): + Remove com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel. + +2012-09-19 Andrew John Hughes + + * patches/openjdk/7185678-xmenuitem_peer_npe.patch, + * patches/security/20120830/7162476-xmldecoder_via_classfinder.patch, + * patches/security/20120830/7163201-simplify_toolkit_internal_references.patch: + Removed; upstream. + * Makefile.am: + (SECURITY_PATCHES): Drop patches available upstream. + (ICEDTEA_PATCHES): Likewise. + * patches/merge_fix.patch, + * patches/nomotif-6706121.patch, + * patches/openjdk/6633275-shaped_translucent_windows.patch, + * patches/openjdk/6797195-hw_lw_mixing.patch: + Regenerated against upstream. + +2012-09-19 Andrew John Hughes + + PR1119: Only add classes to rt-source-files.txt if the class (or one or more of its methods/fields) + are actually missing from the boot JDK + * Makefile.am: + (ICEDTEA_BOOTSTRAP_CLASSES): Only include + javax.swing.plaf.basic.BasicDirectoryModel if + PR42003 is present in the boot JDK. + * NEWS: List PR1119. Correct previous use of + PR1119 which should be PR1121. + * acinclude.m4: + (IT_FIND_JAVAC): Add missing requirement of + IT_CHECK_FOR_JDK. + (IT_FIND_JAVA): Likewise. + (IT_FIND_JAVAH): Likewise. + (IT_FIND_JAR): Likewise. + (IT_FIND_RMIC): Likewise. + (IT_FIND_NATIVE2ASCII): Likewise. + (IT_CHECK_FOR_METHOD): New macro to check + for a method both at build-time and run-time. + * configure.ac: Call IT_CHECK_FOR_METHOD + for javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener. + 2012-09-03 Mark Wielaard * Makefile.am (ICEDTEA_PATCHES): Add missing backslash after patches/openjdk/7034464-transparent_huge_pages.patch. -2012-09-03 Andrew John Hughes +2012-09-03 Andrew John Hughes * NEWS: Add 1.10.9 & 1.11.4. -2012-08-31 Andrew John Hughes - - * Makefile.am: +2012-08-31 Andrew John Hughes + + * Makefile.am: + (JAXP_DROP_ZIP): Update to security fixed version. + (JAXP_DROP_SHA256SUM): Likewise. + (SECURITY_PATCHES): Drop; upstream. + (ICEDTEA_PATCHES): Drop mimpure-text patch; upstream. + * patches/ecj/override.patch: Regenerate + against Oracle version of security patches. + +2012-08-31 Andrew John Hughes + (ICEDTEA_PATCHES): Rename patches. * patches/openjdk/7034464-hugepage.patch: Renamed to... @@ -20,7 +203,7 @@ * patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch this. -2012-08-31 Andrew John Hughes +2012-08-31 Andrew John Hughes * Makefile.am: (SECURITY_PATCHES): Add 7162476, 7163201 & 7182135. @@ -67,7 +250,7 @@ * Makefile.am (stamps/add-nss.stamp): Only try patching the security files if they actually exist. -2012-08-16 Andrew John Hughes +2012-08-16 Andrew John Hughes PR1121: Old installs still suffer from GCC PR41686 * Makefile.am: @@ -75,7 +258,7 @@ Add javax.security.auth.kerberos.KerberosTicket * NEWS: Updated. -2012-08-15 Andrew John Hughes +2012-08-15 Andrew John Hughes PR1117: IcedTea6 prebuilds far too many classes on bootstrap * patches/ecj/hotspot.patch: @@ -128,7 +311,7 @@ * overlays/openjdk/hotspot/test/serviceability/SDTProbesGNULinuxTest.sh: New testcase. -2012-08-14 Andrew John Hughes +2012-08-14 Andrew John Hughes PR1113: Include tapset tests in distribution. * Makefile.am: @@ -136,7 +319,7 @@ (EXTRA_DIST): Add TAPSET_TEST_SRCS. * NEWS: Updated. -2012-08-14 Andrew John Hughes +2012-08-14 Andrew John Hughes * Makefile.am: (clean-add-nss): Only move java.security.old @@ -190,7 +373,7 @@ * Makefile.am: copy entire CACAO directory, including .hg -2012-08-09 Andrew John Hughes +2012-08-09 Andrew John Hughes Apply NSS changes to java.security after build. @@ -204,7 +387,7 @@ (add-nss-ecj): Apply NSS_PATCHES to bootstrap build. (clean-add-nss-ecj): Revert java.security for bootstrap build. -2012-08-08 Andrew John Hughes +2012-08-08 Andrew John Hughes * Makefile.am: Add new patch. * patches/openjdk/p11cipher-6414899-p11digest_should_support_cloning.patch: @@ -249,7 +432,32 @@ * test/tapset/jstaptest.pl (get_arch_dir): Fix dir for x86. -2012-06-07 Andrew John Hughes +2012-06-13 Andrew John Hughes + + * patches/openjdk/remove-mimpure-option-to-gcc.patch: + Dropped; upstreamed. + * patches/security/20120612/7079902.patch, + * patches/security/20120612/7110720.patch, + * patches/security/20120612/7143606.patch, + * patches/security/20120612/7143614.patch, + * patches/security/20120612/7143617.patch, + * patches/security/20120612/7143851.patch, + * patches/security/20120612/7143872.patch, + * patches/security/20120612/7145239.patch, + * patches/security/20120612/7152811.patch, + * patches/security/20120612/7157609.patch, + * patches/security/20120612/7160677.patch, + * patches/security/20120612/7160757.patch: + Dropped; provided by Oracle upstream. + * Makefile.am: + (JAXP_DROP_ZIP): Update to security fixed version. + (JAXP_DROP_SHA256SUM): Likewise. + (SECURITY_PATCHES): Drop; upstream. + (ICEDTEA_PATCHES): Drop mimpure-text patch; upstream. + * patches/ecj/override.patch: Regenerate + against Oracle version of security patches. + +2012-06-07 Andrew John Hughes * Makefile.am, * patches/ecj/override.patch: @@ -268,22 +476,46 @@ * patches/security/20120612/7160757.patch: Security patches for 2012/06/12. -2012-06-12 Andrew John Hughes +2012-06-12 Andrew John Hughes * NEWS: Add 1.10.8 & 1.11.3 releases. -2012-05-16 Andrew John Hughes +2012-06-11 Andrew John Hughes + + * patches/openjdk/7103224-glibc_name_collision.patch, + * patches/openjdk/7140882-dont-return-booleans-from-methods-returning-pointers.patch, + * patches/support_linux_3.patch: + Drop upstreamed patches. + * Makefile.am: + (ICEDTEA_PATCHES): Removed above patches. + * patches/openjdk/6633275-shaped_translucent_windows.patch: + Regenerated due to copyright header change by Oracle. + +2012-06-06 Andrew John Hughes + + * patches/openjdk/6610244-modal-fatal-error-windows.patch: + Removed. + * Makefile.am, + Remove upstreamed patch. + +2012-05-16 Andrew John Hughes + + * Makefile.am: + (OPENJDK_VERSION): Move to b26, ready + for next release. + +2012-05-16 Andrew John Hughes Move to released b25. * Makefile.am: (OPENJDK_DATE): Set to b25 release date. (OPENJDK_SHA256SUM): Set to b25 checksum. -2012-05-16 Andrew John Hughes +2012-05-16 Andrew John Hughes * NEWS: Add latest releases, 1.10.7 & 1.11.2 -2012-05-10 Andrew John Hughes +2012-05-10 Andrew John Hughes * Makefile.am: Add new patches. * patches/openjdk/p11cipher-4898461-support_ecb_and_cbc.patch, @@ -296,7 +528,7 @@ * patches/openjdk/p11cipher-6924489-ckr_operation_not_initialized.patch: Backports from 7 to improve P11Cipher. -2012-05-09 Andrew John Hughes +2012-05-09 Andrew John Hughes * Makefile.am: (MEMORY_LIMIT): Always set this. @@ -313,7 +545,7 @@ Make the test TestRSA compatible with JDK6 syntax. * Makefile.am: Updated. -2012-05-09 Andrew John Hughes +2012-05-09 Andrew John Hughes * Makefile.am: (add-nss): Copy nss.cfg to j2re-image as well. @@ -323,7 +555,7 @@ (add-nss-ecj): Same as for add-nss. (clean-add-nss-ecj): Same as for clean-add-nss. -2012-05-04 Andrew John Hughes +2012-05-04 Andrew John Hughes Backport cryptography tests from 7. * Makefile.am: Add new patches. @@ -413,7 +645,7 @@ * Makefile.am (clean-jtreg): Depend on clean-jtreg-reports. -2012-03-20 Andrew John Hughes +2012-03-20 Andrew John Hughes * acinclude.m4: (IT_FIND_COMPILER): Define only once and @@ -431,7 +663,7 @@ * configure.ac: Invoke IT_FIND_COMPILER rather than IT_FIND_JAVAC. -2012-03-19 Andrew John Hughes +2012-03-19 Andrew John Hughes * acinclude.m4: (IT_CHECK_FOR_JDK): Update JDK home directory @@ -439,7 +671,7 @@ and removing generic ones which may now pick up an unwanted 1.7 installation. -2012-03-16 Andrew John Hughes +2012-03-16 Andrew John Hughes PR600, 886: * Makefile.am: @@ -448,7 +680,7 @@ (IT_ENABLE_JAMVM): Generate jvm.jamvm.cfg. * jvm.jamvm.cfg.in: Copied from jvm.cfg.in. -2012-03-16 Andrew John Hughes +2012-03-16 Andrew John Hughes PR600, 886: * patches/pr600-arm-jvm.cfg.patch: Removed. @@ -524,7 +756,7 @@ * tapset/jstack.stp.in: Don't hard code constantPoolOopDesc_size. -2012-03-09 Andrew John Hughes +2012-03-09 Andrew John Hughes * patches/security/20120214/7082299.patch, * patches/security/20120214/7088367.patch, @@ -583,7 +815,7 @@ * arm_port/hotspot/src/cpu/zero/vm/asm_helper.cpp (Helper_new): Don't use shared Eden in incremental mode. -2012-02-15 Andrew John Hughes +2012-02-15 Andrew John Hughes * NEWS: Bring in 1.8.13, 1.9.13 and 1.10.6 release notes. @@ -615,7 +847,7 @@ * NEWS: Update with fix. * patches/ecj/jaxws-getdtdtype.patch: Update to apply correctly. -2012-02-01 Andrew John Hughes +2012-02-01 Andrew John Hughes * NEWS: Sync with 1.11 branch. @@ -687,7 +919,7 @@ (Thumb2_Return): Pass stackdepth to Thumb2_Safepoint. (Thumb2_codegen): Pass stackdepth to Thumb2_Return. -2012-01-18 Andrew John Hughes +2012-01-18 Andrew John Hughes * patches/openjdk/6851973-kerberos.patch, * patches/openjdk/7091528-javadoc_class_files.patch, @@ -759,7 +991,7 @@ * patches/openjdk/7103610-_NET_WM_PID_and_WM_CLIENT_MACHINE_are_not_set.patch: New file. Sets XAtoms _NET_WM_PID and WM_CLIENT_MACHINE for X windows. -2012-01-12 Andrew John Hughes +2012-01-12 Andrew John Hughes * NEWS: Add 1.10.5, 1.9.12 and 1.8.12 release notes. Remove duplicates from 1.11. @@ -773,7 +1005,7 @@ com.sun.org.apache.xml.internal.security.utils.IdResolver is not thread safe. -2012-01-10 Andrew John Hughes +2012-01-10 Andrew John Hughes * Makefile.am: Add new patch. * NEWS: Mention backport. @@ -817,7 +1049,7 @@ * policytool.desktop.in: new file, stub for desktop file, have variable to be substituted during configure -2012-01-06 Andrew John Hughes +2012-01-06 Andrew John Hughes * NEWS: Cleanup ARM entry, separating details into their own section. @@ -826,7 +1058,7 @@ * NEWS: ARM assembly language port. -2012-01-06 Andrew John Hughes +2012-01-06 Andrew John Hughes Remove outdated NIO2 backport. From jvanek at redhat.com Wed Oct 24 02:53:18 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 24 Oct 2012 11:53:18 +0200 Subject: Icedtea-web splashscreen implementation In-Reply-To: <5086E1A5.5000301@redhat.com> References: <501928CB.4090002@redhat.com> <5019354B.3020100@redhat.com> <501983CD.4080405@redhat.com> <5020D6D8.6050302@redhat.com> <5021400A.1050804@redhat.com> <50291A05.1080606@redhat.com> <507C4A48.2020404@redhat.com> <5086D90A.5020701@redhat.com> <5086DEFE.3070106@redhat.com> <5086E1A5.5000301@redhat.com> Message-ID: <5087BA8E.7010106@redhat.com> On 10/23/2012 08:27 PM, Jiri Vanek wrote: > On 10/23/2012 08:16 PM, Jiri Vanek wrote: >> On 10/23/2012 07:51 PM, Jiri Vanek wrote: >>> On 10/15/2012 07:39 PM, Omair Majid wrote: >>>> Hi Jiri, >>>> >>>> Sorry for the long delay in reviewing this. >>> >>> Np:) >>> Thank you! >>> >>>> >>>> On 08/13/2012 11:15 AM, Jiri Vanek wrote: >>>>> Attached is patch with integration "adapted for head" >>>> >>>> Comments in-line below. >>>> >>>>> + synchronized (mutex) { >>>> >>>> Please consider renaming 'mutex' to indicate what code it is making >>>> mutually exclusive. >>> >>> I have checked, and it is simple Object lock. As far as I have not touched this code i kept it as >>> it was. >>>> >>>>> + try { >>>>> + SwingUtilities.invokeAndWait(new Runnable() { >>>>> >>>>> - splashScreen.setSplashImageURL(splashImageURL); >>>>> + @Override >>>>> + public void run() { >>>>> + splashScreen = new JNLPSplashScreen(resourceTracker, file); >>>>> + } >>>>> + }); >>>>> + } catch (InterruptedException ie) { >>>>> + // Wait till splash screen is created >>>>> + while (splashScreen == null); >>>>> + } catch (InvocationTargetException ite) { >>>>> + ite.printStackTrace(); >>>>> } >>>>> + try { >>>>> + SwingUtilities.invokeAndWait(new Runnable() { >>>>> + >>>>> + @Override >>>>> + public void run() { >>>>> + splashScreen.setSplashImageURL(splashImageURL); >>>>> + } >>>>> + }); >>>>> + } catch (InterruptedException ie) { >>>>> + // Wait till splash screen is created >>>>> + while (splashScreen == null); >>>> >>>> This doesn't make sense to me. The variable would have bee initialized >>>> in the previous try block. If it didn't (say an invocation exception was >>>> thrown in the previous try block and this try block throws an >>>> interrupted exception), than this will cause an infinite loop. >>> >>> You are right! It does no sense at all. I have overlooked. As I'm loading image in this step, I >>> have added loop to wait to until image is loaded. Thank you for catch this! >>>> >>>>> + // Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); >>>>> + // setLocation((screenSize.width - minimumWidth) / 2, >>>>> + // (screenSize.height - minimumHeight) / 2); >>>>> + //Above works always, but center only to middle of all monitors >>>>> + //below works on 1.4 and higher, and center to middle of primary monmtor >>>> >>>> Please remove the commented out code. The comment by itself should be >>>> enough: >>>> // center to middle of primary monitor >>>> >>> >>> Fixed. Although I have added a little bit longer comment. >>>>> + setLocationRelativeTo(null); >>>>> } >>>> >>>> Also, is it possible to center to monitor where the application was >>>> started (as opposed to the primary monitor)? >>> I mus admit I don't know how:( >>> At the end i have just desperately googled whole sentences..:-/shame on me/-: >>> Instead of primary monitor I can show on active (or random :) )monitor. But it is quite a lot of >>> code to do something I'm not sure is good idea. >>> So i have left untouched for now:( >>> >>>> >>>> >>>>> + AppletInstance applet = null; >>>>> try { >>>>> - AppletInstance applet = createApplet(file, enableCodeBase, cont); >>>>> + applet = createApplet(file, enableCodeBase, cont); >>>>> applet.initialize(); >>>>> >>>>> applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance >>>>> return applet; >>>>> } catch (LaunchException lex) { >>>>> + SplashUtils.showErrorCaught(lex, applet); >>>> >>>> Please consider letting LaunchHander (or some new interface) handle this >>>> without invoking SplashUtils directly. It just adds extra code >>>> everywhere we want to handle exceptions. It's easy for a programmer to >>>> miss it. >>> >>> I have extracted to already widely used launchError method. >>>> >>> snip... >>>> >>>>> diff -r a86af88a8ecd plugin/icedteanp/java/sun/applet/PluginAppletViewer.java >>>>> --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Mon Aug 13 15:52:03 2012 +0200 >>>>> +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Mon Aug 13 16:52:21 2012 +0200 >>>> >>>> I am not very familiar with this code. Another set of eyes will be >>>> appreciated! >>> >>> No volunteer :( >>> >>>> >>>> >>>>> appletFrame.appletEventListener = new AppletEventListener(appletFrame, appletFrame); >>> >>> ... >>> >>> typos fixed >>> >>> ... >>>>> >>>>> + public void run() { >>>>> + splashPanel.getSplashComponent().setVisible(false); >>>>> + splashPanel.stopAnimation(); >>>> >>>> stopAnimation is called twice here too. >>>> >>> >>> Well it is :) I wanted probably to be double sure :) >>> Count of calls reduced to one for each method (I was hesitating which one is better. At the end I >>> kept stopAnimation in run{} block) >>>> >>>>> * the parent class's update() just does a couple of checks (both of >>>>> * which are accounted for) and then calls paint anyway. >>>>> */ >>>>> - public void update(Graphics g) { >>>>> + public void paint(Graphics g) { >>>>> >>>>> // If the image or the graphics don't exist, create new ones >>>>> if (bufFrameImg == null || bufFrameImgGraphics == null) { >>>>> @@ -2112,11 +2248,18 @@ >>>>> } >>>>> >>>>> // Paint off-screen >>>>> - paint(bufFrameImgGraphics); >>>>> + for (Component c: this.getComponents()) { >>>>> + c.update(bufFrameImgGraphics); >>>> >>>> This should be c.paint(), no? >>> >>> Fixed >>> >>>> >>>> But perhaps a better approach would be to only override paintComponent() >>>> method in this class, and not paint()/update(). >>> >>> Well probably. But I'm hesitating to touch this class more then I'm already touching. >>> >>>> >>> >>> Thank you for comments! >>> J. >> >> Between this patch and the last one, I have noticed regression, that applets splash have started >> to blink ( really a lot, it is actually useless now). Although the changes in drawing are really >> minor! (eg update->paint, removed @Override update...) >> I will elaborate a bit on this. If you will find time during review, do you mind to verify? (maybe >> because of my machine can be tired because of late hour?:o) >> > > Wou. And even one more regression - vector splash for javaws stoped to show itself completely. Damn > it :( >> J. > Fixed patch. Sorry for noise:( The blinking was caused by removed @Overriden update method in PluginAppletViewer. I had the reason to add it :) Comment in paint method of the same class is explaining reason. The disappearance for javaws was caused by wrong applying of patch (for Launcher and GuiLauncher. J -------------- next part -------------- A non-text attachment was scrubbed... Name: splash_Integration_IX.diff Type: text/x-patch Size: 33666 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121024/5483f892/splash_Integration_IX.diff From andrew at icedtea.classpath.org Wed Oct 24 04:17:35 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 24 Oct 2012 11:17:35 +0000 Subject: /hg/release/icedtea7-2.1: Prepare for next release cycle. Message-ID: changeset 686b4a5790d1 in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=686b4a5790d1 author: Andrew John Hughes date: Wed Oct 24 12:17:29 2012 +0100 Prepare for next release cycle. 2012-10-21 Andrew John Hughes * configure.ac: Bump to 2.1.4pre. * NEWS: Add new release. diffstat: ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- 3 files changed, 8 insertions(+), 1 deletions(-) diffs (33 lines): diff -r 1246100b6871 -r 686b4a5790d1 ChangeLog --- a/ChangeLog Wed Oct 17 10:21:42 2012 +0100 +++ b/ChangeLog Wed Oct 24 12:17:29 2012 +0100 @@ -1,3 +1,8 @@ +2012-10-21 Andrew John Hughes + + * configure.ac: Bump to 2.1.4pre. + * NEWS: Add new release. + 2011-10-17 Andrew John Hughes * Makefile.am: diff -r 1246100b6871 -r 686b4a5790d1 NEWS --- a/NEWS Wed Oct 17 10:21:42 2012 +0100 +++ b/NEWS Wed Oct 24 12:17:29 2012 +0100 @@ -10,6 +10,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY +New in release 2.1.4 (20XX-XX-XX): + New in release 2.1.3 (2012-10-17): * Security fixes diff -r 1246100b6871 -r 686b4a5790d1 configure.ac --- a/configure.ac Wed Oct 17 10:21:42 2012 +0100 +++ b/configure.ac Wed Oct 24 12:17:29 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea], [2.1.3], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [2.1.4pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Wed Oct 24 04:18:41 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 24 Oct 2012 11:18:41 +0000 Subject: /hg/release/icedtea7-2.2: Prepare for next release cycle. Message-ID: changeset 3629a254b686 in /hg/release/icedtea7-2.2 details: http://icedtea.classpath.org/hg/release/icedtea7-2.2?cmd=changeset;node=3629a254b686 author: Andrew John Hughes date: Wed Oct 24 12:18:35 2012 +0100 Prepare for next release cycle. 2012-10-24 Andrew John Hughes * configure.ac: Bump to 2.2.4pre. * NEWS: Add new release. diffstat: ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- 3 files changed, 8 insertions(+), 1 deletions(-) diffs (33 lines): diff -r acb3a9d6be33 -r 3629a254b686 ChangeLog --- a/ChangeLog Wed Oct 17 16:56:03 2012 +0100 +++ b/ChangeLog Wed Oct 24 12:18:35 2012 +0100 @@ -1,3 +1,8 @@ +2012-10-24 Andrew John Hughes + + * configure.ac: Bump to 2.2.4pre. + * NEWS: Add new release. + 2011-10-17 Andrew John Hughes * Makefile.am: diff -r acb3a9d6be33 -r 3629a254b686 NEWS --- a/NEWS Wed Oct 17 16:56:03 2012 +0100 +++ b/NEWS Wed Oct 24 12:18:35 2012 +0100 @@ -10,6 +10,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY +New in release 2.2.4 (20XX-XX-XX): + New in release 2.2.3 (2012-10-17): * Security fixes diff -r acb3a9d6be33 -r 3629a254b686 configure.ac --- a/configure.ac Wed Oct 17 16:56:03 2012 +0100 +++ b/configure.ac Wed Oct 24 12:18:35 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea], [2.2.3], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [2.2.4pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Wed Oct 24 05:07:44 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 24 Oct 2012 12:07:44 +0000 Subject: /hg/release/icedtea7-2.3: Prepare for next release cycle. Message-ID: changeset eb086017530d in /hg/release/icedtea7-2.3 details: http://icedtea.classpath.org/hg/release/icedtea7-2.3?cmd=changeset;node=eb086017530d author: Andrew John Hughes date: Wed Oct 24 13:07:33 2012 +0100 Prepare for next release cycle. 2012-10-24 Andrew John Hughes * configure.ac: Bump to 2.3.4pre. * NEWS: Add new release. diffstat: ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- 3 files changed, 8 insertions(+), 1 deletions(-) diffs (33 lines): diff -r 23117feffda5 -r eb086017530d ChangeLog --- a/ChangeLog Wed Oct 17 17:03:22 2012 +0100 +++ b/ChangeLog Wed Oct 24 13:07:33 2012 +0100 @@ -1,3 +1,8 @@ +2012-10-24 Andrew John Hughes + + * configure.ac: Bump to 2.3.4pre. + * NEWS: Add new release. + 2011-10-17 Andrew John Hughes * NEWS: Drop S7176337 which is only diff -r 23117feffda5 -r eb086017530d NEWS --- a/NEWS Wed Oct 17 17:03:22 2012 +0100 +++ b/NEWS Wed Oct 24 13:07:33 2012 +0100 @@ -10,6 +10,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY +New in release 2.3.4 (20XX-XX-XX): + New in release 2.3.3 (2012-10-17): * Security fixes diff -r 23117feffda5 -r eb086017530d configure.ac --- a/configure.ac Wed Oct 17 17:03:22 2012 +0100 +++ b/configure.ac Wed Oct 24 13:07:33 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea], [2.3.3], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [2.3.4pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From ChPhilli at redhat.com Wed Oct 24 05:33:44 2012 From: ChPhilli at redhat.com (Chris Phillips) Date: Wed, 24 Oct 2012 08:33:44 -0400 Subject: Here need your help (liu chao jun) In-Reply-To: References: Message-ID: <5087E028.5030006@redhat.com> Hi The current status is that Shark isn't functional, the near future will bring a very different version of hotspot that will hopefully stabilize and provide jsr 292 without the complexity of Ricochet frames and deep recursion. We had to port zero to that hotspot [hsx25 and soon hsx24 for jdk7u hopefully] (That port now already completed by Roman Kennke, awaiting acceptance by the hotspot folk). After that we can begin the resurrecting Shark based on that hotspot to the latest llvm (3.1+?). But note that there are also some other openjdk or icedtea projects that have reduced some of the requirement for shark , such as the arm 32 bit asm jit , the ppc-aix-port, and the recently announced arm 64 port... Cheers! Chris On 24/10/12 02:01 AM, Andrew Zhogin wrote: > Hi. > > Openjdk-Shark not compiles with llvm > 2.9 (by default). > > http://stackoverflow.com/questions/8365452/how-to-build-openjdk-shark-against-llvm-3-0. > > For example, all calls to builder()->CreateMemoryBarrier() should be > replaced with builder()->CreateFence(); > > Best regards, Andrew Zhogin. > >> Date: Tue, 23 Oct 2012 15:31:57 +0800 (CST) >> From: "liu chao jun" >> Subject: Here need your help >> To: distro-pkg-dev at openjdk.java.net >> Message-ID: <620dcc55.b2b8.13a8c88f772.Coremail.amiko212 at 126.com> >> Content-Type: text/plain; charset="gbk" >> >> Hi all >> >> when i compiled llvm-3.0 with icedtea1.11.4 together,A memory_barrier error happened ,And now I write to all of you for the following questions need your help and suggestion : >> 1, Is any function which can replace the "make_function" in the following function, >> 2 , Or is there any different paramters in make_function with the similar action with the following one >> 3 ,Is there a function similar with "nop" which can return a address in LLVM or Shark , >> >> Value* SharkBuilder::memory_barrier() { >> return make_function( >> #if defined(ARM) >> (address) 0xffff0fa0, // __kernel_dmb >> #else >> "llvm.memory.barrier", >> #endif // ARM >> "11111", "v"); >> } >> >> what's more the Dir of the function is :/openjdk-ecj/hotspot/src/share/vm/shark/sharkBuild.cpp >> >> Thank you very much and looking forward to your reply >> >> BR//Amiko >> >> -- -- -- Woda: "Java: write once, debug anywhere" Hong Zhang http://thehenrys.ca | Chris Phillips @ T.O. Red Hat OpenJDK JVM Engineer, | | mailto:ChrisPhi at RedHat.Com (416)483-3768 | | http://LGonQn.Org/www/Chris.Phillips cell: (416)505-3610 | "EPIC stands for Expects Perfectly Intuitive Compilers" P. Bannon http://www.hazmatmodine.com NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. "blah blah blah - Ginger!" -- -- From jfabriko at redhat.com Wed Oct 24 07:39:28 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Wed, 24 Oct 2012 16:39:28 +0200 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "set" tests In-Reply-To: <50857534.9020206@redhat.com> References: <506C75F2.7010505@redhat.com> <5075D156.90604@redhat.com> <50855E32.3090505@redhat.com> <50857534.9020206@redhat.com> Message-ID: <5087FDA0.2030304@redhat.com> Hello Adam, thanks again. The reproducer seems much simpler already:-) I incorporated the comments in new version of the patch (the attached file). - the initializations of variables really could be simplified, so i did it. - the AssertFalse(has there been an error or exception) was not included , since all the tests pass in this version, maybe if there is some typical error/exception in the future use, it would make sense, Jana On 10/22/2012 06:32 PM, Adam Domurad wrote: > On 10/22/2012 10:54 AM, Jana Fabrikova wrote: >> Hello Adam, >> >> thank you for the comments. I modified the JSToJSet reproducer >> according to your suggestions, please see the attached patch (new >> version of the JSToJSet reproducer). > > Thank you very much for the update! I don't mean to torture you with > rewrites, but I do find this a lot more tasteful :). > > Overall looks a lot better, small comments inline. > >> >> The behaviour when using eval and reflection is different in 2 ways: >> - the testcase arrayBeyondLength was meaningless from the Java side, >> so it is not included >> - all the testcases look only at the string output, so the values are >> tested, but the types are not (I guess this is not a problem, since >> the variables in Java have its defined types and a problem will occur >> if JS tries to set a variable to a value of a bad type anyway), > > Sounds fine to me. > >> >> Jana >> > >> diff --git a/adding_JSToJSet_reproducer_improved.patch >> b/adding_JSToJSet_reproducer_improved.patch >> new file mode 100644 >> diff --git a/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html >> b/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html >> new file mode 100644 >> --- /dev/null >> +++ b/tests/reproducers/simple/JSToJSet/resources/JSToJSet.html >> @@ -0,0 +1,25 @@ >> + >> + >> + >> + JavaScript to Java LiveConnect - Set values from applet >> + >> + >> + >> + >> + >> + >> + >> +

The JSToJSet html page

>> + >> + > id="jstojSetApplet" MAYSCRIPT> >> + >> + >> + >> +
>> + >> + >> + >> + >> + >> diff --git >> a/tests/reproducers/simple/JSToJSet/resources/JSToJava_Set.js >> b/tests/reproducers/simple/JSToJSet/resources/JSToJava_Set.js >> new file mode 100644 >> --- /dev/null >> +++ b/tests/reproducers/simple/JSToJSet/resources/JSToJava_Set.js >> @@ -0,0 +1,39 @@ >> +function doSetTests( ){ >> + >> + var urlArgs = document.URL.split("?"); >> + var testParams = urlArgs[1].split(";"); >> + var applet = document.getElementById('jstojSetApplet'); >> + var field = testParams[0]; >> + var value = testParams[1]; >> + >> + if( value === "JavaScript"){ >> + if( field === "_char"){ >> + value = 97; >> + } >> + >> + if( field === "_Character"){ >> + value = new (applet.Packages).java.lang.Character(65); >> + } >> + >> + if( field === "_specialString"){ >> + value = "????$????"; >> + } >> + }else if(value.indexOf('[') != -1){ >> + >> + var elem = value.substring(1); >> + value = new Array(); >> + eval('value[0] = elem'); >> + >> + } >> + >> + eval('applet.' + field + '= value'); >> + >> + //modifiing _intArray[0] into _intArray >> + // _DoubleArray[0] into _DoubleArray >> + var nameEnd = field.indexOf('['); >> + if( nameEnd != -1){ >> + field = field.substring(0,nameEnd); >> + } >> + >> + applet.printNewValueAndFinish(field); >> +} >> diff --git >> a/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp >> b/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp >> new file mode 100644 >> --- /dev/null >> +++ b/tests/reproducers/simple/JSToJSet/resources/jstoj-set.jnlp >> @@ -0,0 +1,21 @@ >> + >> + >> + >> + JavaScript to Java LiveConnect - Set >> + RedHat >> + > href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> >> >> + LiveConnect - tests for setting members on Java >> side. >> + >> + >> + >> + > + href="http://java.sun.com/products/autodl/j2se"/> >> + >> + >> + > + name="JS to J Set" >> + main-class="JSToJSet" >> + width="1000" >> + height="100"> >> + >> + >> diff --git a/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java >> b/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java >> new file mode 100644 >> --- /dev/null >> +++ b/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java >> @@ -0,0 +1,73 @@ >> +import java.applet.*; >> +import java.awt.*; >> +import java.lang.reflect.Array; >> +import java.lang.reflect.Field; >> + >> +public class JSToJSet extends Applet { >> + >> + public int _int; >> + public double _double; >> + public float _float; >> + public long _long; >> + public boolean _boolean; >> + public char _char; >> + public byte _byte; >> + public String _String; >> + public String _specialString; >> + public Object _Object; >> + public int[] _intArray = new int[1]; >> + public Integer _Integer; >> + public Double _Double; >> + public Float _Float; >> + public Long _Long; >> + public Boolean _Boolean; >> + public Character _Character; >> + public Byte _Byte; >> + public Double[] _DoubleArray = new Double[10]; >> + public Double[] _DoubleArray2 = null; >> + public char[] _charArray = new char[1]; >> + public Character[] _CharacterArray = new Character[1]; >> + >> + public void init() { >> + String initStr = "JSToJSet applet initialized."; >> + System.out.println(initStr); >> + >> + // setting up variables that will be accessed by JS >> + _int = 0; >> + _double = 0.0; >> + _float = 0F; >> + _long = 0L; >> + _boolean = false; >> + _char = 'A'; >> + _byte = 0; > > Can you remove all the assignments that are already default for members > ( I may be missing a reason why not, in which case do say so)? > (In Java all numbers default to 0, booleans default to false, objects to > null.) > >> + _String = ""; >> + _specialString = ""; >> + _Object = new String("non-null object"); > > I think it'd be clearer and shorter if the _Object assignment was in the > _Object definition. > >> + _Integer = 0; >> + _Double = 0.0; >> + _Float = 0F; >> + _Long = 0L; >> + _Boolean = false; >> + _Character = 'B'; > > Similarly, anything that isn't default can be moved to the definition. > >> + _Byte = null; >> + >> + _intArray[0] = 0; >> + _DoubleArray[0] = 0.0; > > The 0s are already default contents and not needed (unless theres a need > for the assignment that I'm missing). > >> + >> + String setupStr = "JSToJSet applet set up for SET tests."; >> + System.out.println(setupStr); >> + >> + } >> + >> + public void printNewValueAndFinish(String fieldname) throws Exception { >> + Field field = getClass().getDeclaredField(fieldname); >> + Object value = field.get(this); >> + if (value != null && value.getClass().isArray()) { >> + System.out.println("New array value is: " + Array.get(value, 0)); >> + } else { >> + System.out.println("New value is: " + value); >> + } >> + System.out.println("afterTests"); >> + } >> + >> +} >> diff --git >> a/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java >> b/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java >> new file mode 100644 >> --- /dev/null >> +++ b/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java >> @@ -0,0 +1,258 @@ >> +/* JSToJSetTest.java >> +Copyright (C) 2012 Red Hat, Inc. >> + >> +This file is part of IcedTea. >> + >> +IcedTea is free software; you can redistribute it and/or >> +modify it under the terms of the GNU General Public License as >> published by >> +the Free Software Foundation, version 2. >> + >> +IcedTea is distributed in the hope that it will be useful, >> +but WITHOUT ANY WARRANTY; without even the implied warranty of >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> +General Public License for more details. >> + >> +You should have received a copy of the GNU General Public License >> +along with IcedTea; see the file COPYING. If not, write to >> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >> Boston, MA >> +02110-1301 USA. >> + >> +Linking this library statically or dynamically with other modules is >> +making a combined work based on this library. Thus, the terms and >> +conditions of the GNU General Public License cover the whole >> +combination. >> + >> +As a special exception, the copyright holders of this library give you >> +permission to link this library with independent modules to produce an >> +executable, regardless of the license terms of these independent >> +modules, and to copy and distribute the resulting executable under >> +terms of your choice, provided that you also meet, for each linked >> +independent module, the terms and conditions of the license of that >> +module. An independent module is a module which is not derived from >> +or based on this library. If you modify this library, you may extend >> +this exception to your version of the library, but you are not >> +obligated to do so. If you do not wish to do so, delete this >> +exception statement from your version. >> + */ >> + >> +import net.sourceforge.jnlp.ProcessResult; >> +import net.sourceforge.jnlp.ServerAccess; >> +import net.sourceforge.jnlp.browsertesting.BrowserTest; >> +import net.sourceforge.jnlp.browsertesting.Browsers; >> +import net.sourceforge.jnlp.closinglisteners.CountingClosingListener; >> +import net.sourceforge.jnlp.annotations.NeedsDisplay; >> +import net.sourceforge.jnlp.annotations.TestInBrowsers; >> +import org.junit.Assert; >> + >> +import org.junit.Test; >> + >> +public class JSToJSetTest extends BrowserTest { >> + >> + private final String exceptionStr = "xception"; >> + private final String errorStr = "rror"; >> + private final String initStr = "JSToJSet applet initialized."; >> + private final String setupStr = "JSToJSet applet set up for SET >> tests."; >> + private final String afterStr = "afterTests"; >> + >> + private class CountingClosingListenerImpl extends >> CountingClosingListener { >> + >> + @Override >> + protected boolean isAlowedToFinish(String s) { >> + if (s.contains(exceptionStr) || s.contains(errorStr)) { >> + return true; >> + } >> + return (s.contains(initStr) && s.contains(setupStr) && >> s.contains(afterStr)); >> + } >> + } >> + >> + private void evaluateStdoutContents(String expectedStdout, >> ProcessResult pr) { >> + // Assert that the applet was initialized. >> + Assert.assertTrue("JSToJSetTest stdout should contain \"" + initStr >> + + "\" but it didn't.", pr.stdout.contains(initStr)); >> + >> + // Assert that the applet was set up for the SM tests. >> + Assert.assertTrue("JSToJSetTest stdout should contain \"" + setupStr >> + + "\" but it didn't.", pr.stdout.contains(setupStr)); >> + >> + // Assert that there were no errors / exceptions >> + Assert.assertFalse("There were problems: "+pr.stdout, >> + pr.stdout.contains(errorStr) || pr.stdout.contains(exceptionStr) ); > > Unless I'm missing something here, this should be checking stderr > (uncaught exceptions always print in standard error). > > Another issue here though is that the applet can randomly print > exceptions when the applet window is closed. > This will cause the tests to erroneously come up as failures. I would > recommend checking one or more specific exceptions that are likely to > occur, and generally assume that the test will fail on the next > 'assertTrue' if an exception interrupts normal execution. > >> + >> + // Assert that the values set by JavaScript are ok >> + Assert.assertTrue("The output should be: "+expectedStdout+", but is: >> "+pr.stdout, >> + pr.stdout.contains(expectedStdout)); >> + >> + } >> + >> + private void jsToJavaSetNormalTest(String fieldStr, String valueStr) >> throws Exception { >> + String strURL = "/JSToJSet.html?" + fieldStr + ";" + valueStr; >> + ProcessResult pr = server.executeBrowser(strURL, new >> CountingClosingListenerImpl(), new CountingClosingListenerImpl()); >> + String expectedStdout = "New value is: " + valueStr; >> + evaluateStdoutContents(expectedStdout, pr); >> + } >> + >> + private void jsToJavaSetSpecialTest(String fieldStr, String >> valueStr, int testType) throws Exception { >> + String strURL = "/JSToJSet.html?"; >> + String expectedStdout = ""; >> + switch( testType ){ >> + case 0://array element >> + strURL += fieldStr + ";" + valueStr; >> + expectedStdout = "New array value is: "+valueStr; >> + break; >> + case 1://whole array, set 1st element >> + strURL += fieldStr + ";[" + valueStr; >> + expectedStdout = "New array value is: "+valueStr; >> + break; >> + case 2://char et al - to be set at JS side >> + strURL += fieldStr + ";JavaScript"; >> + expectedStdout = "New value is: "+valueStr; >> + break; >> + default: >> + break; >> + } >> + >> + ProcessResult pr = server.executeBrowser(strURL, new >> CountingClosingListenerImpl(), new CountingClosingListenerImpl()); >> + evaluateStdoutContents(expectedStdout, pr); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_int_Test() throws Exception { >> + jsToJavaSetNormalTest("_int", "1"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_double_Test() throws Exception { >> + jsToJavaSetNormalTest("_double", "1.0"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_float_Test() throws Exception { >> + jsToJavaSetNormalTest("_float", "1.1"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_long_Test() throws Exception { >> + jsToJavaSetNormalTest("_long", "10000"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_boolean_Test() throws Exception { >> + jsToJavaSetNormalTest("_boolean", "true"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_char_Test() throws Exception { >> + jsToJavaSetSpecialTest("_char", "a", 2); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_byte_Test() throws Exception { >> + jsToJavaSetNormalTest("_byte", "10"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_intArrayElement_Test() throws Exception { >> + jsToJavaSetSpecialTest("_intArray[0]", "1", 0); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_regularString_Test() throws Exception { >> + jsToJavaSetNormalTest("_String", "teststring"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_specialCharsString_Test() throws Exception { >> + jsToJavaSetSpecialTest("_specialString", "????$????", 2); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_null_Test() throws Exception { >> + jsToJavaSetNormalTest("_Object", "null"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_Integer_Test() throws Exception { >> + jsToJavaSetNormalTest("_Integer", "1"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_Double_Test() throws Exception { >> + jsToJavaSetNormalTest("_Double", "1.0"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_Float_Test() throws Exception { >> + jsToJavaSetNormalTest("_Float", "1.1"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_Long_Test() throws Exception { >> + jsToJavaSetNormalTest("_Long", "10000"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_Boolean_Test() throws Exception { >> + jsToJavaSetNormalTest("_Boolean", "true"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_Character_Test() throws Exception { >> + jsToJavaSetSpecialTest("_Character", "A", 2); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_Byte_Test() throws Exception { >> + jsToJavaSetNormalTest("_Byte", "100"); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_DoubleArrayElement_Test() throws Exception { >> + jsToJavaSetSpecialTest("_DoubleArray[0]", "1.1", 0); >> + } >> + >> + @Test >> + @TestInBrowsers(testIn = { Browsers.all }) >> + @NeedsDisplay >> + public void AppletJSToJSet_DoubleFullArray_Test() throws Exception { >> + jsToJavaSetSpecialTest("_DoubleArray", "0.1", 1); >> + } >> + >> +} > > Good work! Really. It's structured a lot more like a test should be now > (with the testcases/ test class responsible for determining if a test > passes or fails). > Very close to push-ready. > > Cheers, > - Adam > > -------------- next part -------------- A non-text attachment was scrubbed... Name: adding_JSToJSet_reproducer_2ndcorrection.patch Type: text/x-patch Size: 14035 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121024/22f87962/adding_JSToJSet_reproducer_2ndcorrection.patch From ahughes at redhat.com Wed Oct 24 09:20:41 2012 From: ahughes at redhat.com (Andrew Hughes) Date: Wed, 24 Oct 2012 12:20:41 -0400 (EDT) Subject: Serviceability Agent In-Reply-To: <1115594875.5759057.1351095105857.JavaMail.root@redhat.com> Message-ID: <484330286.5764512.1351095640998.JavaMail.root@redhat.com> I've noticed the following patch in OpenJDK8's HotSpot: changeset: 3593:a9fed06c01d2 user: bpittore date: Thu Aug 30 11:20:01 2012 -0400 summary: 7154641: Servicability agent should work on platforms other than x86, sparc http://hg.openjdk.java.net/jdk8/jdk8/hotspot/rev/a9fed06c01d2 Discussion: http://mail.openjdk.java.net/pipermail/serviceability-dev/2012-August/006709.html This changes the serviceability agent to search for additional CPU support rather than just failing. I notice they didn't actually add the code to support those CPUs, and I imagine that's why: + try { + Class pic = Class.forName("sun.jvm.hotspot.utilities.PlatformInfoClosed"); + AltPlatformInfo api = (AltPlatformInfo)pic.newInstance(); + if (api.knownCPU(cpu)) { + return cpu; + } + } catch (Exception e) {} and: +ifeq ($(HS_ALT_MAKE),) + ifneq ($(OPENJDK),true) + HS_ALT_MAKE=$(GAMMADIR)/make/closed + else + HS_ALT_MAKE=NO_SUCH_PATH + endif +endif were added. After this change, only ia64 and zero don't have the agent. In the case of Zero, do we know why this is? And do we intend to get it working on Zero and, for that matter, Shark & the ARM ports? -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From andrew at icedtea.classpath.org Wed Oct 24 09:47:44 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 24 Oct 2012 16:47:44 +0000 Subject: /hg/release/icedtea7-2.1: Correct bad CVE number given by Oracle. Message-ID: changeset 815ed44765eb in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=815ed44765eb author: Andrew John Hughes date: Wed Oct 24 17:47:28 2012 +0100 Correct bad CVE number given by Oracle. 2012-10-24 Andrew John Hughes * NEWS: Corrected bad CVE number given by Oracle. diffstat: ChangeLog | 7 ++++++- NEWS | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diffs (26 lines): diff -r 686b4a5790d1 -r 815ed44765eb ChangeLog --- a/ChangeLog Wed Oct 24 12:17:29 2012 +0100 +++ b/ChangeLog Wed Oct 24 17:47:28 2012 +0100 @@ -1,4 +1,9 @@ -2012-10-21 Andrew John Hughes +2012-10-24 Andrew John Hughes + + * NEWS: Corrected bad CVE number + given by Oracle. + +2012-10-24 Andrew John Hughes * configure.ac: Bump to 2.1.4pre. * NEWS: Add new release. diff -r 686b4a5790d1 -r 815ed44765eb NEWS --- a/NEWS Wed Oct 24 12:17:29 2012 +0100 +++ b/NEWS Wed Oct 24 17:47:28 2012 +0100 @@ -34,7 +34,7 @@ - S7195194, CVE-2012-5084: Better data validation for Swing - S7195549, CVE-2012-5087: Better bean object persistence - S7195917, CVE-2012-5086: XMLDecoder parsing at close-time should be improved - - S7195919, CVE-2012-5979: (sl) ServiceLoader can throw CCE without needing to create instance + - S7195919, CVE-2012-5079: (sl) ServiceLoader can throw CCE without needing to create instance - S7196190, CVE-2012-5088: Improve method of handling MethodHandles - S7198296, CVE-2012-5089: Refactor classloader usage - S7158801: Improve VM CompileOnly option From adomurad at redhat.com Wed Oct 24 10:15:25 2012 From: adomurad at redhat.com (Adam Domurad) Date: Wed, 24 Oct 2012 13:15:25 -0400 Subject: [rfc][icedtea-web] a new reproducer LiveConnect "set" tests In-Reply-To: <5087FDA0.2030304@redhat.com> References: <506C75F2.7010505@redhat.com> <5075D156.90604@redhat.com> <50855E32.3090505@redhat.com> <50857534.9020206@redhat.com> <5087FDA0.2030304@redhat.com> Message-ID: <5088222D.5030906@redhat.com> On 10/24/2012 10:39 AM, Jana Fabrikova wrote: > Hello Adam, thanks again. The reproducer seems much simpler already:-) > > I incorporated the comments in new version of the patch (the attached > file). > > - the initializations of variables really could be simplified, so i > did it. > - the AssertFalse(has there been an error or exception) was not > included , since all the tests pass in this version, maybe if there is > some typical error/exception in the future use, it would make sense, > > Jana > Thanks for sticking with it, looks good to me! OK to push to HEAD. Thanks, - Adam From bugzilla-daemon at icedtea.classpath.org Wed Oct 24 21:29:05 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 25 Oct 2012 04:29:05 +0000 Subject: [Bug 1203] New: 'make icedtea-debug' results in unusable hotspot[*].stp tapsets Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1203 Priority: P3 Bug ID: 1203 CC: unassigned at icedtea.classpath.org Assignee: mark at klomp.org Summary: 'make icedtea-debug' results in unusable hotspot[*].stp tapsets Severity: normal Classification: Unclassified OS: Linux Reporter: jon.vanalten at redhat.com Hardware: x86_64 Status: NEW Version: 7-hg Component: SystemTap Product: IcedTea These tapsets refer to symbols in both the client and server libjvm.so. Both icedtea.stamp and icedtea-debug.stamp targets have a check to see if the current build includes client vm, and the references to client libjvm.so are stripped in the build version of these .stp files if client vm will not be there. But, it seems like this is not working properly in the debug build, as the files are unstripped. Attempting to use probes from this tapset then result in errors. I see this when building on amd64, with only --enable-systemtap and --disable-bootstrap passed to configure. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121025/8942d8c5/attachment.html From vanaltj at icedtea.classpath.org Wed Oct 24 22:00:50 2012 From: vanaltj at icedtea.classpath.org (vanaltj at icedtea.classpath.org) Date: Thu, 25 Oct 2012 05:00:50 +0000 Subject: /hg/icedtea7: Enhanced garbage collection dtrace/systemtap instr... Message-ID: changeset 86d2b1dac5ce in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=86d2b1dac5ce author: Lukas Berk date: Wed Oct 24 21:58:03 2012 -0400 Enhanced garbage collection dtrace/systemtap instrumentation. 2012-10-24 Lukas Berk * Makefile.am: (ICEDTEA_PATCHES): Add patches/systemtap.patch. (EXTRA_DIST): Add tapset/hotspot_gc.stp.in. (stamps/icedtea.stamp): Build tapset/hotspot_gc.stp. (stamps/icedtea-debug.stamp): Likewise. * configure.ac: Generate tapset/hotspot_gc.stp. * patches/systemtap_gc.patch: Add Garbage Collection dtrace/systemtap probes to hotspot. * tapset/hotspot_gc.stp.in: Systemtap tapset allowing use of GC probes more comfortablely. diffstat: ChangeLog | 13 + Makefile.am | 15 +- configure.ac | 1 + patches/systemtap_gc.patch | 369 +++++++++++++++++++++++++++++++ tapset/hotspot_gc.stp.in | 534 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 931 insertions(+), 1 deletions(-) diffs (truncated from 998 to 500 lines): diff -r 67d42446bc25 -r 86d2b1dac5ce ChangeLog --- a/ChangeLog Wed Sep 26 14:52:49 2012 +0100 +++ b/ChangeLog Wed Oct 24 21:58:03 2012 -0400 @@ -1,3 +1,16 @@ +2012-10-24 Lukas Berk + + * Makefile.am: + (ICEDTEA_PATCHES): Add patches/systemtap.patch. + (EXTRA_DIST): Add tapset/hotspot_gc.stp.in. + (stamps/icedtea.stamp): Build tapset/hotspot_gc.stp. + (stamps/icedtea-debug.stamp): Likewise. + * configure.ac: Generate tapset/hotspot_gc.stp. + * patches/systemtap_gc.patch: + Add Garbage Collection dtrace/systemtap probes to hotspot. + * tapset/hotspot_gc.stp.in: + Systemtap tapset allowing use of GC probes more comfortablely. + 2012-09-25 Andrew John Hughes * Makefile.am: diff -r 67d42446bc25 -r 86d2b1dac5ce Makefile.am --- a/Makefile.am Wed Sep 26 14:52:49 2012 +0100 +++ b/Makefile.am Wed Oct 24 21:58:03 2012 -0400 @@ -286,7 +286,9 @@ endif if ENABLE_SYSTEMTAP -ICEDTEA_PATCHES += patches/systemtap.patch +ICEDTEA_PATCHES += \ + patches/systemtap.patch \ + patches/systemtap_gc.patch endif if ENABLE_NSS @@ -760,6 +762,7 @@ tapset/hotspot.stp.in \ tapset/hotspot_jni.stp.in \ tapset/jstack.stp.in \ + tapset/hotspot_gc.stp.in \ scripts/jni_create_stap.c \ scripts/jni_desc \ rewriter/agpl-3.0.txt \ @@ -1726,11 +1729,16 @@ sed -e '/\/client\/libjvm.so/d' \ < $(abs_top_builddir)/tapset/hotspot_jni.stp \ > $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_jni.stp; \ + sed -e '/\/client\/libjvm.so/d' \ + < $(abs_top_builddir)/tapset/hotspot_gc.stp \ + > $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_gc.stp; \ else \ cp $(abs_top_builddir)/tapset/hotspot.stp \ $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot.stp; \ cp $(abs_top_builddir)/tapset/hotspot_jni.stp \ $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_jni.stp; \ + cp $(abs_top_builddir)/tapset/hotspot_gc.stp \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_gc.stp; \ fi; \ cp $(abs_top_builddir)/tapset/jstack.stp \ $(BUILD_OUTPUT_DIR)/j2sdk-image/tapset/jstack.stp @@ -1792,11 +1800,16 @@ sed -e '/\/client\/libjvm.so/d' \ < $(abs_top_builddir)/tapset/hotspot_jni.stp \ > $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_jni.stp; \ + sed -e '/\/client\/libjvm.so/d' \ + < $(abs_top_builddir)/tapset/hotspot_gc.stp \ + > $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_gc.stp; \ else \ cp $(abs_top_builddir)/tapset/hotspot.stp \ $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot.stp; \ cp $(abs_top_builddir)/tapset/hotspot_jni.stp \ $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_jni.stp; \ + cp $(abs_top_builddir)/tapset/hotspot_gc.stp \ + $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/hotspot_gc.stp; \ fi; \ cp $(abs_top_builddir)/tapset/jstack.stp \ $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/tapset/jstack.stp diff -r 67d42446bc25 -r 86d2b1dac5ce configure.ac --- a/configure.ac Wed Sep 26 14:52:49 2012 +0100 +++ b/configure.ac Wed Oct 24 21:58:03 2012 -0400 @@ -305,6 +305,7 @@ AC_CONFIG_FILES([tapset/hotspot.stp]) AC_CONFIG_FILES([tapset/hotspot_jni.stp]) AC_CONFIG_FILES([tapset/jstack.stp]) + AC_CONFIG_FILES([tapset/hotspot_gc.stp]) fi dnl Check for libXtst headers and libraries. diff -r 67d42446bc25 -r 86d2b1dac5ce patches/systemtap_gc.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/systemtap_gc.patch Wed Oct 24 21:58:03 2012 -0400 @@ -0,0 +1,369 @@ +--- openjdk.orig/hotspot/src/share/vm/compiler/oopMap.cpp 2012-06-26 09:24:22.390325184 -0400 ++++ openjdk/hotspot/src/share/vm/compiler/oopMap.cpp 2012-07-06 10:12:44.981413003 -0400 +@@ -33,9 +33,13 @@ + #include "memory/resourceArea.hpp" + #include "runtime/frame.inline.hpp" + #include "runtime/signature.hpp" ++#include "utilities/dtrace.hpp" + #ifdef COMPILER1 + #include "c1/c1_Defs.hpp" + #endif ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL1(provider, gc__collection__delete, *uintptr_t); ++#endif /* !USDT2 */ + + // OopMapStream + +@@ -677,6 +681,9 @@ + " - Derived: " INTPTR_FORMAT " Base: " INTPTR_FORMAT " (Offset: %d)", + derived_loc, (address)*derived_loc, (address)base, offset); + } ++#ifndef USDT2 ++ HS_DTRACE_PROBE1(hotspot, gc__collection__delete, entry); ++#endif /* !USDT2 */ + + // Delete entry + delete entry; +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2012-07-12 09:48:40.349999515 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2012-07-19 18:38:07.560757426 -0400 +@@ -53,11 +53,18 @@ + #include "runtime/vmThread.hpp" + #include "services/management.hpp" + #include "services/memoryService.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/events.hpp" + #include "utilities/stack.inline.hpp" + + #include + ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__ParallelCompact__clear, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__parallel__collect, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__move, *uintptr_t, *uintptr_t, *uintptr_t, *uintptr_t); ++#endif /* !USDT2 */ ++ + // All sizes are in HeapWords. + const size_t ParallelCompactData::Log2RegionSize = 9; // 512 words + const size_t ParallelCompactData::RegionSize = (size_t)1 << Log2RegionSize; +@@ -433,6 +439,9 @@ + + void ParallelCompactData::clear() + { ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__ParallelCompact__clear, &_region_data, _region_data->data_location()); ++#endif /* !USDT2 */ + memset(_region_data, 0, _region_vspace->committed_size()); + } + +@@ -1970,6 +1979,9 @@ + "should be in vm thread"); + + ParallelScavengeHeap* heap = gc_heap(); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__parallel__collect, heap, heap->gc_cause()); ++#endif /* !USDT2 */ + GCCause::Cause gc_cause = heap->gc_cause(); + assert(!heap->is_gc_active(), "not reentrant"); + +@@ -3376,6 +3388,9 @@ + // past the end of the partial object entering the region (if any). + HeapWord* const dest_addr = sd.partial_obj_end(dp_region); + HeapWord* const new_top = _space_info[space_id].new_top(); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__move, &beg_addr, &end_addr, &dest_addr, &new_top); ++#endif /* !USDT2 */ + assert(new_top >= dest_addr, "bad new_top value"); + const size_t words = pointer_delta(new_top, dest_addr); + +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp 2012-08-15 12:04:43.837439833 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp 2012-08-15 12:01:47.897745719 -0400 +@@ -45,8 +45,13 @@ + #include "runtime/thread.hpp" + #include "runtime/vmThread.hpp" + #include "utilities/copy.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/events.hpp" + ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__G1__begin, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__G1__end, *uintptr_t, *uintptr_t); ++ #endif /* !USDT2 */ + class HeapRegion; + + void G1MarkSweep::invoke_at_safepoint(ReferenceProcessor* rp, +@@ -84,6 +89,9 @@ + // The marking doesn't preserve the marks of biased objects. + BiasedLocking::preserve_marks(); + ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__G1__begin, &sh, sh->gc_cause()); ++#endif /* !USDT2 */ + mark_sweep_phase1(marked_for_unloading, clear_all_softrefs); + + mark_sweep_phase2(); +@@ -103,6 +111,9 @@ + GenRemSet* rs = sh->rem_set(); + rs->invalidate(sh->perm_gen()->used_region(), true /*whole_heap*/); + ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__G1__end, &sh, sh->gc_cause()); ++#endif /* !USDT2 */ + // "free at last gc" is calculated from these. + // CHF: cheating for now!!! + // Universe::set_heap_capacity_at_last_gc(Universe::heap()->capacity()); +--- openjdk.orig/hotspot/src/share/vm/memory/tenuredGeneration.cpp 2012-08-15 12:03:43.009543167 -0400 ++++ openjdk/hotspot/src/share/vm/memory/tenuredGeneration.cpp 2012-08-15 12:14:25.414381449 -0400 +@@ -33,6 +33,12 @@ + #include "memory/tenuredGeneration.hpp" + #include "oops/oop.inline.hpp" + #include "runtime/java.hpp" ++#include "utilities/dtrace.hpp" ++ ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__tenured__begin, bool, bool, size_t, bool); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__tenured__end, bool, bool, size_t, bool); ++#endif /* !USDT2 */ + + TenuredGeneration::TenuredGeneration(ReservedSpace rs, + size_t initial_byte_size, int level, +@@ -307,8 +313,14 @@ + size_t size, + bool is_tlab) { + retire_alloc_buffers_before_full_gc(); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__tenured__begin, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + OneContigSpaceCardGeneration::collect(full, clear_all_soft_refs, + size, is_tlab); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__tenured__end, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + } + + void TenuredGeneration::update_gc_stats(int current_level, +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2012-08-15 12:03:43.039543116 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2012-08-15 12:18:57.181932342 -0400 +@@ -49,6 +49,12 @@ + #include "utilities/copy.hpp" + #include "utilities/globalDefinitions.hpp" + #include "utilities/workgroup.hpp" ++#include "utilities/dtrace.hpp" ++ ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__parnew__begin, bool, bool, size_t, bool); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__parnew__end, bool, bool, size_t, bool); ++#endif /* !USDT2 */ + + #ifdef _MSC_VER + #pragma warning( push ) +@@ -878,6 +884,9 @@ + bool clear_all_soft_refs, + size_t size, + bool is_tlab) { ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__parnew__begin, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + assert(full || size > 0, "otherwise we don't want to collect"); + GenCollectedHeap* gch = GenCollectedHeap::heap(); + assert(gch->kind() == CollectedHeap::GenCollectedHeap, +@@ -1032,6 +1041,10 @@ + gch->print_heap_change(gch_prev_used); + } + ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__parnew__end, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ ++ + if (PrintGCDetails && ParallelGCVerbose) { + TASKQUEUE_STATS_ONLY(thread_state_set.print_termination_stats()); + TASKQUEUE_STATS_ONLY(thread_state_set.print_taskqueue_stats()); +--- openjdk.orig/hotspot/src/share/vm/memory/defNewGeneration.cpp 2012-08-15 12:03:43.010543164 -0400 ++++ openjdk/hotspot/src/share/vm/memory/defNewGeneration.cpp 2012-08-15 12:21:41.076673646 -0400 +@@ -38,6 +38,7 @@ + #include "oops/oop.inline.hpp" + #include "runtime/java.hpp" + #include "utilities/copy.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/stack.inline.hpp" + #ifdef TARGET_OS_FAMILY_linux + # include "thread_linux.inline.hpp" +@@ -51,7 +52,10 @@ + #ifdef TARGET_OS_FAMILY_bsd + # include "thread_bsd.inline.hpp" + #endif +- ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__defnew__begin, bool, bool, size_t, bool); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__defnew__end, bool, bool, size_t, bool); ++#endif /* !USDT2 */ + // + // DefNewGeneration functions. + +@@ -528,6 +532,9 @@ + bool clear_all_soft_refs, + size_t size, + bool is_tlab) { ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__defnew__begin, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + assert(full || size > 0, "otherwise we don't want to collect"); + GenCollectedHeap* gch = GenCollectedHeap::heap(); + _next_gen = gch->next_gen(this); +@@ -661,6 +668,10 @@ + // does not guarantee monotonicity. + jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC; + update_time_of_last_gc(now); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__defnew__end, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ ++ + } + + class RemoveForwardPointerClosure: public ObjectClosure { +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2012-08-15 12:03:43.044543106 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2012-08-15 12:25:26.632316692 -0400 +@@ -55,6 +55,12 @@ + #include "runtime/vmThread.hpp" + #include "services/memoryService.hpp" + #include "services/runtimeService.hpp" ++#include "utilities/dtrace.hpp" ++ ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__begin, bool, bool, size_t, bool); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__end, bool, bool, size_t, bool); ++#endif /* !USDT2 */ + + // statics + CMSCollector* ConcurrentMarkSweepGeneration::_collector = NULL; +@@ -1647,7 +1653,13 @@ + size_t size, + bool tlab) + { ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__contig__begin, full, clear_all_soft_refs, size, tlab); ++#endif /* !USDT2 */ + collector()->collect(full, clear_all_soft_refs, size, tlab); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__contig__end, full, clear_all_soft_refs, size, tlab); ++#endif /* !USDT2 */ + } + + void CMSCollector::collect(bool full, +--- openjdk.orig/hotspot/src/share/vm/memory/generation.cpp 2012-08-15 12:03:43.009543167 -0400 ++++ openjdk/hotspot/src/share/vm/memory/generation.cpp 2012-08-15 12:27:46.378095083 -0400 +@@ -39,8 +39,14 @@ + #include "oops/oop.inline.hpp" + #include "runtime/java.hpp" + #include "utilities/copy.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/events.hpp" + ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__begin, bool, bool, size_t, bool); ++ HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__end, bool, bool, size_t, bool); ++#endif /* !USDT2 */ ++ + Generation::Generation(ReservedSpace rs, size_t initial_size, int level) : + _level(level), + _ref_processor(NULL) { +@@ -470,7 +476,13 @@ + // refs discovery is over the entire heap, not just this generation + ReferenceProcessorSpanMutator + x(ref_processor(), GenCollectedHeap::heap()->reserved_region()); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__contig__begin, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + GenMarkSweep::invoke_at_safepoint(_level, ref_processor(), clear_all_soft_refs); ++#ifndef USDT2 ++ HS_DTRACE_PROBE4(hotspot, gc__collection__contig__end, full, clear_all_soft_refs, size, is_tlab); ++#endif /* !USDT2 */ + SpecializationStats::print(); + } + +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp 2012-07-25 13:24:07.000000000 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp 2012-08-17 10:26:44.181117802 -0400 +@@ -51,8 +51,17 @@ + #include "runtime/vmThread.hpp" + #include "runtime/vm_operations.hpp" + #include "services/memoryService.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/stack.inline.hpp" + ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSScavenge__begin, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSScavenge__end, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSParallelCompact__begin, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSParallelCompact__end, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSMarkSweep__begin, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSMarkSweep__end, *uintptr_t, *uintptr_t); ++#endif /* !USDT2 */ + + HeapWord* PSScavenge::_to_space_top_before_gc = NULL; + int PSScavenge::_consecutive_skipped_scavenges = 0; +@@ -226,7 +235,13 @@ + PSAdaptiveSizePolicy* policy = heap->size_policy(); + IsGCActiveMark mark; + ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSScavenge__begin, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + const bool scavenge_done = PSScavenge::invoke_no_policy(); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSScavenge__end, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + const bool need_full_gc = !scavenge_done || + policy->should_full_GC(heap->old_gen()->free_in_bytes()); + bool full_gc_done = false; +@@ -243,9 +258,21 @@ + const bool clear_all_softrefs = cp->should_clear_all_soft_refs(); + + if (UseParallelOldGC) { ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSParallelCompact__begin, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + full_gc_done = PSParallelCompact::invoke_no_policy(clear_all_softrefs); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSParallelCompact__end, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + } else { ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSMarkSweep__begin, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + full_gc_done = PSMarkSweep::invoke_no_policy(clear_all_softrefs); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__PSMarkSweep__end, &heap, heap->gc_cause()); ++#endif /* !USDT2 */ + } + } + +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp 2012-07-25 13:24:07.000000000 -0400 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp 2012-08-31 15:14:23.936576341 -0400 +@@ -40,8 +40,14 @@ + #include "runtime/handles.inline.hpp" + #include "runtime/java.hpp" + #include "runtime/vmThread.hpp" ++#include "utilities/dtrace.hpp" + #include "utilities/vmError.hpp" + ++#ifndef USDT2 ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__parscavenge__heap__begin, *uintptr_t, *uintptr_t); ++ HS_DTRACE_PROBE_DECL2(provider, gc__collection__parscavenge__heap__end, *uintptr_t, *uintptr_t); ++#endif /* !USDT2 */ ++ + PSYoungGen* ParallelScavengeHeap::_young_gen = NULL; + PSOldGen* ParallelScavengeHeap::_old_gen = NULL; + PSPermGen* ParallelScavengeHeap::_perm_gen = NULL; +@@ -806,7 +812,13 @@ + } + + VM_ParallelGCSystemGC op(gc_count, full_gc_count, cause); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__parscavenge__heap__begin, &op, cause); ++#endif /* !USDT2 */ + VMThread::execute(&op); ++#ifndef USDT2 ++ HS_DTRACE_PROBE2(hotspot, gc__collection__parscavenge__heap__end, &op, cause); ++#endif /* !USDT2 */ + } + + // This interface assumes that it's being called by the diff -r 67d42446bc25 -r 86d2b1dac5ce tapset/hotspot_gc.stp.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tapset/hotspot_gc.stp.in Wed Oct 24 21:58:03 2012 -0400 @@ -0,0 +1,534 @@ +/* + * probe - gc_collect_contig_begin + * + * @name: gc_collect_contig_begin + * @is_full: If TRUE, attempt a full collection of the generation. + * Else; perform a scavenge + * @size: The collection should achieve a minimum region of available + * memory to allow for an allocation of 'size'. + * @is_tlab: Is this a Thread Local Allocation Buffer? + * + * Description: This marks the start of a contiguous space generation collection. + * + */ + +probe hotspot.gc_collect_contig_begin = + process("@ABS_CLIENT_LIBJVM_SO@").mark("gc__collection__contig__begin"), + process("@ABS_SERVER_LIBJVM_SO@").mark("gc__collection__contig__begin") +{ + + name = "gc_collect_contig_begin"; + is_full = $arg2; + size = $arg3; + is_tlab = $arg4; + probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab); + +} + +/* + * probe - gc_collect_contig_end + * + * @name: gc_collect_contig_end_ + * @is_full: If TRUE, attempt a full collection of the generation. + * Else; perform a scavenge. + * @size: The collection should achieve a minimum region of available + * memory to allow for an allocation of 'size'. + * @is_tlab: Is this a Thread Local Allocation Buffer? From jvanalte at redhat.com Wed Oct 24 22:02:09 2012 From: jvanalte at redhat.com (Jon VanAlten) Date: Thu, 25 Oct 2012 01:02:09 -0400 (EDT) Subject: [RFC] Enhanced Garbage Collection Probe Points In-Reply-To: <20121023165330.GA3498@redhat.com> Message-ID: <480767885.1600415.1351141329748.JavaMail.root@redhat.com> ----- Original Message ----- > From: "Lukas Berk" > To: "Jon VanAlten" > Cc: systemtap at sourceware.org, distro-pkg-dev at openjdk.java.net > Sent: Tuesday, October 23, 2012 12:53:30 PM > Subject: Re: [RFC] Enhanced Garbage Collection Probe Points > > Hey, > > * Jon VanAlten [2012-09-24 14:16]: > > > > > > > > > > Is this ok to commit? > > > > > > > > > > > > > With caveats noted above, I say yes :) > > > > > > > > > > Thanks! Please let me know if there is anything else you'd like > > > to > > > know, > > > updated patch is attached. > > > > > > > Hi, > > > > This has been in my TODO for some time, so I am very sorry not to > > have responded earlier. From looking at the patch, it seems okay > > now. I intend to push this to HEAD on your behalf, unless someone > > else has some reason why not. (Now is your chance to speak up > > about that, if you have such a reason!). But, I do feel > > responsible > > to build with it myself and verify that things seem to be working > > as > > intended. Various other things have been jumping my work queue, > > but > > I may have time this week to give this a sanity check and finally > > get it into hg. Thanks for persisting! > > > > cheers, > > Jon > > I've updated the patch slightly to reflect a correction in > psScavenge.cpp that was causing a build error when icedtea-debug > wasn't > specified. The rest of the patch is unchanged from before. > And I've now pushed this. I know it's preferred that new work goes to forest in general, but this was discussed earlier when patch was originally posted, and afaict the feeling was it would be better to move all systemtap related patches there in one step some time later[1]. Thanks Lukas for this contribution! cheers, jon [1] http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-August/020066.html From jvanek at redhat.com Thu Oct 25 04:58:09 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 25 Oct 2012 13:58:09 +0200 Subject: [rfc] [icedtea-web] Reproducer for clipboard (reopened PR708) In-Reply-To: <50802E9C.60809@redhat.com> References: <4FC4E990.6090200@redhat.com> <50802E9C.60809@redhat.com> Message-ID: <50892951.1060700@redhat.com> On 10/18/2012 06:30 PM, Adam Domurad wrote: > On 05/29/2012 11:21 AM, Jiri Vanek wrote: >> 2012-05-29 Jiri Vanek >> >> Added clipboard reproducers >> * tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy1.jnlp: >> Jnlp to invoke manual copying to clipboard on signed app, please note >> the delayed death of application >> * tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy2.jnlp: >> Jnlp to invoke jtextfield like copying signed app, please note the >> delayed death of application >> * tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste1.jnlp: >> Jnlp to invoke manual pasting on signed application >> * tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste2.jnlp: >> Jnlp to invoke jtextfield like pasting on signed application >> * tests/jnlp_tests/signed/ClipboardContentSigned/srcs/ClipboardContentSigned.java: >> Application which is trying to access clipboard by various ways. >> * tests/jnlp_tests/signed/ClipboardContentSigned/testcases/ClipboardContentSignedTests.java: >> Automated tests for four above jnlps. >> * tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentCopy1.jnlp: >> Jnlp to invoke manual copying to clipboard on unsigned app, please note >> the delayed death of application >> * tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentCopy2.jnlp: >> Jnlp to invoke jtextfield like copying unsigned app, please note the >> delayed death of application >> * tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentPaste1.jnlp: >> Jnlp to invoke manual pasting on unsigned application >> * tests/jnlp_tests/simple/ClipboardContent/resources/ClipboardContentPaste2.jnlp: >> Jnlp to invoke jtextfield like pasting on unsigned application >> * tests/jnlp_tests/simple/ClipboardContent/srcs/ClipboardContent.java: >> Application which is trying to access clipboard by various ways. >> * tests/jnlp_tests/simple/ClipboardContent/testcases/ClipboardContentTests.java: >> Automated tests for first and third of above four jnlps. The tests of >> second and fourth is disabled due to necessary manual interaction >> >> Hi all ! whatever happens in PR708 this reproducers should remains green ;) >> >> There is one part of in testcases which may be unclear to reviewer, and it is parallel run of >> copier (test/application) and paster (application/test). In way that test have copied to clipboard >> and javaws have paste from it, then there is no issue, because test is eternal running clipboard >> owner (who is waiting for his javaws to finish) so javaws can paste without problems. >> The problem occurred when javaws copied to clipboard and test have to read from it. In this case >> I had to make javaws run in parallel with test for a while (I have 10seconds timeout, and test is >> NOT waiting for it to time-out, I just neede to have clipboard owner (javaws)alive, until I test >> the value. The issue is that when (java as) clipboard owner ends, everything it puts to clipboard >> die with it. >> >> I was on doubt just to test access to clipboard and so get rid of this paralelisation but it did >> not seems to me enough. I would rather test the real value in clipboard. >> >> >> So rfc! Best regards >> J. >> > > Hi Jiri, I remember looking at this a while back, sorry for letting it sit for so long (although you > should have pinged it meanwhile :). > > Thanks for tackling this, comments inline. > >> diff -r 526df16b6e27 >> tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy1.jnlp >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ b/tests/jnlp_tests/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy1.jnlp >> Tue May 29 17:20:14 2012 +0200 >> @@ -0,0 +1,58 @@ >> + + + + + ClipboardContentSignedCopy1 + IcedTea + + ClipboardContentSignedCopy1 + + + + + + + + copy1 + 10 + + + + + diff -r c52fcd37dbd8 -r 2c3a063c1aff tests/reproducers/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy2.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/ClipboardContentSigned/resources/ClipboardContentSignedCopy2.jnlp Fri Oct 26 12:15:18 2012 +0200 @@ -0,0 +1,58 @@ + + + + + ClipboardContentSignedCopy2 + IcedTea + + ClipboardContentSignedCopy2 + + + + + + + + copy2 + 10 + + + + + diff -r c52fcd37dbd8 -r 2c3a063c1aff tests/reproducers/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste1.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste1.jnlp Fri Oct 26 12:15:18 2012 +0200 @@ -0,0 +1,57 @@ + + + + + ClipboardContentSignedPaste1 + IcedTea + + ClipboardContentSignedPaste1 + + + + + + + + paste1 + + + + + diff -r c52fcd37dbd8 -r 2c3a063c1aff tests/reproducers/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste2.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/ClipboardContentSigned/resources/ClipboardContentSignedPaste2.jnlp Fri Oct 26 12:15:18 2012 +0200 @@ -0,0 +1,57 @@ + + + + + ClipboardContentSignedPaste2 + IcedTea + + ClipboardContentSignedPaste2 + + + + + + + + paste2 + + + + + diff -r c52fcd37dbd8 -r 2c3a063c1aff tests/reproducers/signed/ClipboardContentSigned/srcs/ClipboardContentSigned.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/ClipboardContentSigned/srcs/ClipboardContentSigned.java Fri Oct 26 12:15:18 2012 +0200 @@ -0,0 +1,183 @@ +/* ClipboardContentSigned.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + +import java.awt.Toolkit; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.StringSelection; +import java.awt.datatransfer.Transferable; +import java.awt.datatransfer.UnsupportedFlavorException; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.util.concurrent.TimeUnit; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JTextField; +import javax.swing.SwingUtilities; +import javax.swing.text.JTextComponent; + +public class ClipboardContentSigned extends JPanel { + + private static final String contentC = "COPY#$REPRODUCER"; + private static final String contentP = "PASTE#$REPRODUCER"; + + private static class LocalFrame extends JFrame { + + JTextField t; + + public LocalFrame(String str) { + super(); + t = new JTextField(str); + this.add(t); + this.setSize(100, 100); + this.pack(); + t.selectAll(); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + } + + public void run() throws InterruptedException { + SwingUtilities.invokeLater(new Runnable() { + + @Override + public void run() { + setVisible(true); + + } + }); + while (!this.isVisible()) { + Thread.sleep(100); + } + } + + public JTextField getT() { + return t; + } + } + + public void putToClipboard1(String str) { + Toolkit toolkit = Toolkit.getDefaultToolkit(); + Clipboard clipboard = toolkit.getSystemClipboard(); + StringSelection strSel = new StringSelection(str); + clipboard.setContents(strSel, null); + printFlavors(); + } + + public void putToClipboard2(final String str) throws InterruptedException, NoSuchMethodException, IllegalAccessException, UnsupportedFlavorException, IllegalArgumentException, InvocationTargetException, IOException { + final LocalFrame lf = new LocalFrame(str); + lf.run(); + ((JTextComponent) (lf.getT())).copy(); + printFlavors(); + lf.dispose(); + } + + public String pasteFromClipboard2() throws InterruptedException, NoSuchMethodException, IllegalAccessException, UnsupportedFlavorException, IllegalArgumentException, InvocationTargetException, IOException { + final LocalFrame lf = new LocalFrame("xxx"); + lf.run(); + ((JTextComponent) (lf.getT())).paste(); + printFlavors(); + String s = lf.getT().getText(); + lf.dispose(); + return s; + } + + private void printFlavors() { +//just for debugging +// Toolkit toolkit = Toolkit.getDefaultToolkit(); +// Clipboard clipboard = toolkit.getSystemClipboard(); +// Transferable clipData = clipboard.getContents(clipboard); +// DataFlavor[] cd = clipData.getTransferDataFlavors(); +// for (DataFlavor dataFlavor : cd) { +// System.out.println(dataFlavor.getMimeType()); +// } + } + + public String pasteFromClipboard1() throws UnsupportedFlavorException, IOException { + Toolkit toolkit = Toolkit.getDefaultToolkit(); + Clipboard clipboard = toolkit.getSystemClipboard(); + Transferable clipData = clipboard.getContents(clipboard); + printFlavors(); + String s = (String) (clipData.getTransferData( + DataFlavor.stringFlavor)); + return s; + } + + public static void main(String[] args) throws Exception { + ClipboardContentSigned cl = new ClipboardContentSigned(); + if (args.length == 0) { + throw new IllegalArgumentException("at least copy1|2 or paste1|2 must be as argument (+mandatory number giving use timeout in seconds before termination)"); + } else if (args.length == 1) { + cl.proceed(args[0]); + } else { + cl.proceed(args[0], args[1]); + } + + } + + public void proceed(String arg) throws Exception { + proceed(arg, 0); + } + + public void proceed(String arg, String keepAliveFor) throws Exception { + proceed(arg, Long.valueOf(keepAliveFor)); + } + + public void proceed(String arg, long timeOut) throws Exception { + if (arg.equals("copy1")) { + System.out.println(this.getClass().getName() + " copying1 to clipboard " + contentC); + putToClipboard1(contentC); + System.out.println(this.getClass().getName() + " copied1 to clipboard " + pasteFromClipboard1()); + } else if (arg.equals("paste1")) { + System.out.println(this.getClass().getName() + " pasting1 from clipboard "); + String nwContent = pasteFromClipboard1(); + System.out.println(this.getClass().getName() + " pasted1 from clipboard " + nwContent); + } else if (arg.equals("copy2")) { + System.out.println(this.getClass().getName() + " copying2 to clipboard " + contentC); + putToClipboard2(contentC); + System.out.println(this.getClass().getName() + " copied2 to clipboard " + pasteFromClipboard2()); + } else if (arg.equals("paste2")) { + System.out.println(this.getClass().getName() + " pasting2 from clipboard "); + String nwContent = pasteFromClipboard2(); + System.out.println(this.getClass().getName() + " pasted2 from clipboard " + nwContent); + } else { + throw new IllegalArgumentException("supported copy1|2 paste1|2"); + } + long start = System.nanoTime(); + while (TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - start) < timeOut) { + Thread.sleep(500); + } + } +} diff -r c52fcd37dbd8 -r 2c3a063c1aff tests/reproducers/signed/ClipboardContentSigned/testcases/ClipboardContentSignedTests.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/ClipboardContentSigned/testcases/ClipboardContentSignedTests.java Fri Oct 26 12:15:18 2012 +0200 @@ -0,0 +1,126 @@ +/* ClipboardContentSignedTests.java + Copyright (C) 2012 Red Hat, Inc. + + This file is part of IcedTea. + From bugzilla-daemon at icedtea.classpath.org Fri Oct 26 03:15:02 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 26 Oct 2012 10:15:02 +0000 Subject: [Bug 708] can't copy or paste text in the text areas In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=708 --- Comment #8 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea-web?cmd=changeset;node=2c3a063c1aff author: Jiri Vanek date: Fri Oct 26 12:15:18 2012 +0200 Added clipboard reproducers (PR708) -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121026/b96780f9/attachment.html From andrew.zhogin at gmail.com Fri Oct 26 03:43:31 2012 From: andrew.zhogin at gmail.com (Andrew Zhogin) Date: Fri, 26 Oct 2012 17:43:31 +0700 Subject: X86 platform run SPECJVM2008 test with Parameter -Xcomp Error Message-ID: Hi. Here is path. Best regards, Andrew Zhogin. -------------- next part -------------- A non-text attachment was scrubbed... Name: 2491 (2).patch Type: application/octet-stream Size: 2482 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121026/59af8216/24912.patch From jvanek at redhat.com Fri Oct 26 06:13:17 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 26 Oct 2012 15:13:17 +0200 Subject: [rfc][icedtea-web] Remove need for HTML tag scanner in PluginAppletViewer In-Reply-To: <50899C9E.8020204@redhat.com> References: <50899C9E.8020204@redhat.com> Message-ID: <508A8C6D.6070100@redhat.com> On 10/25/2012 10:10 PM, Adam Domurad wrote: > Hi all. This is something I've wanted to do for a while, simply because of the hackish nature of the > applet/object/embed tag parsing code in ITW. Thoughts welcome, I'll still be doing some more testing > on this (looks good so far) but would appreciate feedback. The patch also makes it possible to do > unit tests from classes included in plugin.jar (used to unit test the new > sun.java.PluginAppletAttributes). > > The applet tag information flows like this pre-patch: > - NPAPI parses the tag information > - ITW's C++ side takes in the already-parsed tag information, creates an embed tag (embed tag only) > for ITW to use. > - ITW's java side receives the tag, and scans it using (less than desirable) parsing routines. > > Post-patch: > - NPAPI parses the tag information > - ITW's C++ side generates a simple listing of the name value pairs passed > - ITW's java side parses these name value pairs I like this patch. I found several issues which had come across my mind, but I think during other reviews there will come more of them. Also I'm not 100% capable to verify C code. SO before aprove I will definitely check with Pavel or somebody else can do this. I checked c part only from logical point of view. > > Points of contention: > - PluginAppletViewer#parse had a 'ydisp' variable that has been changed to a static variable, since > the parse method will now only ever handle one applet tag (the old version expected to have > potentially multiple). However I'm not 100% about this because the old version as well only ever > received one applet tag, rendering this effectively to always be 1... I'm not sure if the behaviour > should be 'fixed' this way. Your arguments seemed valid. And although PluginAppletViewer is singleton, making the ydisp variable static looks like it will behave differently. I would recommend empiric testing :)) See how multiple applets are shown on (multiple)page(s) and compare with your new implementation :) > > - The code was made to behave as-it-were as much as possible, meaning it can print a warning about a > "missing code attribute in the embed tag" no matter what tag was used. This is as it was because ITW > would always get passed an embed tag. Feel free to force me to change it:) > > ChangeLog: > 2012-10-25 Adam Domurad > > Remove the applet/embed/object tag parser from ITW. Send the applet > parameters directly from the C++. > * Makefile.am: Allow unit-testing for classes in plugin.jar. > * plugin/icedteanp/IcedTeaNPPlugin.cc: Send quoted parameter > name/values instead of applet tag. Remove some dead code. > * plugin/icedteanp/IcedTeaNPPlugin.h: Rename applet_tag -> > parameters_string. > * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: > Extract parsing code into its own class. > * plugin/icedteanp/java/sun/applet/PluginAppletAttributes.java: > New, encapsulates the (simplified) attribute parsing logic. > * tests/netx/unit/sun/applet/PluginAppletAttributesTest.java: > Unit tests for parsing logic. > > > nuke-parser.patch > > > diff --git a/Makefile.am b/Makefile.am > --- a/Makefile.am > +++ b/Makefile.am > @@ -882,7 +882,7 @@ stamps/netx-unit-tests-compile.stamp: st > mkdir -p $(NETX_UNIT_TEST_DIR) && \ > $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \ > -d $(NETX_UNIT_TEST_DIR) \ > - -classpath $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(TEST_EXTENSIONS_DIR) \ > + -classpath $(JUNIT_JAR):$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar:$(NETX_DIR)/lib/classes.jar:$(TEST_EXTENSIONS_DIR) \ > @netx-unit-tests-source-files.txt && \ > mkdir -p stamps && \ > touch $@ > @@ -912,7 +912,7 @@ stamps/run-netx-unit-tests.stamp: stamps > done ; \ > cd $(NETX_UNIT_TEST_DIR) ; \ > class_names=`cat $(UNIT_CLASS_NAMES)` ; \ > - CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):. \ > + CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):. \ > $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names > if WITH_XSLTPROC > $(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(NETX_UNIT_TEST_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_unit.html > diff --git a/netx-dist-tests-whitelist b/netx-dist-tests-whitelist > --- a/netx-dist-tests-whitelist > +++ b/netx-dist-tests-whitelist > @@ -1,1 +1,1 @@ > -.* > +Applet.* > diff --git a/plugin/icedteanp/IcedTeaNPPlugin.cc b/plugin/icedteanp/IcedTeaNPPlugin.cc > --- a/plugin/icedteanp/IcedTeaNPPlugin.cc > +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc > @@ -229,8 +229,7 @@ static gboolean plugin_out_pipe_callback > GIOCondition condition, > gpointer plugin_data); > static NPError plugin_start_appletviewer (ITNPPluginData* data); > -static gchar* plugin_create_applet_tag (int16_t argc, char* argn[], > - char* argv[]); > +static std::string plugin_parameters_string (int argc, char* argn[], char* argv[]); > static void plugin_stop_appletviewer (); > // Uninitialize ITNPPluginData structure > static void plugin_data_destroy (NPP instance); > @@ -347,7 +346,6 @@ ITNP_New (NPMIMEType pluginType, NPP ins > > gchar* documentbase = NULL; > gchar* read_message = NULL; > - gchar* applet_tag = NULL; > gchar* cookie_info = NULL; > > NPObject* npPluginObj = NULL; > @@ -395,11 +393,10 @@ ITNP_New (NPMIMEType pluginType, NPP ins > documentbase = plugin_get_documentbase (instance); > if (documentbase && argc != 0) > { > - // Send applet tag message to appletviewer. > - applet_tag = plugin_create_applet_tag (argc, argn, argv); > - > - data->applet_tag = (gchar*) malloc(strlen(applet_tag)*sizeof(gchar) + strlen(documentbase)*sizeof(gchar) + 32); > - g_sprintf(data->applet_tag, "tag %s %s", documentbase, applet_tag); > + // Send parameters to appletviewer. > + std::string params_string = plugin_parameters_string(argc, argn, argv); > + > + data->parameters_string = g_strdup_printf("tag %s %s", documentbase, params_string.c_str()); > > data->is_applet_instance = true; > } > @@ -424,33 +421,7 @@ ITNP_New (NPMIMEType pluginType, NPP ins > > instance->pdata = data; > > - goto cleanup_done; > - > - cleanup_appletviewer_mutex: > - g_mutex_free (data->appletviewer_mutex); > - data->appletviewer_mutex = NULL; > - > - // cleanup_instance_string: > - g_free (data->instance_id); > - data->instance_id = NULL; > - > - // cleanup applet tag: > - g_free (data->applet_tag); > - data->applet_tag = NULL; > - > - // cleanup_data: > - // Eliminate back-pointer to plugin instance. > - data->owner = NULL; > - (*browser_functions.memfree) (data); > - data = NULL; > - > - // Initialization failed so return a NULL pointer for the browser > - // data. > - instance->pdata = NULL; > - > cleanup_done: > - g_free (applet_tag); > - applet_tag = NULL; > g_free (read_message); > read_message = NULL; > g_free (documentbase); > @@ -834,7 +805,7 @@ ITNP_SetWindow (NPP instance, NPWindow* > // Now we have everything. Send this data to the Java side > plugin_send_initialization_message( > data->instance_id, (gulong) data->window_handle, > - data->window_width, data->window_height, data->applet_tag); > + data->window_width, data->window_height, data->parameters_string); > > g_mutex_unlock (data->appletviewer_mutex); > > @@ -1696,157 +1667,66 @@ plugin_start_appletviewer (ITNPPluginDat > > /* > * Replaces certain characters (\r, \n, etc) with HTML escape equivalents. > - * > - * Return string is allocated on the heap. Caller assumes responsibility > - * for freeing the memory via free() > */ > -static char* > -encode_string(char* to_encode) > -{ > - > - // Do nothing for an empty string > - if (to_encode == '\0') > - return to_encode; > - > - // worst case scenario -> all characters are newlines or > - // returns, each of which translates to 5 substitutions > - char* encoded = (char*) calloc(((strlen(to_encode)*5)+1), sizeof(char)); > - > - strcpy(encoded, ""); > - > - for (int i=0; i < strlen(to_encode); i++) > +static std::string > +encode_string(const char* to_encode) { > + std::string encoded; > + > + if (to_encode == NULL) > + { > + return encoded; > + } > + > + size_t length = strlen(to_encode); > + for (int i=0; i < length; i++) > { > if (to_encode[i] == '\r') > - encoded = strcat(encoded, " "); > + encoded += " "; > else if (to_encode[i] == '\n') > - encoded = strcat(encoded, " "); > + encoded += " "; > else if (to_encode[i] == '>') > - encoded = strcat(encoded, ">"); > + encoded += ">"; > else if (to_encode[i] == '<') > - encoded = strcat(encoded, "<"); > + encoded += "<"; > else if (to_encode[i] == '&') > - encoded = strcat(encoded, "&"); > + encoded += "&"; > else if (to_encode[i] == '"') > - encoded = strcat(encoded, """); > + encoded += """; > else > - { > - char* orig_char = (char*) calloc(2, sizeof(char)); > - orig_char[0] = to_encode[i]; > - orig_char[1] = '\0'; > - > - strcat(encoded, orig_char); > - > - free(orig_char); > - orig_char = NULL; > - } > + encoded += to_encode[i]; > } > > return encoded; This is probably strangest stuff in patch. NPAPI is returning already decoded strings. Why to encode them again?!?!?! Unless I see something very wrong, get rid of this unnecessary middle step! > } > > -// Build up the applet tag string that we'll send to the applet > -// viewer. > -static gchar* > -plugin_create_applet_tag (int16_t argc, char* argn[], char* argv[]) > +// Build a string containing an encoded list of parameters to send to > +// the applet viewer > +static std::string > +plugin_parameters_string (int argc, char* argn[], char* argv[]) > { > - PLUGIN_DEBUG ("plugin_create_applet_tag\n"); > - > - gchar* applet_tag = g_strdup (" - gchar* parameters = g_strdup (""); > - > - for (int16_t i = 0; i < argc; i++) > + PLUGIN_DEBUG ("plugin_parameters_string\n"); > + > + std::string parameters; > + > + for (int i = 0; i < argc; i++) > + { > + if (argv[i] != NULL) > { > - gchar* argn_escaped = encode_string(argn[i]); > - gchar* argv_escaped = encode_string(argv[i]); > - > - if (!g_ascii_strcasecmp (argn_escaped, "code")) > - { > - gchar* code = g_strdup_printf ("CODE=\"%s\" ", argv_escaped); > - applet_tag = g_strconcat (applet_tag, code, NULL); > - g_free (code); > - code = NULL; > + std::string name_escaped = encode_string(argn[i]); > + std::string value_escaped = encode_string(argv[i]); > + > + //Encode parameters and send as '"name1" "value1" "name2" "value2"' etc > + parameters += "\""; > + parameters += name_escaped; > + parameters += "\" "; > + parameters += value_escaped; > + parameters += "\" "; > } > - else if (!g_ascii_strcasecmp (argn_escaped, "java_code")) > - { > - gchar* java_code = g_strdup_printf ("JAVA_CODE=\"%s\" ", argv_escaped); > - applet_tag = g_strconcat (applet_tag, java_code, NULL); > - g_free (java_code); > - java_code = NULL; > - } > - else if (!g_ascii_strcasecmp (argn_escaped, "codebase")) > - { > - gchar* codebase = g_strdup_printf ("CODEBASE=\"%s\" ", argv_escaped); > - applet_tag = g_strconcat (applet_tag, codebase, NULL); > - g_free (codebase); > - codebase = NULL; > - } > - else if (!g_ascii_strcasecmp (argn_escaped, "java_codebase")) > - { > - gchar* java_codebase = g_strdup_printf ("JAVA_CODEBASE=\"%s\" ", argv_escaped); > - applet_tag = g_strconcat (applet_tag, java_codebase, NULL); > - g_free (java_codebase); > - java_codebase = NULL; > - } > - else if (!g_ascii_strcasecmp (argn_escaped, "classid")) > - { > - gchar* classid = g_strdup_printf ("CLASSID=\"%s\" ", argv_escaped); > - applet_tag = g_strconcat (applet_tag, classid, NULL); > - g_free (classid); > - classid = NULL; > - } > - else if (!g_ascii_strcasecmp (argn_escaped, "archive")) > - { > - gchar* archive = g_strdup_printf ("ARCHIVE=\"%s\" ", argv_escaped); > - applet_tag = g_strconcat (applet_tag, archive, NULL); > - g_free (archive); > - archive = NULL; > - } > - else if (!g_ascii_strcasecmp (argn_escaped, "java_archive")) > - { > - gchar* java_archive = g_strdup_printf ("JAVA_ARCHIVE=\"%s\" ", argv_escaped); > - applet_tag = g_strconcat (applet_tag, java_archive, NULL); > - g_free (java_archive); > - java_archive = NULL; > - } > - else if (!g_ascii_strcasecmp (argn_escaped, "width")) > - { > - gchar* width = g_strdup_printf ("width=\"%s\" ", argv_escaped); > - applet_tag = g_strconcat (applet_tag, width, NULL); > - g_free (width); > - width = NULL; > - } > - else if (!g_ascii_strcasecmp (argn_escaped, "height")) > - { > - gchar* height = g_strdup_printf ("height=\"%s\" ", argv_escaped); > - applet_tag = g_strconcat (applet_tag, height, NULL); > - g_free (height); > - height = NULL; > - } > - else > - { > - > - if (argv_escaped != '\0') > - { > - parameters = g_strconcat (parameters, " - "\" VALUE=\"", argv_escaped, "\">", NULL); > - } > - } > - > - free(argn_escaped); > - free(argv_escaped); > - > - argn_escaped = NULL; > - argv_escaped = NULL; > - } > - > - applet_tag = g_strconcat (applet_tag, ">", parameters, "", NULL); > - > - g_free (parameters); > - parameters = NULL; > - > - PLUGIN_DEBUG ("plugin_create_applet_tag return\n"); > - > - return applet_tag; > + } > + > + PLUGIN_DEBUG ("plugin_parameters_string return\n"); > + > + return parameters; > } > > // plugin_send_message_to_appletviewer must be called while holding > @@ -2057,8 +1937,8 @@ plugin_data_destroy (NPP instance) > tofree->instance_id = NULL; > > // cleanup applet tag > - g_free (tofree->applet_tag); > - tofree->applet_tag = NULL; > + g_free (tofree->parameters_string); > + tofree->parameters_string = NULL; > > g_free(tofree->source); > tofree->source = NULL; > @@ -2537,7 +2417,7 @@ get_scriptable_object(NPP instance) > // a 0 handle > if (!data->window_handle) > { > - plugin_send_initialization_message(data->instance_id, 0, 0, 0, data->applet_tag); > + plugin_send_initialization_message(data->instance_id, 0, 0, 0, data->parameters_string); > } > > java_result = java_request.getAppletObjectInstance(id_str); > diff --git a/plugin/icedteanp/IcedTeaNPPlugin.h b/plugin/icedteanp/IcedTeaNPPlugin.h > --- a/plugin/icedteanp/IcedTeaNPPlugin.h > +++ b/plugin/icedteanp/IcedTeaNPPlugin.h > @@ -66,8 +66,8 @@ struct ITNPPluginData > { > // A unique identifier for this plugin window. > gchar* instance_id; > - // The applet tag sent to Java side > - gchar* applet_tag; > + // The parameter list string sent to Java side > + gchar* parameters_string; > // Mutex to protect appletviewer_alive. > GMutex* appletviewer_mutex; > // Back-pointer to the plugin instance to which this data belongs. > diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletAttributes.java b/plugin/icedteanp/java/sun/applet/PluginAppletAttributes.java > new file mode 100644 > --- /dev/null > +++ b/plugin/icedteanp/java/sun/applet/PluginAppletAttributes.java > @@ -0,0 +1,169 @@ > +/* PluginAppletAttributes -- Provides parsing for applet attributes > + Copyright (C) 2012 Red Hat > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 2, or (at your option) > +any later version. > + > +IcedTea is distributed in the hope that it will be useful, but > +WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to the > +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. */ > + > +package sun.applet; > + > +import java.io.PrintStream; > +import java.util.ArrayList; > +import java.util.Enumeration; > +import java.util.Hashtable; > +import java.util.List; > + > +/** > + * Provides parsing for applet attributes passed from the C++ side as quoted, > + * encoded strings. This class is not meant to be initialized No author in ITW sources please:) Please, mke this class as classical object. You can still keep some static (or singleton) utility methods here, but prefer more object way: Hashtable atts = PluginAppletAttributes.getPArser().parse(width, height, tag); or Hashtable atts = new PluginAppletAttributes().parse(width, height, tag); Although I would like to recomand to wrap the Hashtable to Object. Eg ParsedAppletTag. so the above methods wirr return this one. One will thenbe able to access parsedAppletTag.getKey() and will be also able to recieve something else then Strings And again. Get rid of redundant decoding! > + * @author Adam Domurad > + */ > +class PluginAppletAttributes { > + /** > + * Decodes the string (converts html escapes into proper characters) > + * > + * @param toDecode The string to decode > + * @return The decoded string > + */ > + static String decodeString(String toDecode) { > + > + toDecode = toDecode.replace(">", ">"); > + toDecode = toDecode.replace("<", "<"); > + toDecode = toDecode.replace(" ", "\n"); > + toDecode = toDecode.replace(" ", "\r"); > + toDecode = toDecode.replace(""", "\""); > + toDecode = toDecode.replace("&", "&"); > + > + return toDecode; > + } > + > + static final boolean isInt(String s) { > + try { > + Integer.parseInt(s); > + return true; > + } catch (NumberFormatException e) { > + return false; > + } > + } :DDD no! :D Although this give sense, I would not recommand usage of exception for directing the flow of code :) My suggestion will be matches \d+ ;) I have also some susspiccion that there is ssDigit method somewhere. > + > + static List extractQuotedStrings(String s) { > + List strs = new ArrayList(); > + int idx = 0; > + > + while (idx < s.length()){ > + // Move to character after starting quote > + idx = s.indexOf('"', idx) + 1; > + if (idx <= 0) break; > + > + // Find end quote > + int endIdx = s.indexOf('"', idx); > + strs.add(s.substring(idx, endIdx)); > + idx = endIdx + 1; > + } > + > + return strs; > + } > + > + static Hashtable parseQuotedKeyValuePairs(String keyvalString) { > + List strs = extractQuotedStrings(keyvalString); > + Hashtable attributes = new Hashtable(); > + > + for (int i = 0; i < strs.size(); i += 2) { > + String key = decodeString(strs.get(i)).toLowerCase(); > + String value = decodeString(strs.get(i + 1)); > + attributes.put(key, value); > + } > + > + return attributes; > + } > + > + /** > + * Generates a hashtable of applet attributes, given a string containing > + * parameters in quotes. > + * > + * @param width default applet width > + * @param height default applet height > + * @param parameterString the parameters > + * @return the attributes in a hash table > + */ > + static public Hashtable parse(String width, > + String height, String parameterString) { > + Hashtable atts = parseQuotedKeyValuePairs(parameterString); > + > + // If there is a classid and no code tag present, transform it to code tag > + if (atts.get("code") == null && atts.get("classid") != null > + && !(atts.get("classid")).startsWith("clsid:")) { > + atts.put("code", atts.get("classid")); > + } > + > + // remove java: from code tag > + if (atts.get("code") != null && (atts.get("code")).startsWith("java:")) { > + atts.put("code", (atts.get("code")).substring(5)); > + } > + > + // java_* aliases override older names: > + //http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html#in-nav > + if (atts.get("java_code") != null) { > + atts.put("code", (atts.get("java_code"))); > + } > + > + if (atts.get("java_codebase") != null) { > + atts.put("codebase", (atts.get("java_codebase"))); > + } > + > + if (atts.get("java_archive") != null) { > + atts.put("archive", (atts.get("java_archive"))); > + } > + > + if (atts.get("java_object") != null) { > + atts.put("object", (atts.get("java_object"))); > + } > + > + if (atts.get("java_type") != null) { > + atts.put("type", (atts.get("java_type"))); > + } > + > + if (atts.get("width") == null || !isInt(atts.get("width"))) { > + atts.put("width", width); > + } > + > + if (atts.get("height") == null || !isInt(atts.get("height"))) { > + atts.put("height", height); > + } > + > + if (atts.get("code") == null && atts.get("object") == null) { > + return null; > + } > + return atts; > + } > +} > diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java > --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java > +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java > @@ -86,6 +86,7 @@ import java.lang.reflect.InvocationTarge > import java.net.SocketPermission; > import java.net.URI; > import java.net.URL; > +import java.net.URLConnection; > import java.security.AccessController; > import java.security.AllPermission; > import java.security.PrivilegedAction; > @@ -286,6 +287,14 @@ public class PluginAppletViewer extends > PRE_INIT, INIT_COMPLETE, REFRAME_COMPLETE, INACTIVE, DESTROYED > }; > > + /* values used for placement of AppletViewer's frames */ > + private static final int XDELTA = 30; > + private static final int YDELTA = XDELTA; > + > + private static int x = 0; > + private static int y = 0; > + private static int ydisp = 1; > + > /** > * The panel in which the applet is being displayed. > */ > @@ -488,10 +497,37 @@ public class PluginAppletViewer extends > "DocumentBase = ", documentBase, "\n", > "Tag = ", tag); > > - PluginAppletViewer.parse > - (identifier, handle, width, height, > - new StringReader(tag), > - new URL(documentBase)); > + PluginAppletPanelFactory factory = new PluginAppletPanelFactory(); > + AppletMessageHandler amh = new AppletMessageHandler("appletviewer"); > + URL url = new URL(documentBase); > + URLConnection conn = url.openConnection(); > + /* The original URL may have been redirected - this > + * sets it to whatever URL/codebase we ended up getting > + */ > + url = conn.getURL(); > + I would like to see thios in different method. Also the ydisp remains questionable. Imho with yournew approach it will lead to complete removal of it (i'm really afraid of case like three applets per page, and several such a pages) > + Hashtable atts = PluginAppletAttributes.parse(width, height, tag); > + > + if (atts == null) { > + String embedRequiresCode = amh.getMessage("parse.warning.embed.requirescode"); > + System.out.println(embedRequiresCode); > + > + throw new RuntimeException(embedRequiresCode); > + } > + > + // Let user know we are starting up > + streamhandler.write("instance " + identifier + " status " + amh.getMessage("status.start")); > + factory.createPanel(streamhandler, identifier, handle, x, y, url, atts); > + > + x += XDELTA; > + y += YDELTA; > + // make sure we don't go too far! > + Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); > + if ((x > d.width - 300) || (y > d.height - 300)) { > + x = 0; > + y = 2 * ydisp * YDELTA; > + ydisp++; > + } > > long maxTimeToSleep = APPLET_TIMEOUT; > appletsLock.lock(); > @@ -1423,24 +1459,6 @@ public class PluginAppletViewer extends > } > > /** > - * Decodes the string (converts html escapes into proper characters) > - * > - * @param toDecode The string to decode > - * @return The decoded string > - */ > - public static String decodeString(String toDecode) { > - > - toDecode = toDecode.replace(">", ">"); > - toDecode = toDecode.replace("<", "<"); > - toDecode = toDecode.replace("&", "&"); > - toDecode = toDecode.replace(" ", "\n"); > - toDecode = toDecode.replace(" ", "\r"); > - toDecode = toDecode.replace(""", "\""); > - > - return toDecode; > - } > - > - /** > * System parameters. > */ > static Hashtable systemParam = new Hashtable(); > @@ -1457,67 +1475,6 @@ public class PluginAppletViewer extends > } > > /** > - * Print the HTML tag. > - */ > - public static void printTag(PrintStream out, Hashtable atts) { > - out.print(" - > - String v = atts.get("codebase"); > - if (v != null) { > - out.print(" codebase=\"" + v + "\""); > - } > - > - v = atts.get("code"); > - if (v == null) { > - v = "applet.class"; > - } > - out.print(" code=\"" + v + "\""); > - v = atts.get("width"); > - if (v == null) { > - v = "150"; > - } > - out.print(" width=" + v); > - > - v = atts.get("height"); > - if (v == null) { > - v = "100"; > - } > - out.print(" height=" + v); > - > - v = atts.get("name"); > - if (v != null) { > - out.print(" name=\"" + v + "\""); > - } > - out.println(">"); > - > - // A very slow sorting algorithm > - int len = atts.size(); > - String params[] = new String[len]; > - len = 0; > - for (Enumeration e = atts.keys(); e.hasMoreElements();) { > - String param = e.nextElement(); > - int i = 0; > - for (; i < len; i++) { > - if (params[i].compareTo(param) >= 0) { > - break; > - } > - } > - System.arraycopy(params, i, params, i + 1, len - i); > - params[i] = param; > - len++; > - } > - > - for (int i = 0; i < len; i++) { > - String param = params[i]; > - if (systemParam.get(param) == null) { > - out.println(""); > - } > - } > - out.println(""); > - } > - > - /** > * Make sure the atrributes are uptodate. > */ > public void updateAtts() { > @@ -1673,412 +1630,6 @@ public class PluginAppletViewer extends > return appletPanels.size(); > } > > - /** > - * Scan spaces. > - */ > - public static void skipSpace(int[] c, Reader in) throws IOException { > - while ((c[0] >= 0) && > - ((c[0] == ' ') || (c[0] == '\t') || (c[0] == '\n') || (c[0] == '\r'))) { > - c[0] = in.read(); > - } > - } > - > - /** > - * Scan identifier > - */ > - public static String scanIdentifier(int[] c, Reader in) throws IOException { > - StringBuilder buf = new StringBuilder(); > - > - if (c[0] == '!') { > - // Technically, we should be scanning for '!--' but we are reading > - // from a stream, and there is no way to peek ahead. That said, > - // a ! at this point can only mean comment here afaik, so we > - // should be okay > - skipComment(c, in); > - return ""; > - } > - > - while (true) { > - if (((c[0] >= 'a') && (c[0] <= 'z')) || > - ((c[0] >= 'A') && (c[0] <= 'Z')) || > - ((c[0] >= '0') && (c[0] <= '9')) || (c[0] == '_')) { > - buf.append((char) c[0]); > - c[0] = in.read(); > - } else { > - return buf.toString(); > - } > - } > - } > - > - public static void skipComment(int[] c, Reader in) throws IOException { > - StringBuilder buf = new StringBuilder(); > - boolean commentHeaderPassed = false; > - c[0] = in.read(); > - buf.append((char) c[0]); > - > - while (true) { > - if (c[0] == '-' && (c[0] = in.read()) == '-') { > - buf.append((char) c[0]); > - if (commentHeaderPassed) { > - // -- encountered ... is > next? > - if ((c[0] = in.read()) == '>') { > - buf.append((char) c[0]); > - > - PluginDebug.debug("Comment skipped: ", buf.toString()); > - > - // comment skipped. > - return; > - } > - } else { > - // first -- is part of + + + + + + diff -r 2c3a063c1aff -r d17bbf43ee22 tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JSToJSet/srcs/JSToJSet.java Mon Oct 29 10:32:59 2012 +0100 @@ -0,0 +1,47 @@ +import java.applet.*; +import java.awt.*; +import java.lang.reflect.Array; +import java.lang.reflect.Field; + +public class JSToJSet extends Applet { + + public int _int; + public double _double; + public float _float; + public long _long; + public boolean _boolean; + public char _char; + public byte _byte; + public String _String; + public String _specialString; + public Object _Object = new String("non-null object"); + public int[] _intArray = new int[1]; + public Integer _Integer; + public Double _Double; + public Float _Float; + public Long _Long; + public Boolean _Boolean; + public Character _Character = 'B'; + public Byte _Byte; + public Double[] _DoubleArray = new Double[10]; + public Double[] _DoubleArray2; + public char[] _charArray = new char[1]; + public Character[] _CharacterArray = new Character[1]; + + public void init() { + String initStr = "JSToJSet applet initialized."; + System.out.println(initStr); + } + + public void printNewValueAndFinish(String fieldname) throws Exception { + Field field = getClass().getDeclaredField(fieldname); + Object value = field.get(this); + if (value != null && value.getClass().isArray()) { + System.out.println("New array value is: " + Array.get(value, 0)); + } else { + System.out.println("New value is: " + value); + } + System.out.println("afterTests"); + } + +} diff -r 2c3a063c1aff -r d17bbf43ee22 tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java Mon Oct 29 10:32:59 2012 +0100 @@ -0,0 +1,249 @@ +/* JSToJSetTest.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + +import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess; +import net.sourceforge.jnlp.browsertesting.BrowserTest; +import net.sourceforge.jnlp.browsertesting.Browsers; +import net.sourceforge.jnlp.closinglisteners.CountingClosingListener; +import net.sourceforge.jnlp.annotations.NeedsDisplay; +import net.sourceforge.jnlp.annotations.TestInBrowsers; +import org.junit.Assert; + +import org.junit.Test; + +public class JSToJSetTest extends BrowserTest { + + private final String exceptionStr = "xception"; + private final String errorStr = "rror"; + private final String initStr = "JSToJSet applet initialized."; + private final String afterStr = "afterTests"; + + private class CountingClosingListenerImpl extends CountingClosingListener { + + @Override + protected boolean isAlowedToFinish(String s) { + if (s.contains(exceptionStr) || s.contains(errorStr)) { + return true; + } + return (s.contains(initStr) && s.contains(afterStr)); + } + } + + private void evaluateStdoutContents(String expectedStdout, ProcessResult pr) { + // Assert that the applet was initialized. + Assert.assertTrue("JSToJSetTest stdout should contain \"" + initStr + + "\" but it didn't.", pr.stdout.contains(initStr)); + + // Assert that the values set by JavaScript are ok + Assert.assertTrue("The output should include: "+expectedStdout+", but is: "+pr.stdout, + pr.stdout.contains(expectedStdout)); + + } + + private void jsToJavaSetNormalTest(String fieldStr, String valueStr) throws Exception { + String strURL = "/JSToJSet.html?" + fieldStr + ";" + valueStr; + ProcessResult pr = server.executeBrowser(strURL, new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); + String expectedStdout = "New value is: " + valueStr; + evaluateStdoutContents(expectedStdout, pr); + } + + private void jsToJavaSetSpecialTest(String fieldStr, String valueStr, int testType) throws Exception { + String strURL = "/JSToJSet.html?"; + String expectedStdout = ""; + switch( testType ){ + case 0://array element + strURL += fieldStr + ";" + valueStr; + expectedStdout = "New array value is: "+valueStr; + break; + case 1://whole array, set 1st element + strURL += fieldStr + ";[" + valueStr; + expectedStdout = "New array value is: "+valueStr; + break; + case 2://char et al - to be set at JS side + strURL += fieldStr + ";JavaScript"; + expectedStdout = "New value is: "+valueStr; + break; + default: + break; + } + + ProcessResult pr = server.executeBrowser(strURL, new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); + evaluateStdoutContents(expectedStdout, pr); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_int_Test() throws Exception { + jsToJavaSetNormalTest("_int", "1"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_double_Test() throws Exception { + jsToJavaSetNormalTest("_double", "1.0"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_float_Test() throws Exception { + jsToJavaSetNormalTest("_float", "1.1"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_long_Test() throws Exception { + jsToJavaSetNormalTest("_long", "10000"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_boolean_Test() throws Exception { + jsToJavaSetNormalTest("_boolean", "true"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_char_Test() throws Exception { + jsToJavaSetSpecialTest("_char", "a", 2); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_byte_Test() throws Exception { + jsToJavaSetNormalTest("_byte", "10"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_intArrayElement_Test() throws Exception { + jsToJavaSetSpecialTest("_intArray[0]", "1", 0); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_regularString_Test() throws Exception { + jsToJavaSetNormalTest("_String", "teststring"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_specialCharsString_Test() throws Exception { + jsToJavaSetSpecialTest("_specialString", "?????????$?????????", 2); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_null_Test() throws Exception { + jsToJavaSetNormalTest("_Object", "null"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_Integer_Test() throws Exception { + jsToJavaSetNormalTest("_Integer", "1"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_Double_Test() throws Exception { + jsToJavaSetNormalTest("_Double", "1.0"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_Float_Test() throws Exception { + jsToJavaSetNormalTest("_Float", "1.1"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_Long_Test() throws Exception { + jsToJavaSetNormalTest("_Long", "10000"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_Boolean_Test() throws Exception { + jsToJavaSetNormalTest("_Boolean", "true"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_Character_Test() throws Exception { + jsToJavaSetSpecialTest("_Character", "A", 2); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_Byte_Test() throws Exception { + jsToJavaSetNormalTest("_Byte", "100"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_DoubleArrayElement_Test() throws Exception { + jsToJavaSetSpecialTest("_DoubleArray[0]", "1.1", 0); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void AppletJSToJSet_DoubleFullArray_Test() throws Exception { + jsToJavaSetSpecialTest("_DoubleArray2", "0.1", 1); + } + +} From bugzilla-daemon at icedtea.classpath.org Mon Oct 29 06:50:20 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 29 Oct 2012 13:50:20 +0000 Subject: [Bug 1204] New: Archive URL wrongly resolved Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1204 Priority: P3 Bug ID: 1204 CC: unassigned at icedtea.classpath.org Assignee: dbhole at redhat.com Summary: Archive URL wrongly resolved Severity: normal Classification: Unclassified OS: Linux Reporter: vigouroux.christophe at gmail.com Hardware: x86 Status: NEW Version: unspecified Component: Plugin Product: IcedTea-Web Created attachment 784 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=784&action=edit IcedTea plugin logs Using OpenJDK 1.7.0_07 and IcedTea7 2.3.2. Given the following embed tag : ... Note the specifics of the URL: - absolute path begining with "/" - query parameter "i=..." - document base is https://www.myapp.com/app/jsp/ Then, IcedTea plugin tries to resolve the folowing URL: https://www.myapp.com//app/res/pub/channel.jar There are two problems: - the double slash ("//") - the parameter is removed from the URL It impacts our application, because for security reasons, we do some mod_rewrite stuff to whitelist all valid URLs. The URL with double slash and with the missing parameter does not pass mod_rewrite validation, and thus an error document is issued to the java plugin, not allowing the applet to bootstrap. We don't want to lower our URL security model to accept these limitations, as long as the Oracle's implementation works fine with archives using URL query parameters and absolute paths. See the attached logs for detailled information. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121029/2c414257/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Oct 29 06:52:48 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 29 Oct 2012 13:52:48 +0000 Subject: [Bug 1204] Archive URL wrongly resolved In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1204 --- Comment #1 from vigouroux.christophe at gmail.com --- Created attachment 785 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=785&action=edit Oracle plugin log for same embed tag -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121029/4606e398/attachment.html From omajid at redhat.com Mon Oct 29 11:42:57 2012 From: omajid at redhat.com (Omair Majid) Date: Mon, 29 Oct 2012 14:42:57 -0400 Subject: Icedtea-web splashscreen implementation In-Reply-To: <5087BA8E.7010106@redhat.com> References: <501928CB.4090002@redhat.com> <5019354B.3020100@redhat.com> <501983CD.4080405@redhat.com> <5020D6D8.6050302@redhat.com> <5021400A.1050804@redhat.com> <50291A05.1080606@redhat.com> <507C4A48.2020404@redhat.com> <5086D90A.5020701@redhat.com> <5086DEFE.3070106@redhat.com> <5086E1A5.5000301@redhat.com> <5087BA8E.7010106@redhat.com> Message-ID: <508ECE31.1040507@redhat.com> Hi Jiri, Comments in-line below. On 10/24/2012 05:53 AM, Jiri Vanek wrote: > diff -r c52fcd37dbd8 netx/net/sourceforge/jnlp/GuiLaunchHandler.java > --- a/netx/net/sourceforge/jnlp/GuiLaunchHandler.java Tue Oct 23 09:56:26 2012 +0200 > +++ b/netx/net/sourceforge/jnlp/GuiLaunchHandler.java Wed Oct 24 11:46:08 2012 +0200 > @@ -80,10 +80,13 @@ > } > > private void closeSplashScreen() { > - synchronized(mutex) { > + synchronized (mutex) { > if (splashScreen != null) { > if (splashScreen.isSplashScreenValid()) { > splashScreen.setVisible(false); > + if (splashScreen.isCustomSplashscreen()) { > + splashScreen.stopAnimation(); > + } Perhaps splashScreen.stopAnimation() can be called without the splashScreen.isCustomSplashscreen check? stopAnimation() already does this check. > diff -r c52fcd37dbd8 netx/net/sourceforge/jnlp/JNLPSplashScreen.java > --- a/netx/net/sourceforge/jnlp/JNLPSplashScreen.java Tue Oct 23 09:56:26 2012 +0200 > +++ b/netx/net/sourceforge/jnlp/JNLPSplashScreen.java Wed Oct 24 11:46:08 2012 +0200 > + //Toolkit.getDefaultToolkit().getScreenSize(); works always, but center > + //only to middle of all monitors. > + //Below code works on 1.4 and higher, and center to middle of primary monmtor This comment, just by itself, does not make too much sense (I guess it requires the reader to know about the previous implementation). Perhaps you can rephrase it? // Centering to middle of Toolkit.getDefaultToolkit().getScreenSize() // centers to the middle of all monitors. Let's center to the middle // of the primary monitor instead. // TODO center on the 'current' monitor to meet user expectation > + setLocationRelativeTo(null); > } > > @Override > public void paint(Graphics g) { > if (splashImage == null) { > + super.paint(g); Nice catch! > + > + boolean isCustomSplashscreen() { > + return (componetSplash!=null); > + } > + > + void stopAnimation() { > + if (isCustomSplashscreen()) componetSplash.stopAnimation(); > + } Please consider making these methods public or private. > } > diff -r c52fcd37dbd8 netx/net/sourceforge/jnlp/Launcher.java > --- a/netx/net/sourceforge/jnlp/Launcher.java Tue Oct 23 09:56:26 2012 +0200 > +++ b/netx/net/sourceforge/jnlp/Launcher.java Wed Oct 24 11:46:08 2012 +0200 > protected ApplicationInstance launchApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException { > + if (JNLPRuntime.getForksAllowed() && file.needsNewVM()) { > + if (!JNLPRuntime.isHeadless()) { > + SplashScreen sp = SplashScreen.getSplashScreen(); > + if (sp != null) { > + sp.close(); > + } > + } This is really puzzling. Forks are never allowed for applets, so the first if statement should never evaluate to true. But if we could start new VMs for applets, we would need to prevent applets from running in this VM. We need to return from this method to avoid executing further code, but we also need to notify the plugin that another VM now handles the plugin. I think it's just simpler to remove this code. Maybe add this instead? if (JNLPRuntime.getForksAllowed()) { throw new AssertionError("applets are not allowed to fork"); } > + } > + if (handler != null) { > + handler.launchInitialized(file); > + } Please don't add null checks. Why is the handler null? Maybe it should be set to a no-op handler instance (in the constructor of this class) if it's not otherwise set? > - protected AppletInstance createApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException { > + protected synchronized AppletInstance createApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException { Okay, this "synchronized" keyword here looks rather out of place. If synchronization is really needed, I don't think we should be adding it to this class. > + // appletInstance is needed by ServiceManager when looking up > + // services. This could potentially be done in applet constructor > + // so initialize appletInstance before creating applet. Could you leave this change out of the patch? Let's not mix in multiple fixes/changes. Also, I am not sure if applets are allowed to use the ServiceManager methods until init() is invoked. They are not allowed to call applet methods, for example: http://docs.oracle.com/javase/7/docs/api/java/applet/Applet.html#Applet() > + AppletInstance appletInstance = null; > + ThreadGroup group = Thread.currentThread().getThreadGroup(); > try { > JNLPClassLoader loader = JNLPClassLoader.getInstance(file, updatePolicy); > > if (enableCodeBase) { > loader.enableCodeBase(); > } else if (file.getResources().getJARs().length == 0) { > - throw new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later"); > + Exception ex = new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later"); > + try { > + SplashUtils.showError(ex, new AppletEnvironment(file, new AppletInstance(file, group, new ClassLoader() { > + }, null))); > + } catch (Exception exx) { > + if (JNLPRuntime.isDebug()) { > + exx.printStackTrace(); > + } > + } Would it be possible to use launchError to handle this message rather than using SplashUtils directly? > private LaunchException launchError(LaunchException ex) { > + return launchError(ex, null); > + } > + > + private LaunchException launchError(LaunchException ex, AppletInstance applet) { > + if (applet != null) { > + SplashUtils.showErrorCaught(ex, applet); > + } RFE: I would like to see (in some future patch) a applet-specific handler that can be used to avoid needing a explicit call to SplashUtils. > + public void setAppletViewerFrame(SplashController framePanel) { > + appletViewerFrame=framePanel; > + } > + > + @Override > + public void removeSplash() { > + appletViewerFrame.removeSplash(); > + } > + > + @Override > + public void replaceSplash(SplashPanel r) { > + appletViewerFrame.replaceSplash(r); > + } > + > + @Override > + public int getSplashWidth() { > + return appletViewerFrame.getSplashWidth(); > + } > + > + @Override > + public int getSplashHeigth() { > + return appletViewerFrame.getSplashHeigth(); > + } Interesting that all these methods are manipulating the appletViewerFrame. Looks to me like they belong in PluginAppletViewer class. Or maybe the instance variable appletViewerFrame should be renamed to splashController. But it still seems odd that these methods are in this class if all they are doing is passing the calls along to the SplashController. > diff -r c52fcd37dbd8 plugin/icedteanp/java/sun/applet/PluginAppletViewer.java > --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Tue Oct 23 09:56:26 2012 +0200 > +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Wed Oct 24 11:46:08 2012 +0200 I would like someone more knowledgeable than me to review this piece of code too. There are lots of changes with implications that I am unaware of. > @@ -145,7 +149,12 @@ > @Override public void run() { > panel.createNewAppContext(); > // create the frame. > - PluginAppletViewer.framePanel(identifier, handle, panel); > + int width = Integer.parseInt(atts.get("width")); > + int height = Integer.parseInt(atts.get("height")); > + > + PluginDebug.debug("X and Y are: " + width + " " + height); The width/height are being obtained twice now. Is the second invocation needed? > - public static void framePanel(int identifier, long handle, NetxPanel panel) { > + public static synchronized PluginAppletViewer framePanel(int identifier,long handle, int width, int height, NetxPanel panel) { Maybe this method should be renamed to createPanel now? It's not framing the panel anymore. Also, why the 'synchronized' keyword. What requires synchronization? > + final AppletPanel fPanel = panel; > + try { > + SwingUtilities.invokeAndWait(new Runnable() { > + > + public void run() { > + add("Center", fPanel); > + fPanel.setVisible(false); > + > + splashPanel = SplashUtils.getSplashScreen(fPanel.getWidth(), fPanel.getHeight()); > + if (splashPanel != null) { > + splashPanel.startAnimation(); > + PluginDebug.debug("Added splash " + splashPanel); > + add("Center", splashPanel.getSplashComponent()); > + } > + pack(); > + } > + }); > + } catch (Exception e) { > + e.printStackTrace(); // Not much we can do other than print > + } This new code looks like it really should be in its own method. > + @Override > + public void removeSplash() { > + > + // Loading done. Remove splash screen. > + if (splashPanel == null) { > + return; > + } Is the comment relevant? At first I thought it was saying that splashPanel == null implies that loading is done. But going through the code, it looks like it just makes this method a no-op after first invocation. > + try { > + SwingUtilities.invokeAndWait(new Runnable() { > + > + public void run() { > + splashPanel.getSplashComponent().setVisible(false); > + splashPanel.stopAnimation(); > + remove(splashPanel.getSplashComponent()); > + splashPanel = null; > + // Re-add the applet > + remove(panel); > + add(panel); I am guessing the remove()/add() is need to notify the container of changes? Maybe the comment can say why that's being done instead of saying what's being done. > + case AppletPanel.APPLET_START: { > + String s="Error1 detected"; > + PluginDebug.debug(s); > + if (src.status != AppletPanel.APPLET_INIT && src.status != AppletPanel.APPLET_STOP) { > + SplashPanel sp=SplashUtils.getErrorSplashScreen(appletViewer.panel.getWidth(), appletViewer.panel.getHeight(), new Exception(s)); > + appletViewer.replaceSplash(sp); > + } > + > + break; > + } Could you add a comment explaining how APPLET_START is an error? > + case AppletPanel.APPLET_ERROR: { > + String s="Error2 detected"; > + PluginDebug.debug(s); The debug message doesn't explain anything. Could you add more information? > + System.err.println("Waiting for applet init"); Sounds like this should be a PluginDebug.debug() message. Cheers, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at icedtea.classpath.org Mon Oct 29 12:09:47 2012 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Mon, 29 Oct 2012 19:09:47 +0000 Subject: /hg/icedtea-web: 2 new changesets Message-ID: changeset 6619b0c63455 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=6619b0c63455 author: Omair Majid date: Mon Oct 29 15:01:07 2012 -0400 PR1186: System.getProperty("deployment.user.security.trusted.cacerts") is null Copy deployment configration read into system properties so it is visibile to target programs. changeset 9327b9bd2d37 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=9327b9bd2d37 author: Omair Majid date: Mon Oct 29 15:07:56 2012 -0400 Reproducer for PR1186 Add a reproducer to verify that deployment properties are available to jnlp applications as system properties. diffstat: ChangeLog | 19 ++ NEWS | 1 + netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java | 22 ++- netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 1 + tests/netx/unit/net/sourceforge/jnlp/config/DeploymentConfigurationTest.java | 72 ++++++++++ tests/reproducers/signed/DeploymentPropertiesAreExposed/resources/DeploymentPropertiesAreExposed.jnlp | 52 +++++++ tests/reproducers/signed/DeploymentPropertiesAreExposed/srcs/Test.java | 42 +++++ tests/reproducers/signed/DeploymentPropertiesAreExposed/testcases/DeploymentPropertiesAreExposedTest.java | 66 +++++++++ 8 files changed, 274 insertions(+), 1 deletions(-) diffs (342 lines): diff -r d17bbf43ee22 -r 9327b9bd2d37 ChangeLog --- a/ChangeLog Mon Oct 29 10:32:59 2012 +0100 +++ b/ChangeLog Mon Oct 29 15:07:56 2012 -0400 @@ -1,3 +1,22 @@ +2012-10-29 Omair Majid + + * tests/reproducers/signed/DeploymentPropertiesAreExposed/resources/DeploymentPropertiesAreExposed.jnlp, + * tests/reproducers/signed/DeploymentPropertiesAreExposed/srcs/Test.java, + * tests/reproducers/signed/DeploymentPropertiesAreExposed/testcases/DeploymentPropertiesAreExposedTest.java: + New files. + +2012-10-29 Omair Majid + + PR1186 + * netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java: + (load(boolean)): Delegate to load(File,File,boolean). + (load(File,File,boolean)): New method. + (copyTo): New method. + * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: + (initialize): Copy configuration to system properties. + * tests/netx/unit/net/sourceforge/jnlp/config/DeploymentConfigurationTest.java: + New File. + 2012-10-29 Jana Fabrikova * tests/reproducers/simple/JSToJSet diff -r d17bbf43ee22 -r 9327b9bd2d37 NEWS --- a/NEWS Mon Oct 29 10:32:59 2012 +0100 +++ b/NEWS Mon Oct 29 15:07:56 2012 -0400 @@ -20,6 +20,7 @@ - PR1145: IcedTea-Web can cause ClassCircularityError - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 - PR822: Applets fail to load if jars have different signers + - PR1186: System.getProperty("deployment.user.security.trusted.cacerts") is null New in release 1.3 (2012-XX-XX): * NetX diff -r d17bbf43ee22 -r 9327b9bd2d37 netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java --- a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Mon Oct 29 10:32:59 2012 +0100 +++ b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java Mon Oct 29 15:07:56 2012 -0400 @@ -209,6 +209,12 @@ sm.checkRead(userFile.toString()); } + File systemConfigFile = findSystemConfigFile(); + + load(systemConfigFile, userFile, fixIssues); + } + + void load(File systemConfigFile, File userFile, boolean fixIssues) throws ConfigurationException { Map> initialProperties = Defaults.getDefaults(); Map> systemProperties = null; @@ -218,7 +224,6 @@ * there is a system-level deployment.poperties file */ - File systemConfigFile = findSystemConfigFile(); if (systemConfigFile != null) { if (loadSystemConfiguration(systemConfigFile)) { if (JNLPRuntime.isDebug()) { @@ -257,6 +262,21 @@ } /** + * Copies the current configuration into the target + */ + public void copyTo(Properties target) { + Set names = getAllPropertyNames(); + + for (String name : names) { + String value = getProperty(name); + // for Properties, missing and null are identical + if (value != null) { + target.setProperty(name, value); + } + } + } + + /** * Get the value for the given key * * @param key the property key diff -r d17bbf43ee22 -r 9327b9bd2d37 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon Oct 29 10:32:59 2012 +0100 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon Oct 29 15:07:56 2012 -0400 @@ -184,6 +184,7 @@ try { config.load(); + config.copyTo(System.getProperties()); } catch (ConfigurationException e) { /* exit if there is a fatal exception loading the configuration */ if (isApplication) { diff -r d17bbf43ee22 -r 9327b9bd2d37 tests/netx/unit/net/sourceforge/jnlp/config/DeploymentConfigurationTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/netx/unit/net/sourceforge/jnlp/config/DeploymentConfigurationTest.java Mon Oct 29 15:07:56 2012 -0400 @@ -0,0 +1,72 @@ +/* DeploymentConfigurationTest.java + Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package net.sourceforge.jnlp.config; + +import static org.junit.Assert.assertTrue; + +import java.util.Properties; + +import javax.naming.ConfigurationException; + +import org.junit.Test; + +public class DeploymentConfigurationTest { + + @Test + public void testLoad() throws ConfigurationException { + DeploymentConfiguration config = new DeploymentConfiguration(); + + // FIXME test this more exhaustively + config.load(); + + assertTrue(config.getAllPropertyNames().size() > 0); + } + + @Test + public void testInstallProperties() throws ConfigurationException { + DeploymentConfiguration config = new DeploymentConfiguration(); + + config.load(); + + Properties target = new Properties(); + config.copyTo(target); + + assertTrue(target.size() != 0); + } + +} diff -r d17bbf43ee22 -r 9327b9bd2d37 tests/reproducers/signed/DeploymentPropertiesAreExposed/resources/DeploymentPropertiesAreExposed.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/DeploymentPropertiesAreExposed/resources/DeploymentPropertiesAreExposed.jnlp Mon Oct 29 15:07:56 2012 -0400 @@ -0,0 +1,52 @@ + + + + + + Verify that deployment configuration properties are exposed + IcedTea + + + + + + + + + diff -r d17bbf43ee22 -r 9327b9bd2d37 tests/reproducers/signed/DeploymentPropertiesAreExposed/srcs/Test.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/DeploymentPropertiesAreExposed/srcs/Test.java Mon Oct 29 15:07:56 2012 -0400 @@ -0,0 +1,42 @@ +/* Test.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +public class Test { + public static void main(String[] args) { + System.out.println(System.getProperty("deployment.user.logdir")); + } +} diff -r d17bbf43ee22 -r 9327b9bd2d37 tests/reproducers/signed/DeploymentPropertiesAreExposed/testcases/DeploymentPropertiesAreExposedTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/DeploymentPropertiesAreExposed/testcases/DeploymentPropertiesAreExposedTest.java Mon Oct 29 15:07:56 2012 -0400 @@ -0,0 +1,66 @@ +/* DeploymentPropertiesAreExposedTest.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + +import static org.junit.Assert.*; + +import java.io.File; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import net.sourceforge.jnlp.ServerAccess; +import org.junit.Test; + +public class DeploymentPropertiesAreExposedTest { + + + @Test + public void verifyDeploymentConfigrationIsExposedAsSystemProperties() throws Exception { + ServerAccess server = new ServerAccess(); + List trustCertificates = Arrays.asList(new String[] {"-Xtrustall"}); + + ServerAccess.ProcessResult result = server.executeJavawsHeadless( + trustCertificates, "/DeploymentPropertiesAreExposed.jnlp"); + + String expectedRegex = ".*" + File.separator + ".icedtea" + File.separator + "log" + ".*"; + String actual = result.stdout.trim(); + + boolean stdOutMatches = actual.matches(expectedRegex); + + assertTrue("'" + actual + "' should match '" + expectedRegex + "' but did not", stdOutMatches); + } + +} From bugzilla-daemon at icedtea.classpath.org Mon Oct 29 12:09:59 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 29 Oct 2012 19:09:59 +0000 Subject: [Bug 1186] System.getProperty("deployment.user.security.trusted.cacerts") is null In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1186 --- Comment #2 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea-web?cmd=changeset;node=6619b0c63455 author: Omair Majid date: Mon Oct 29 15:01:07 2012 -0400 PR1186: System.getProperty("deployment.user.security.trusted.cacerts") is null Copy deployment configration read into system properties so it is visibile to target programs. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121029/00618039/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Oct 29 12:10:07 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 29 Oct 2012 19:10:07 +0000 Subject: [Bug 1186] System.getProperty("deployment.user.security.trusted.cacerts") is null In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1186 --- Comment #3 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea-web?cmd=changeset;node=9327b9bd2d37 author: Omair Majid date: Mon Oct 29 15:07:56 2012 -0400 Reproducer for PR1186 Add a reproducer to verify that deployment properties are available to jnlp applications as system properties. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121029/3bae3ae3/attachment.html From omajid at redhat.com Mon Oct 29 12:11:37 2012 From: omajid at redhat.com (Omair Majid) Date: Mon, 29 Oct 2012 15:11:37 -0400 Subject: [PATCH] Reproducer for PR1186 In-Reply-To: <507F128D.7070001@redhat.com> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <50749D80.9040203@redhat.com> <507F128D.7070001@redhat.com> Message-ID: <508ED4E9.3070406@redhat.com> On 10/17/2012 04:18 PM, Adam Domurad wrote: > On 10/09/2012 05:56 PM, Omair Majid wrote: >> On 10/09/2012 01:52 PM, Omair Majid wrote: >>> Fix attached. >> A functional test is attached too. >> > > Good patch+reproducer. Feel free to push. Thanks for the review. Pushed: http://icedtea.classpath.org/hg/icedtea-web/rev/6619b0c63455 http://icedtea.classpath.org/hg/icedtea-web/rev/9327b9bd2d37 Cheers, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From smohammad at redhat.com Mon Oct 29 12:30:41 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Mon, 29 Oct 2012 15:30:41 -0400 Subject: [RFC][icedtea-web]: Set plugin JVM options in itw-settings Message-ID: <508ED961.4070705@redhat.com> Hi, The patch attached contains a new feature allowing users to set plugin JVM options through itw-settings. The patch also cleans up itw-settings UI by organizing debugging, desktop integration, and security tab into a single tab named Advanced Settings. A simple way of testing this feature is by adding '-verbose' within settings and launching any applet in the web-browser. You'll also note the patch removes extra spaces after it retrieves jvm options from itw-settings. This is because extra spaces can sometimes break the launch of the plugin. Thanks. CHANGELOG ======================================================================== 2012-10-29 Saad Mohammad Added new options in itw-settings which allows users to set JVM options when plugin is initialized. * netx/net/sourceforge/jnlp/config/Defaults.java (getDefaults): Added default for DeploymentConfiguration.KEY_PLUGIN_JVM_OPTIONS. * netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java: Added new property (KEY_PLUGIN_JVM_OPTIONS) that stores the value of JVM plugin options. * netx/net/sourceforge/jnlp/controlpanel/AdvancedSettingsPanel.java: New advanced settings panel containing a single organized view of older tabs and plugin settings. * netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java (createMainSettingsPanel): Added advanced settings to the list of tabs and moved debugging, desktop integration, and security from the tab list to the new panel. * netx/net/sourceforge/jnlp/controlpanel/PluginPanel: New plugin settings panel. * netx/net/sourceforge/jnlp/resources/Messages.properties: Added a new items (CPPluginJVMOptions, CPHeadPlugin, CPTabAdvancedSettings) and removed unused ones. * plugin/icedteanp/IcedTeaNPPlugin.cc: (plugin_start_appletviewer): Adds JVM options to the command that initalizes it. (get_JVM_options): Returns JVM options set in itw-settings. (trim_char): Cleans chars by removing extra spaces and new lines. * plugin/icedteanp/IcedTeaNPPlugin.h: Declaration of two new methods. -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: changelog0-1.patch Type: text/x-patch Size: 1641 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121029/56f21c29/changelog0-1.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: implementation0-1.patch Type: text/x-patch Size: 14875 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121029/56f21c29/implementation0-1.patch From omajid at redhat.com Mon Oct 29 14:29:58 2012 From: omajid at redhat.com (Omair Majid) Date: Mon, 29 Oct 2012 17:29:58 -0400 Subject: [RFC][icedtea-web]: Set plugin JVM options in itw-settings In-Reply-To: <508ED961.4070705@redhat.com> References: <508ED961.4070705@redhat.com> Message-ID: <508EF556.4040800@redhat.com> On 10/29/2012 03:30 PM, Saad Mohammad wrote: > Hi, > > The patch attached contains a new feature allowing users to set plugin JVM > options through itw-settings. The patch also cleans up itw-settings UI by > organizing debugging, desktop integration, and security tab into a single tab > named Advanced Settings. Please don't mix multiple changes in one patch. I prefer to be able to review each change (the cleanup and the jvm args) individually. I like the idea of the JVM args; we should try and get this in ASAP. Having this work for javaws programs would be nice too. I am against the cleanup. We had some of this discussion back when itweb-settings was first created too, and I think it looks better as it is right now. It seems rather arbitrary to say that certificate management, for example, is not an advanced task, while enabling debugging information is. > diff --git a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java > --- a/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java > +++ b/netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java > @@ -158,6 +158,11 @@ > public static final String KEY_BROWSER_PATH = "deployment.browser.path"; > public static final String KEY_UPDATE_TIMEOUT = "deployment.javaws.update.timeout"; > > + /* > + * Set JVM options for plugin > + */ > + public static final String KEY_PLUGIN_JVM_OPTIONS = "deployment.plugin.jvm.arguments"; > + Please pick one of "options" and "arguments" and use it in the string/varaiable/javadoc. I prefer "arguments" since this is really the command line arguments. > public enum ConfigType { > System, User > } > diff --git a/netx/net/sourceforge/jnlp/controlpanel/AdvancedSettingsPanel.java b/netx/net/sourceforge/jnlp/controlpanel/AdvancedSettingsPanel.java > new file mode 100644 > --- /dev/null > +++ b/netx/net/sourceforge/jnlp/controlpanel/AdvancedSettingsPanel.java > @@ -0,0 +1,71 @@ Missing license. > + //Add panels > + for (JPanel eachPanel : panels) { > + Dimension d = eachPanel.getMinimumSize(); > + if (d.height > height) > + height = d.height; > + if (d.width > width) > + width = d.width; > + > + settingsPanel.add(eachPanel); > + } > + > + Dimension dim = new Dimension(width + 3, height); > + this.setMinimumSize(dim); Can you avoid setting the sizes explicitly here? I thought a JScrollPane would size automatically? > + //Scroll > + JScrollPane scroller = new JScrollPane(settingsPanel); > + this.add(scroller); > diff --git a/netx/net/sourceforge/jnlp/controlpanel/PluginPanel.java b/netx/net/sourceforge/jnlp/controlpanel/PluginPanel.java > new file mode 100644 > --- /dev/null > +++ b/netx/net/sourceforge/jnlp/controlpanel/PluginPanel.java > @@ -0,0 +1,49 @@ Missing license header. > diff --git a/plugin/icedteanp/IcedTeaNPPlugin.cc b/plugin/icedteanp/IcedTeaNPPlugin.cc > --- a/plugin/icedteanp/IcedTeaNPPlugin.cc > +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc > + int numberOfCommandsToAllocate = 0; Please follow the coding conventions in the surrounding code: int number_of_commands_to_allocate = 0; > int cmd_num = 0; > + > + if(jvm_options != NULL){ > + numberOfCommandsToAllocate++; > + printf("Using user specified JVM options: '%s'\n", jvm_options); Does it make sense to always print this? Maybe PLUGIN_DEBUG should be used here instead? > + } > + > if (plugin_debug) > { > - command_line = (gchar**) malloc(sizeof(gchar*)*11); > + numberOfCommandsToAllocate += 11; > + command_line = (gchar**) malloc(sizeof(gchar*) * numberOfCommandsToAllocate); > command_line[cmd_num++] = g_strdup(appletviewer_executable); > command_line[cmd_num++] = g_strdup(PLUGIN_BOOTCLASSPATH); > // set the classpath to avoid using the default (cwd). > command_line[cmd_num++] = g_strdup("-classpath"); > command_line[cmd_num++] = g_strdup_printf("%s/lib/rt.jar", ICEDTEA_WEB_JRE); > + > + if (jvm_options != NULL) > + command_line[cmd_num++] = g_strdup(jvm_options); Would this work with multiple arguments? Suppose I set the args to "-Xcheck:jni -Xfuture" using itweb-settings. jvm_options will see it and this code will pass it as a single argument to the JVM, no? > > + if (jvm_options != NULL){ > + g_free(jvm_options); > + jvm_options = NULL; > + } g_free() on NULL is a no-op. You can just call g_free(jvm_options) without checking if it's NULL or not. > + > + //Get JVM options set in itw-settings > + g_spawn_command_line_sync(cmd_line_str, &output, NULL, NULL, &channel_error); So we sync-spawn a JVM to find the arguments. That seems rather an expensive operation. And we do this unconditionally when the first applet needs to be loaded, delaying the applet startup. Is there a performance (especially user-visible performance) impact of this? Does the browser stall when loading the first applet? > + > + //Free memory > + g_free(commands); Command was allocated using malloc(). It should be free'ed using free(), not g_free(). > diff --git a/plugin/icedteanp/IcedTeaNPPlugin.h b/plugin/icedteanp/IcedTeaNPPlugin.h > --- a/plugin/icedteanp/IcedTeaNPPlugin.h > +++ b/plugin/icedteanp/IcedTeaNPPlugin.h > @@ -136,4 +136,10 @@ > /* Creates a new scriptable plugin object and returns it */ > NPObject* allocate_scriptable_object(NPP npp, NPClass *aClass); > > +/* Returns JVM options set in itw-settings */ > +static gchar* get_JVM_options(); > + > +/* Removes newlines and extra spaces from char */ > +static char* trim_char(char* to_trim); > + static functions declared in a header file? Why are you doing this? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From jvanalte at redhat.com Mon Oct 29 18:49:17 2012 From: jvanalte at redhat.com (Jon VanAlten) Date: Mon, 29 Oct 2012 21:49:17 -0400 (EDT) Subject: [RFC] Enhanced Garbage Collection Probe Points In-Reply-To: <561523661.6232111.1351170539693.JavaMail.root@redhat.com> Message-ID: <1299938704.3549181.1351561757214.JavaMail.root@redhat.com> > > > > > > I've updated the patch slightly to reflect a correction in > > > psScavenge.cpp that was causing a build error when icedtea-debug > > > wasn't > > > specified. The rest of the patch is unchanged from before. > > > > > > > And I've now pushed this. I know it's preferred that new work > > goes to forest in general, but this was discussed earlier when > > patch was originally posted, and afaict the feeling was it > > would be better to move all systemtap related patches there in > > one step some time later[1]. > > > > Thanks Lukas for this contribution! > > > > Why has this been pushed? We don't want more patches adding to > IcedTea7. > Please revert. > I'm sorry for the mix-up. Andrew and I discussed this further offline (sorry, this did not happen in public, but neither was it intentionally private). We reached the conclusion (I believe) that it would be best to wait and hear from Mark about plans referred to in email archive link below. Mark, do you have any comment here? Would it be for the best to revert here and apply instead to 7 forest? Also, I've backported this changeset to icedtea6, and it should also probably go somehow to 8. Can someone refresh me, as a rather seldom-contributor here, what the correct repos are for these? Thanks! jon > > [1] > > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-August/020066.html > > > > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > PGP Key: 248BDC07 (https://keys.indymedia.org/) > Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 > > From bugzilla-daemon at icedtea.classpath.org Mon Oct 29 21:30:49 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 30 Oct 2012 04:30:49 +0000 Subject: [Bug 1205] New: Plugin crashes with java.lang.NullPointerException with AUSkey software Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1205 Priority: P3 Bug ID: 1205 CC: unassigned at icedtea.classpath.org Assignee: dbhole at redhat.com Summary: Plugin crashes with java.lang.NullPointerException with AUSkey software Severity: normal Classification: Unclassified OS: Linux Reporter: dp.maxime at gmail.com Hardware: x86_64 Status: NEW Version: 1.2 Component: Plugin Product: IcedTea-Web Created attachment 786 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=786&action=edit An archive with plugin.log java.stderr java.stdout and JNLPClassLoader.java.patch Both icedtea-6-plugin and iceadtea-7-plugin from Ubuntu 12.04 Precise Pangolin (all latest updates are installed) crash with java.lang.NullPointerException when working with AUSkey software, see https://www.auskey.abr.gov.au/plugin/AUSkey_software_for_Linux.zip plugin.log and files from ~/.icedtea/log directory are in the archive attached. Also I've put a patch which fix the problem. A short instruction how to apply this patch on Ubuntu 12.04 see here: http://blog.dataparksearch.org/334 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121030/541bd432/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Oct 29 21:50:22 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 30 Oct 2012 04:50:22 +0000 Subject: [Bug 1016] IcedTea-web sandboxes all jars in mixed unsigned jars + signed jars applets In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1016 Maxim changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dp.maxime at gmail.com --- Comment #1 from Maxim --- Try with the patch proposed for bug #1205: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1205 Your applet seems to be working with this patch. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121030/65fb6c94/attachment.html From mark at klomp.org Tue Oct 30 01:03:05 2012 From: mark at klomp.org (Mark Wielaard) Date: Tue, 30 Oct 2012 09:03:05 +0100 Subject: [RFC] Enhanced Garbage Collection Probe Points In-Reply-To: <1299938704.3549181.1351561757214.JavaMail.root@redhat.com> References: <561523661.6232111.1351170539693.JavaMail.root@redhat.com> <1299938704.3549181.1351561757214.JavaMail.root@redhat.com> Message-ID: <20121030080304.GA12689@toonder.wildebeest.org> On Mon, Oct 29, 2012 at 09:49:17PM -0400, Jon VanAlten wrote: > We reached the conclusion (I believe) that it would be best to > wait and hear from Mark about plans referred to in email archive > link below. Mark, do you have any comment here? Would it be > for the best to revert here and apply instead to 7 forest? Adding patches directly to the tree is fine with me. My only hesitation was my own confusion since the default configure/make setup doesn't pick up a patched forest. You don't have that issue with patches, which are directly applied. If we are going for a complete forest setup it might make sense to also add the tapsets and testsuite directly there. I'll try and figure it all out again and also port the existing patches to the forest. Hints and tips appreciated. Cheers, Mark From helpcrypto at gmail.com Tue Oct 30 01:11:34 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Tue, 30 Oct 2012 09:11:34 +0100 Subject: [PATCH] Reproducer for PR1186 In-Reply-To: <508ED4E9.3070406@redhat.com> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <50749D80.9040203@redhat.com> <507F128D.7070001@redhat.com> <508ED4E9.3070406@redhat.com> Message-ID: Does this mean this will be fixed on next release? On Mon, Oct 29, 2012 at 8:11 PM, Omair Majid wrote: > On 10/17/2012 04:18 PM, Adam Domurad wrote: >> On 10/09/2012 05:56 PM, Omair Majid wrote: >>> On 10/09/2012 01:52 PM, Omair Majid wrote: >>>> Fix attached. >>> A functional test is attached too. >>> >> >> Good patch+reproducer. Feel free to push. > > Thanks for the review. Pushed: > http://icedtea.classpath.org/hg/icedtea-web/rev/6619b0c63455 > http://icedtea.classpath.org/hg/icedtea-web/rev/9327b9bd2d37 > > Cheers, > Omair > > -- > PGP Key: 66484681 (http://pgp.mit.edu/) > Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From gnu.andrew at redhat.com Tue Oct 30 05:37:31 2012 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Tue, 30 Oct 2012 08:37:31 -0400 (EDT) Subject: [RFC] Enhanced Garbage Collection Probe Points In-Reply-To: <1299938704.3549181.1351561757214.JavaMail.root@redhat.com> Message-ID: <46828227.1968825.1351600651879.JavaMail.root@redhat.com> ----- Original Message ----- > > > > > > > > > I've updated the patch slightly to reflect a correction in > > > > psScavenge.cpp that was causing a build error when > > > > icedtea-debug > > > > wasn't > > > > specified. The rest of the patch is unchanged from before. > > > > > > > > > > And I've now pushed this. I know it's preferred that new work > > > goes to forest in general, but this was discussed earlier when > > > patch was originally posted, and afaict the feeling was it > > > would be better to move all systemtap related patches there in > > > one step some time later[1]. > > > > > > Thanks Lukas for this contribution! > > > > > > > Why has this been pushed? We don't want more patches adding to > > IcedTea7. > > Please revert. > > > > I'm sorry for the mix-up. Andrew and I discussed this further > offline (sorry, this did not happen in public, but neither was it > intentionally private). > > We reached the conclusion (I believe) that it would be best to > wait and hear from Mark about plans referred to in email archive > link below. Mark, do you have any comment here? Would it be > for the best to revert here and apply instead to 7 forest? > > Also, I've backported this changeset to icedtea6, and it should > also probably go somehow to 8. Can someone refresh me, as a > rather seldom-contributor here, what the correct repos are for > these? > Patch needs to be applied to: http://icedtea.classpath.org/hg/icedtea6/ http://icedtea.classpath.org/hg/icedtea7-forest/jdk/ http://icedtea.classpath.org/hg/icedtea8-forest/jdk/ and reverted from: http://icedtea.classpath.org/hg/icedtea7/ as all patches for 7 & 8 go to the forest. > Thanks! > jon > > > > [1] > > > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-August/020066.html > > > > > > > -- > > Andrew :) > > > > Free Java Software Engineer > > Red Hat, Inc. (http://www.redhat.com) > > > > PGP Key: 248BDC07 (https://keys.indymedia.org/) > > Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 > > > > > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From adomurad at redhat.com Tue Oct 30 06:35:30 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 30 Oct 2012 09:35:30 -0400 Subject: [PATCH] Reproducer for PR1186 In-Reply-To: References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <50749D80.9040203@redhat.com> <507F128D.7070001@redhat.com> <508ED4E9.3070406@redhat.com> Message-ID: <508FD7A2.2030101@redhat.com> On 10/30/2012 04:11 AM, helpcrypto helpcrypto wrote: > Does this mean this will be fixed on next release? > > On Mon, Oct 29, 2012 at 8:11 PM, Omair Majid wrote: >> On 10/17/2012 04:18 PM, Adam Domurad wrote: >>> On 10/09/2012 05:56 PM, Omair Majid wrote: >>>> On 10/09/2012 01:52 PM, Omair Majid wrote: >>>>> Fix attached. >>>> A functional test is attached too. >>>> >>> Good patch+reproducer. Feel free to push. >> Thanks for the review. Pushed: >> http://icedtea.classpath.org/hg/icedtea-web/rev/6619b0c63455 >> http://icedtea.classpath.org/hg/icedtea-web/rev/9327b9bd2d37 >> >> Cheers, >> Omair >> >> -- >> PGP Key: 66484681 (http://pgp.mit.edu/) >> Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 Yes, it will be fixed whenever we release 1.4 (unless Omair also backports to 1.3). Thanks for the bug reports! - Adam From helpcrypto at gmail.com Tue Oct 30 06:53:11 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Tue, 30 Oct 2012 14:53:11 +0100 Subject: [PATCH] Reproducer for PR1186 In-Reply-To: <508FD7A2.2030101@redhat.com> References: <20120926154513.GQ23406@redhat.com> <50698939.8050107@redhat.com> <50746457.5000300@redhat.com> <50749D80.9040203@redhat.com> <507F128D.7070001@redhat.com> <508ED4E9.3070406@redhat.com> <508FD7A2.2030101@redhat.com> Message-ID: hurrah! now, ill start asking about my other two reports (i have a third ready!) Thank you A LOT On Tue, Oct 30, 2012 at 2:35 PM, Adam Domurad wrote: > On 10/30/2012 04:11 AM, helpcrypto helpcrypto wrote: >> >> Does this mean this will be fixed on next release? >> >> On Mon, Oct 29, 2012 at 8:11 PM, Omair Majid wrote: >>> >>> On 10/17/2012 04:18 PM, Adam Domurad wrote: >>>> >>>> On 10/09/2012 05:56 PM, Omair Majid wrote: >>>>> >>>>> On 10/09/2012 01:52 PM, Omair Majid wrote: >>>>>> >>>>>> Fix attached. >>>>> >>>>> A functional test is attached too. >>>>> >>>> Good patch+reproducer. Feel free to push. >>> >>> Thanks for the review. Pushed: >>> http://icedtea.classpath.org/hg/icedtea-web/rev/6619b0c63455 >>> http://icedtea.classpath.org/hg/icedtea-web/rev/9327b9bd2d37 >>> >>> Cheers, >>> Omair >>> >>> -- >>> PGP Key: 66484681 (http://pgp.mit.edu/) >>> Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 > > > Yes, it will be fixed whenever we release 1.4 (unless Omair also backports > to 1.3). > > Thanks for the bug reports! > - Adam From helpcrypto at gmail.com Tue Oct 30 06:55:51 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Tue, 30 Oct 2012 14:55:51 +0100 Subject: One battle after another (Bug 1198 - JSObject is not valid on Javascript side) Message-ID: So, what you guys say about this bug? http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1198 (I have another 2 bugs related to PKCS11, but they arent critical, and involve much more diggin) Thanks! From bugzilla-daemon at icedtea.classpath.org Tue Oct 30 10:22:42 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 30 Oct 2012 17:22:42 +0000 Subject: [Bug 1206] New: S7201205: Add Makefile configuration option to build with unlimited crypto in OpenJDK Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1206 Priority: P3 Bug ID: 1206 CC: unassigned at icedtea.classpath.org Assignee: gnu.andrew at redhat.com Summary: S7201205: Add Makefile configuration option to build with unlimited crypto in OpenJDK Severity: normal Classification: Unclassified OS: Linux Reporter: gnu.andrew at redhat.com Hardware: x86_64 Status: NEW Version: 7-hg Component: IcedTea Product: IcedTea Upstreamed as: 7201205: Add Makefile configuration option to build with unlimited crypto in OpenJDK http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/9e879c0288c2 http://hg.openjdk.java.net/icedtea/jdk7/jdk/rev/1406789608b7 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121030/c7c2d770/attachment.html From bugzilla-daemon at icedtea.classpath.org Tue Oct 30 10:23:07 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 30 Oct 2012 17:23:07 +0000 Subject: [Bug 1206] S7201205: Add Makefile configuration option to build with unlimited crypto in OpenJDK In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1206 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |1170, 1139 Target Milestone|--- |2.4 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121030/9cc3f429/attachment.html From smohammad at redhat.com Tue Oct 30 11:55:02 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Tue, 30 Oct 2012 14:55:02 -0400 Subject: [RFC][icedtea-web]: Reproducer for DownloadService In-Reply-To: <50772C64.7060808@redhat.com> References: <50609FA3.8040701@redhat.com> <1349124118.17801.108.camel@adomurad-desktop> <50772C64.7060808@redhat.com> Message-ID: <50902286.3000605@redhat.com> Ping? This post is slowly getting lost.. It would be nice to get this reviewed quickly as DownloadService implementation patch is waiting on this to be pushed. On 10/11/2012 04:30 PM, Saad Mohammad wrote: > On 10/01/2012 04:41 PM, Adam Domurad wrote: >> There's a few general concerns here (Mostly a result of this being hard to test): >> >> 1. this generally looks like a unit test >> - As discussed on IRC, this is probably OK considering that its quite difficult to unit test DownloadService in isolation. >> >> 2. checking for 'true' or 'false' is a bit brittle, it'd be better if you could print all the cached resources and having the test check >> - Also discussed on IRC, this would be difficult to do with the given API for handling cached resources >> >> 3. its all one interdependent test, ran as one process. I think a >> slightly better approach would be to take an argument to >> DownloadServiceRunner that determines the test run type, and run the >> minimal commands needed to test that component. For example, >> loadExternalResource could be tested in isolation from loadPart. > > Hi Adam, > > Thanks for the review. Updated patch is attached. > > As we discussed on IRC, satisfying #1 & #2 would be very difficult at the > moment. However, I did make some changes for #3. > > What's new? > * Runs three different instances of DownloadServiceRunner to avoid > dependency of one process to output results. Checking cache, managing > jnlp resources, and managing external jnlps are verified by the stdout > of the three instances. > * Added two test which checks repeated calls of unloading and loading > a single resource > > ======================================================================== > CHANGELOG > ======================================================================== > 2012-10-11 Saad Mohammad > > Added reproducer for DownloadService. > * tests/reproducers/signed/DownloadService/resources/DownloadService.jnlp: > Launching jnlp file that contains extension jnlp and jars marked with part names. > * tests/reproducers/signed/DownloadService/resources/DownloadServiceExtension.jnlp: > DownloadService extension jnlp file with jars marked with part names. > * tests/reproducers/signed/DownloadService/srcs/DownloadServiceRunner.java: > A simple class that uses DownloadService to complete tasks and outputs the results. > * tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java: > Testcase for DownloadService. > > -- Cheers, Saad Mohammad From adomurad at redhat.com Tue Oct 30 13:06:19 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 30 Oct 2012 16:06:19 -0400 Subject: [rfc][icedtea-web] Remove need for HTML tag scanner in PluginAppletViewer In-Reply-To: <508A8C6D.6070100@redhat.com> References: <50899C9E.8020204@redhat.com> <508A8C6D.6070100@redhat.com> Message-ID: <5090333B.7070507@redhat.com> On 10/26/2012 09:13 AM, Jiri Vanek wrote: > On 10/25/2012 10:10 PM, Adam Domurad wrote: >> Hi all. This is something I've wanted to do for a while, simply >> because of the hackish nature of the >> applet/object/embed tag parsing code in ITW. Thoughts welcome, I'll >> still be doing some more testing >> on this (looks good so far) but would appreciate feedback. The patch >> also makes it possible to do >> unit tests from classes included in plugin.jar (used to unit test the >> new >> sun.java.PluginAppletAttributes). >> >> The applet tag information flows like this pre-patch: >> - NPAPI parses the tag information >> - ITW's C++ side takes in the already-parsed tag information, creates >> an embed tag (embed tag only) >> for ITW to use. >> - ITW's java side receives the tag, and scans it using (less than >> desirable) parsing routines. >> >> Post-patch: >> - NPAPI parses the tag information >> - ITW's C++ side generates a simple listing of the name value pairs >> passed >> - ITW's java side parses these name value pairs > > I like this patch. I found several issues which had come across my > mind, but I think during other reviews there will come more of them. > Also I'm not 100% capable to verify C code. SO before aprove I will > definitely check with Pavel or somebody else can do this. I checked c > part only from logical point of view. >> >> Points of contention: >> - PluginAppletViewer#parse had a 'ydisp' variable that has been >> changed to a static variable, since >> the parse method will now only ever handle one applet tag (the old >> version expected to have >> potentially multiple). However I'm not 100% about this because the >> old version as well only ever >> received one applet tag, rendering this effectively to always be 1... >> I'm not sure if the behaviour >> should be 'fixed' this way. > > Your arguments seemed valid. And although PluginAppletViewer is > singleton, making the ydisp variable static looks like it will behave > differently. I would recommend empiric testing :)) See how multiple > applets are shown on (multiple)page(s) and compare with your new > implementation :) >> >> - The code was made to behave as-it-were as much as possible, meaning >> it can print a warning about a >> "missing code attribute in the embed tag" no matter what tag was >> used. This is as it was because ITW >> would always get passed an embed tag. Feel free to force me to change >> it:) >> >> ChangeLog: >> 2012-10-25 Adam Domurad >> >> Remove the applet/embed/object tag parser from ITW. Send the applet >> parameters directly from the C++. >> * Makefile.am: Allow unit-testing for classes in plugin.jar. >> * plugin/icedteanp/IcedTeaNPPlugin.cc: Send quoted parameter >> name/values instead of applet tag. Remove some dead code. >> * plugin/icedteanp/IcedTeaNPPlugin.h: Rename applet_tag -> >> parameters_string. >> * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: >> Extract parsing code into its own class. >> * plugin/icedteanp/java/sun/applet/PluginAppletAttributes.java: >> New, encapsulates the (simplified) attribute parsing logic. >> * tests/netx/unit/sun/applet/PluginAppletAttributesTest.java: >> Unit tests for parsing logic. >> >> >> nuke-parser.patch >> >> >> diff --git a/Makefile.am b/Makefile.am >> --- a/Makefile.am >> +++ b/Makefile.am >> @@ -882,7 +882,7 @@ stamps/netx-unit-tests-compile.stamp: st >> mkdir -p $(NETX_UNIT_TEST_DIR) && \ >> $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \ >> -d $(NETX_UNIT_TEST_DIR) \ >> - -classpath >> $(JUNIT_JAR):$(NETX_DIR)/lib/classes.jar:$(TEST_EXTENSIONS_DIR) \ >> + -classpath >> $(JUNIT_JAR):$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar:$(NETX_DIR)/lib/classes.jar:$(TEST_EXTENSIONS_DIR) >> \ >> @netx-unit-tests-source-files.txt && \ >> mkdir -p stamps && \ >> touch $@ >> @@ -912,7 +912,7 @@ stamps/run-netx-unit-tests.stamp: stamps >> done ; \ >> cd $(NETX_UNIT_TEST_DIR) ; \ >> class_names=`cat $(UNIT_CLASS_NAMES)` ; \ >> - >> CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):. >> \ >> + >> CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):. >> \ >> $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine >> $$class_names >> if WITH_XSLTPROC >> $(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl >> $(NETX_UNIT_TEST_DIR)/ServerAccess-logs.xml > >> $(TESTS_DIR)/logs_unit.html >> diff --git a/netx-dist-tests-whitelist b/netx-dist-tests-whitelist >> --- a/netx-dist-tests-whitelist >> +++ b/netx-dist-tests-whitelist >> @@ -1,1 +1,1 @@ >> -.* >> +Applet.* >> diff --git a/plugin/icedteanp/IcedTeaNPPlugin.cc >> b/plugin/icedteanp/IcedTeaNPPlugin.cc >> --- a/plugin/icedteanp/IcedTeaNPPlugin.cc >> +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc >> @@ -229,8 +229,7 @@ static gboolean plugin_out_pipe_callback >> GIOCondition condition, >> gpointer plugin_data); >> static NPError plugin_start_appletviewer (ITNPPluginData* data); >> -static gchar* plugin_create_applet_tag (int16_t argc, char* argn[], >> - char* argv[]); >> +static std::string plugin_parameters_string (int argc, char* argn[], >> char* argv[]); >> static void plugin_stop_appletviewer (); >> // Uninitialize ITNPPluginData structure >> static void plugin_data_destroy (NPP instance); >> @@ -347,7 +346,6 @@ ITNP_New (NPMIMEType pluginType, NPP ins >> >> gchar* documentbase = NULL; >> gchar* read_message = NULL; >> - gchar* applet_tag = NULL; >> gchar* cookie_info = NULL; >> >> NPObject* npPluginObj = NULL; >> @@ -395,11 +393,10 @@ ITNP_New (NPMIMEType pluginType, NPP ins >> documentbase = plugin_get_documentbase (instance); >> if (documentbase && argc != 0) >> { >> - // Send applet tag message to appletviewer. >> - applet_tag = plugin_create_applet_tag (argc, argn, argv); >> - >> - data->applet_tag = (gchar*) >> malloc(strlen(applet_tag)*sizeof(gchar) + >> strlen(documentbase)*sizeof(gchar) + 32); >> - g_sprintf(data->applet_tag, "tag %s %s", documentbase, >> applet_tag); >> + // Send parameters to appletviewer. >> + std::string params_string = plugin_parameters_string(argc, >> argn, argv); >> + >> + data->parameters_string = g_strdup_printf("tag %s %s", >> documentbase, params_string.c_str()); >> >> data->is_applet_instance = true; >> } >> @@ -424,33 +421,7 @@ ITNP_New (NPMIMEType pluginType, NPP ins >> >> instance->pdata = data; >> >> - goto cleanup_done; >> - >> - cleanup_appletviewer_mutex: >> - g_mutex_free (data->appletviewer_mutex); >> - data->appletviewer_mutex = NULL; >> - >> - // cleanup_instance_string: >> - g_free (data->instance_id); >> - data->instance_id = NULL; >> - >> - // cleanup applet tag: >> - g_free (data->applet_tag); >> - data->applet_tag = NULL; >> - >> - // cleanup_data: >> - // Eliminate back-pointer to plugin instance. >> - data->owner = NULL; >> - (*browser_functions.memfree) (data); >> - data = NULL; >> - >> - // Initialization failed so return a NULL pointer for the browser >> - // data. >> - instance->pdata = NULL; >> - >> cleanup_done: >> - g_free (applet_tag); >> - applet_tag = NULL; >> g_free (read_message); >> read_message = NULL; >> g_free (documentbase); >> @@ -834,7 +805,7 @@ ITNP_SetWindow (NPP instance, NPWindow* >> // Now we have everything. Send this data to the Java side >> plugin_send_initialization_message( >> data->instance_id, (gulong) data->window_handle, >> - data->window_width, data->window_height, >> data->applet_tag); >> + data->window_width, data->window_height, >> data->parameters_string); >> >> g_mutex_unlock (data->appletviewer_mutex); >> >> @@ -1696,157 +1667,66 @@ plugin_start_appletviewer (ITNPPluginDat >> >> /* >> * Replaces certain characters (\r, \n, etc) with HTML escape >> equivalents. >> - * >> - * Return string is allocated on the heap. Caller assumes >> responsibility >> - * for freeing the memory via free() >> */ >> -static char* >> -encode_string(char* to_encode) >> -{ >> - >> - // Do nothing for an empty string >> - if (to_encode == '\0') >> - return to_encode; >> - >> - // worst case scenario -> all characters are newlines or >> - // returns, each of which translates to 5 substitutions >> - char* encoded = (char*) calloc(((strlen(to_encode)*5)+1), >> sizeof(char)); >> - >> - strcpy(encoded, ""); >> - >> - for (int i=0; i < strlen(to_encode); i++) >> +static std::string >> +encode_string(const char* to_encode) { >> + std::string encoded; >> + >> + if (to_encode == NULL) >> + { >> + return encoded; >> + } >> + >> + size_t length = strlen(to_encode); >> + for (int i=0; i < length; i++) >> { >> if (to_encode[i] == '\r') >> - encoded = strcat(encoded, " "); >> + encoded += " "; >> else if (to_encode[i] == '\n') >> - encoded = strcat(encoded, " "); >> + encoded += " "; >> else if (to_encode[i] == '>') >> - encoded = strcat(encoded, ">"); >> + encoded += ">"; >> else if (to_encode[i] == '<') >> - encoded = strcat(encoded, "<"); >> + encoded += "<"; >> else if (to_encode[i] == '&') >> - encoded = strcat(encoded, "&"); >> + encoded += "&"; >> else if (to_encode[i] == '"') >> - encoded = strcat(encoded, """); >> + encoded += """; >> else >> - { >> - char* orig_char = (char*) calloc(2, sizeof(char)); >> - orig_char[0] = to_encode[i]; >> - orig_char[1] = '\0'; >> - >> - strcat(encoded, orig_char); >> - >> - free(orig_char); >> - orig_char = NULL; >> - } >> + encoded += to_encode[i]; >> } >> >> return encoded; > > This is probably strangest stuff in patch. NPAPI is returning already > decoded strings. Why to encode them again?!?!?! > > Unless I see something very wrong, get rid of this unnecessary middle > step! > >> } >> >> -// Build up the applet tag string that we'll send to the applet >> -// viewer. >> -static gchar* >> -plugin_create_applet_tag (int16_t argc, char* argn[], char* argv[]) >> +// Build a string containing an encoded list of parameters to send to >> +// the applet viewer >> +static std::string >> +plugin_parameters_string (int argc, char* argn[], char* argv[]) >> { >> - PLUGIN_DEBUG ("plugin_create_applet_tag\n"); >> - >> - gchar* applet_tag = g_strdup ("> - gchar* parameters = g_strdup (""); >> - >> - for (int16_t i = 0; i < argc; i++) >> + PLUGIN_DEBUG ("plugin_parameters_string\n"); >> + >> + std::string parameters; >> + >> + for (int i = 0; i < argc; i++) >> + { >> + if (argv[i] != NULL) >> { >> - gchar* argn_escaped = encode_string(argn[i]); >> - gchar* argv_escaped = encode_string(argv[i]); >> - >> - if (!g_ascii_strcasecmp (argn_escaped, "code")) >> - { >> - gchar* code = g_strdup_printf ("CODE=\"%s\" ", argv_escaped); >> - applet_tag = g_strconcat (applet_tag, code, NULL); >> - g_free (code); >> - code = NULL; >> + std::string name_escaped = encode_string(argn[i]); >> + std::string value_escaped = encode_string(argv[i]); >> + >> + //Encode parameters and send as '"name1" "value1" "name2" >> "value2"' etc >> + parameters += "\""; >> + parameters += name_escaped; >> + parameters += "\" "; >> + parameters += value_escaped; >> + parameters += "\" "; >> } >> - else if (!g_ascii_strcasecmp (argn_escaped, "java_code")) >> - { >> - gchar* java_code = g_strdup_printf ("JAVA_CODE=\"%s\" ", >> argv_escaped); >> - applet_tag = g_strconcat (applet_tag, java_code, NULL); >> - g_free (java_code); >> - java_code = NULL; >> - } >> - else if (!g_ascii_strcasecmp (argn_escaped, "codebase")) >> - { >> - gchar* codebase = g_strdup_printf ("CODEBASE=\"%s\" ", >> argv_escaped); >> - applet_tag = g_strconcat (applet_tag, codebase, NULL); >> - g_free (codebase); >> - codebase = NULL; >> - } >> - else if (!g_ascii_strcasecmp (argn_escaped, "java_codebase")) >> - { >> - gchar* java_codebase = g_strdup_printf >> ("JAVA_CODEBASE=\"%s\" ", argv_escaped); >> - applet_tag = g_strconcat (applet_tag, java_codebase, NULL); >> - g_free (java_codebase); >> - java_codebase = NULL; >> - } >> - else if (!g_ascii_strcasecmp (argn_escaped, "classid")) >> - { >> - gchar* classid = g_strdup_printf ("CLASSID=\"%s\" ", >> argv_escaped); >> - applet_tag = g_strconcat (applet_tag, classid, NULL); >> - g_free (classid); >> - classid = NULL; >> - } >> - else if (!g_ascii_strcasecmp (argn_escaped, "archive")) >> - { >> - gchar* archive = g_strdup_printf ("ARCHIVE=\"%s\" ", >> argv_escaped); >> - applet_tag = g_strconcat (applet_tag, archive, NULL); >> - g_free (archive); >> - archive = NULL; >> - } >> - else if (!g_ascii_strcasecmp (argn_escaped, "java_archive")) >> - { >> - gchar* java_archive = g_strdup_printf >> ("JAVA_ARCHIVE=\"%s\" ", argv_escaped); >> - applet_tag = g_strconcat (applet_tag, java_archive, NULL); >> - g_free (java_archive); >> - java_archive = NULL; >> - } >> - else if (!g_ascii_strcasecmp (argn_escaped, "width")) >> - { >> - gchar* width = g_strdup_printf ("width=\"%s\" ", >> argv_escaped); >> - applet_tag = g_strconcat (applet_tag, width, NULL); >> - g_free (width); >> - width = NULL; >> - } >> - else if (!g_ascii_strcasecmp (argn_escaped, "height")) >> - { >> - gchar* height = g_strdup_printf ("height=\"%s\" ", >> argv_escaped); >> - applet_tag = g_strconcat (applet_tag, height, NULL); >> - g_free (height); >> - height = NULL; >> - } >> - else >> - { >> - >> - if (argv_escaped != '\0') >> - { >> - parameters = g_strconcat (parameters, "> NAME=\"", argn_escaped, >> - "\" VALUE=\"", argv_escaped, >> "\">", NULL); >> - } >> - } >> - >> - free(argn_escaped); >> - free(argv_escaped); >> - >> - argn_escaped = NULL; >> - argv_escaped = NULL; >> - } >> - >> - applet_tag = g_strconcat (applet_tag, ">", parameters, "", >> NULL); >> - >> - g_free (parameters); >> - parameters = NULL; >> - >> - PLUGIN_DEBUG ("plugin_create_applet_tag return\n"); >> - >> - return applet_tag; >> + } >> + >> + PLUGIN_DEBUG ("plugin_parameters_string return\n"); >> + >> + return parameters; >> } >> >> // plugin_send_message_to_appletviewer must be called while holding >> @@ -2057,8 +1937,8 @@ plugin_data_destroy (NPP instance) >> tofree->instance_id = NULL; >> >> // cleanup applet tag >> - g_free (tofree->applet_tag); >> - tofree->applet_tag = NULL; >> + g_free (tofree->parameters_string); >> + tofree->parameters_string = NULL; >> >> g_free(tofree->source); >> tofree->source = NULL; >> @@ -2537,7 +2417,7 @@ get_scriptable_object(NPP instance) >> // a 0 handle >> if (!data->window_handle) >> { >> - plugin_send_initialization_message(data->instance_id, 0, 0, 0, >> data->applet_tag); >> + plugin_send_initialization_message(data->instance_id, 0, 0, 0, >> data->parameters_string); >> } >> >> java_result = java_request.getAppletObjectInstance(id_str); >> diff --git a/plugin/icedteanp/IcedTeaNPPlugin.h >> b/plugin/icedteanp/IcedTeaNPPlugin.h >> --- a/plugin/icedteanp/IcedTeaNPPlugin.h >> +++ b/plugin/icedteanp/IcedTeaNPPlugin.h >> @@ -66,8 +66,8 @@ struct ITNPPluginData >> { >> // A unique identifier for this plugin window. >> gchar* instance_id; >> - // The applet tag sent to Java side >> - gchar* applet_tag; >> + // The parameter list string sent to Java side >> + gchar* parameters_string; >> // Mutex to protect appletviewer_alive. >> GMutex* appletviewer_mutex; >> // Back-pointer to the plugin instance to which this data belongs. >> diff --git >> a/plugin/icedteanp/java/sun/applet/PluginAppletAttributes.java >> b/plugin/icedteanp/java/sun/applet/PluginAppletAttributes.java >> new file mode 100644 >> --- /dev/null >> +++ b/plugin/icedteanp/java/sun/applet/PluginAppletAttributes.java >> @@ -0,0 +1,169 @@ >> +/* PluginAppletAttributes -- Provides parsing for applet attributes >> + Copyright (C) 2012 Red Hat >> + >> +This file is part of IcedTea. >> + >> +IcedTea is free software; you can redistribute it and/or modify >> +it under the terms of the GNU General Public License as published by >> +the Free Software Foundation; either version 2, or (at your option) >> +any later version. >> + >> +IcedTea is distributed in the hope that it will be useful, but >> +WITHOUT ANY WARRANTY; without even the implied warranty of >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> +General Public License for more details. >> + >> +You should have received a copy of the GNU General Public License >> +along with IcedTea; see the file COPYING. If not, write to the >> +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >> Boston, MA >> +02110-1301 USA. >> + >> +Linking this library statically or dynamically with other modules is >> +making a combined work based on this library. Thus, the terms and >> +conditions of the GNU General Public License cover the whole >> +combination. >> + >> +As a special exception, the copyright holders of this library give you >> +permission to link this library with independent modules to produce an >> +executable, regardless of the license terms of these independent >> +modules, and to copy and distribute the resulting executable under >> +terms of your choice, provided that you also meet, for each linked >> +independent module, the terms and conditions of the license of that >> +module. An independent module is a module which is not derived from >> +or based on this library. If you modify this library, you may extend >> +this exception to your version of the library, but you are not >> +obligated to do so. If you do not wish to do so, delete this >> +exception statement from your version. */ >> + >> +package sun.applet; >> + >> +import java.io.PrintStream; >> +import java.util.ArrayList; >> +import java.util.Enumeration; >> +import java.util.Hashtable; >> +import java.util.List; >> + >> +/** >> + * Provides parsing for applet attributes passed from the C++ side >> as quoted, >> + * encoded strings. This class is not meant to be initialized > > No author in ITW sources please:) > > Please, mke this class as classical object. You can still keep some > static (or singleton) utility methods here, but prefer more object way: > > Hashtable atts = > PluginAppletAttributes.getPArser().parse(width, height, tag); > or > Hashtable atts = new > PluginAppletAttributes().parse(width, height, tag); > > Although I would like to recomand to wrap the Hashtable String> to Object. Eg ParsedAppletTag. so the above methods wirr > return this one. > One will thenbe able to access parsedAppletTag.getKey() and will be > also able to recieve something else then Strings > > And again. Get rid of redundant decoding! > > >> + * @author Adam Domurad >> + */ >> +class PluginAppletAttributes { >> + /** >> + * Decodes the string (converts html escapes into proper >> characters) >> + * >> + * @param toDecode The string to decode >> + * @return The decoded string >> + */ >> + static String decodeString(String toDecode) { >> + >> + toDecode = toDecode.replace(">", ">"); >> + toDecode = toDecode.replace("<", "<"); >> + toDecode = toDecode.replace(" ", "\n"); >> + toDecode = toDecode.replace(" ", "\r"); >> + toDecode = toDecode.replace(""", "\""); >> + toDecode = toDecode.replace("&", "&"); >> + >> + return toDecode; >> + } >> + >> + static final boolean isInt(String s) { >> + try { >> + Integer.parseInt(s); >> + return true; >> + } catch (NumberFormatException e) { >> + return false; >> + } >> + } > > :DDD no! :D Although this give sense, I would not recommand usage of > exception for directing the flow of code :) > My suggestion will be matches \d+ ;) > I have also some susspiccion that there is ssDigit method somewhere. > >> + >> + static List extractQuotedStrings(String s) { >> + List strs = new ArrayList(); >> + int idx = 0; >> + >> + while (idx < s.length()){ >> + // Move to character after starting quote >> + idx = s.indexOf('"', idx) + 1; >> + if (idx <= 0) break; >> + >> + // Find end quote >> + int endIdx = s.indexOf('"', idx); >> + strs.add(s.substring(idx, endIdx)); >> + idx = endIdx + 1; >> + } >> + >> + return strs; >> + } >> + >> + static Hashtable parseQuotedKeyValuePairs(String >> keyvalString) { >> + List strs = extractQuotedStrings(keyvalString); >> + Hashtable attributes = new >> Hashtable(); >> + >> + for (int i = 0; i < strs.size(); i += 2) { >> + String key = decodeString(strs.get(i)).toLowerCase(); >> + String value = decodeString(strs.get(i + 1)); >> + attributes.put(key, value); >> + } >> + >> + return attributes; >> + } >> + >> + /** >> + * Generates a hashtable of applet attributes, given a string >> containing >> + * parameters in quotes. >> + * >> + * @param width default applet width >> + * @param height default applet height >> + * @param parameterString the parameters >> + * @return the attributes in a hash table >> + */ >> + static public Hashtable parse(String width, >> + String height, String parameterString) { >> + Hashtable atts = >> parseQuotedKeyValuePairs(parameterString); >> + >> + // If there is a classid and no code tag present, transform >> it to code tag >> + if (atts.get("code") == null && atts.get("classid") != null >> + && !(atts.get("classid")).startsWith("clsid:")) { >> + atts.put("code", atts.get("classid")); >> + } >> + >> + // remove java: from code tag >> + if (atts.get("code") != null && >> (atts.get("code")).startsWith("java:")) { >> + atts.put("code", (atts.get("code")).substring(5)); >> + } >> + >> + // java_* aliases override older names: >> + >> //http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html#in-nav >> + if (atts.get("java_code") != null) { >> + atts.put("code", (atts.get("java_code"))); >> + } >> + >> + if (atts.get("java_codebase") != null) { >> + atts.put("codebase", (atts.get("java_codebase"))); >> + } >> + >> + if (atts.get("java_archive") != null) { >> + atts.put("archive", (atts.get("java_archive"))); >> + } >> + >> + if (atts.get("java_object") != null) { >> + atts.put("object", (atts.get("java_object"))); >> + } >> + >> + if (atts.get("java_type") != null) { >> + atts.put("type", (atts.get("java_type"))); >> + } >> + >> + if (atts.get("width") == null || !isInt(atts.get("width"))) { >> + atts.put("width", width); >> + } >> + >> + if (atts.get("height") == null || !isInt(atts.get("height"))) { >> + atts.put("height", height); >> + } >> + >> + if (atts.get("code") == null && atts.get("object") == null) { >> + return null; >> + } >> + return atts; >> + } >> +} >> diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java >> b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java >> --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java >> +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java >> @@ -86,6 +86,7 @@ import java.lang.reflect.InvocationTarge >> import java.net.SocketPermission; >> import java.net.URI; >> import java.net.URL; >> +import java.net.URLConnection; >> import java.security.AccessController; >> import java.security.AllPermission; >> import java.security.PrivilegedAction; >> @@ -286,6 +287,14 @@ public class PluginAppletViewer extends >> PRE_INIT, INIT_COMPLETE, REFRAME_COMPLETE, INACTIVE, DESTROYED >> }; >> >> + /* values used for placement of AppletViewer's frames */ >> + private static final int XDELTA = 30; >> + private static final int YDELTA = XDELTA; >> + >> + private static int x = 0; >> + private static int y = 0; >> + private static int ydisp = 1; >> + >> /** >> * The panel in which the applet is being displayed. >> */ >> @@ -488,10 +497,37 @@ public class PluginAppletViewer extends >> "DocumentBase = ", >> documentBase, "\n", >> "Tag = ", tag); >> >> - PluginAppletViewer.parse >> - (identifier, handle, width, >> height, >> - new StringReader(tag), >> - new URL(documentBase)); >> + PluginAppletPanelFactory factory = new >> PluginAppletPanelFactory(); >> + AppletMessageHandler amh = new >> AppletMessageHandler("appletviewer"); >> + URL url = new URL(documentBase); >> + URLConnection conn = url.openConnection(); >> + /* The original URL may have been redirected - this >> + * sets it to whatever URL/codebase we ended up getting >> + */ >> + url = conn.getURL(); >> + > > I would like to see thios in different method. Also the ydisp remains > questionable. Imho with yournew approach it will lead to complete > removal of it (i'm really afraid of case like three applets per page, > and several such a pages) > >> + Hashtable atts = >> PluginAppletAttributes.parse(width, height, tag); >> + >> + if (atts == null) { >> + String embedRequiresCode = >> amh.getMessage("parse.warning.embed.requirescode"); >> + System.out.println(embedRequiresCode); >> + >> + throw new RuntimeException(embedRequiresCode); >> + } >> + >> + // Let user know we are starting up >> + streamhandler.write("instance " + identifier + " >> status " + amh.getMessage("status.start")); >> + factory.createPanel(streamhandler, identifier, >> handle, x, y, url, atts); >> + >> + x += XDELTA; >> + y += YDELTA; >> + // make sure we don't go too far! >> + Dimension d = >> Toolkit.getDefaultToolkit().getScreenSize(); >> + if ((x > d.width - 300) || (y > d.height - 300)) { >> + x = 0; >> + y = 2 * ydisp * YDELTA; >> + ydisp++; >> + } >> >> long maxTimeToSleep = APPLET_TIMEOUT; >> appletsLock.lock(); >> @@ -1423,24 +1459,6 @@ public class PluginAppletViewer extends >> } >> >> /** >> - * Decodes the string (converts html escapes into proper >> characters) >> - * >> - * @param toDecode The string to decode >> - * @return The decoded string >> - */ >> - public static String decodeString(String toDecode) { >> - >> - toDecode = toDecode.replace(">", ">"); >> - toDecode = toDecode.replace("<", "<"); >> - toDecode = toDecode.replace("&", "&"); >> - toDecode = toDecode.replace(" ", "\n"); >> - toDecode = toDecode.replace(" ", "\r"); >> - toDecode = toDecode.replace(""", "\""); >> - >> - return toDecode; >> - } >> - >> - /** >> * System parameters. >> */ >> static Hashtable systemParam = new >> Hashtable(); >> @@ -1457,67 +1475,6 @@ public class PluginAppletViewer extends >> } >> >> /** >> - * Print the HTML tag. >> - */ >> - public static void printTag(PrintStream out, Hashtable> String> atts) { >> - out.print("> - >> - String v = atts.get("codebase"); >> - if (v != null) { >> - out.print(" codebase=\"" + v + "\""); >> - } >> - >> - v = atts.get("code"); >> - if (v == null) { >> - v = "applet.class"; >> - } >> - out.print(" code=\"" + v + "\""); >> - v = atts.get("width"); >> - if (v == null) { >> - v = "150"; >> - } >> - out.print(" width=" + v); >> - >> - v = atts.get("height"); >> - if (v == null) { >> - v = "100"; >> - } >> - out.print(" height=" + v); >> - >> - v = atts.get("name"); >> - if (v != null) { >> - out.print(" name=\"" + v + "\""); >> - } >> - out.println(">"); >> - >> - // A very slow sorting algorithm >> - int len = atts.size(); >> - String params[] = new String[len]; >> - len = 0; >> - for (Enumeration e = atts.keys(); >> e.hasMoreElements();) { >> - String param = e.nextElement(); >> - int i = 0; >> - for (; i < len; i++) { >> - if (params[i].compareTo(param) >= 0) { >> - break; >> - } >> - } >> - System.arraycopy(params, i, params, i + 1, len - i); >> - params[i] = param; >> - len++; >> - } >> - >> - for (int i = 0; i < len; i++) { >> - String param = params[i]; >> - if (systemParam.get(param) == null) { >> - out.println(""); >> - } >> - } >> - out.println(""); >> - } >> - >> - /** >> * Make sure the atrributes are uptodate. >> */ >> public void updateAtts() { >> @@ -1673,412 +1630,6 @@ public class PluginAppletViewer extends >> return appletPanels.size(); >> } >> >> - /** >> - * Scan spaces. >> - */ >> - public static void skipSpace(int[] c, Reader in) throws >> IOException { >> - while ((c[0] >= 0) && >> - ((c[0] == ' ') || (c[0] == '\t') || (c[0] == '\n') >> || (c[0] == '\r'))) { >> - c[0] = in.read(); >> - } >> - } >> - >> - /** >> - * Scan identifier >> - */ >> - public static String scanIdentifier(int[] c, Reader in) throws >> IOException { >> - StringBuilder buf = new StringBuilder(); >> - >> - if (c[0] == '!') { >> - // Technically, we should be scanning for '!--' but we >> are reading >> - // from a stream, and there is no way to peek ahead. >> That said, >> - // a ! at this point can only mean comment here afaik, >> so we >> - // should be okay >> - skipComment(c, in); >> - return ""; >> - } >> - >> - while (true) { >> - if (((c[0] >= 'a') && (c[0] <= 'z')) || >> - ((c[0] >= 'A') && (c[0] <= 'Z')) || >> - ((c[0] >= '0') && (c[0] <= '9')) || (c[0] == >> '_')) { >> - buf.append((char) c[0]); >> - c[0] = in.read(); >> - } else { >> - return buf.toString(); >> - } >> - } >> - } >> - >> - public static void skipComment(int[] c, Reader in) throws >> IOException { >> - StringBuilder buf = new StringBuilder(); >> - boolean commentHeaderPassed = false; >> - c[0] = in.read(); >> - buf.append((char) c[0]); >> - >> - while (true) { >> - if (c[0] == '-' && (c[0] = in.read()) == '-') { >> - buf.append((char) c[0]); >> - if (commentHeaderPassed) { >> - // -- encountered ... is > next? >> - if ((c[0] = in.read()) == '>') { >> - buf.append((char) c[0]); >> - >> - PluginDebug.debug("Comment skipped: ", >> buf.toString()); >> - >> - // comment skipped. >> - return; >> - } >> - } else { >> - // first -- is part of > + > + > + > + DownloadService > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> > + DownloadService > + > + > + > + > + > + > + > + > + > + > + > + href="./DownloadServiceExtension.jnlp"/> > + > + > + > + > + > diff --git > a/tests/reproducers/signed/DownloadService/resources/DownloadServiceExtension.jnlp > b/tests/reproducers/signed/DownloadService/resources/DownloadServiceExtension.jnlp > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/signed/DownloadService/resources/DownloadServiceExtension.jnlp > @@ -0,0 +1,58 @@ > + > + > + > + > + DownloadServiceExtension > + IcedTea > + href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> > + DownloadServiceExtension > + > + > + > + > + > + > + > + > + > + > + > diff --git > a/tests/reproducers/signed/DownloadService/srcs/DownloadServiceRunner.java > b/tests/reproducers/signed/DownloadService/srcs/DownloadServiceRunner.java > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/signed/DownloadService/srcs/DownloadServiceRunner.java > @@ -0,0 +1,351 @@ > +/* DownloadService.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import java.io.IOException; > +import java.net.MalformedURLException; > +import java.net.URL; > + > +import javax.jnlp.DownloadService; > +import javax.jnlp.ServiceManager; > +import javax.jnlp.UnavailableServiceException; > + > +public class DownloadServiceRunner { > + > + URL serverUrl = null; > + URL extensionUrl = null; > + URL NonExistingUrl = null; > + > + URL urlToExternalResource = null; > + > + /** > + * Launching jnlp and extension jnlp PARTS > + */ > + final String launchPartOne = "one"; > + final String launchPartTwo = "two"; > + final String extensionPartOne = "extOne"; > + final String nonExistingPart = "random"; > + > + /** > + * Parts in Array > + */ > + final String[] validLaunchParts = { launchPartOne, launchPartTwo }; > + final String[] halfValidLaunchParts = { launchPartOne, > nonExistingPart }; > + final String[] validExtensionParts = { extensionPartOne }; > + final String[] halfValidExtensionParts = { extensionPartOne, > nonExistingPart }; > + final String[] invalidParts = { nonExistingPart, "random2" }; > + > + private static DownloadService downloadService; > + static { > + try { > + downloadService = (DownloadService) > ServiceManager.lookup("javax.jnlp.DownloadService"); > + } catch (UnavailableServiceException ex) { > + System.err.println("DownloadService is not available."); > + } > + } > + > + public DownloadServiceRunner(String urlToServer) throws > MalformedURLException, InterruptedException { > + serverUrl = new URL(urlToServer); > + extensionUrl = new URL(urlToServer + > "DownloadServiceExtension.jnlp"); > + NonExistingUrl = new URL(urlToServer + "NONEXISTINGFILE.JNLP"); > + > + urlToExternalResource = new URL(urlToServer + > "EmptySignedJar.jar"); > + > + System.out.println(urlToExternalResource.toString()); > + > + } > + > + /** > + * Checks the cache status of resources using isPartCached() > + */ > + private void checkCache() throws MalformedURLException { > + System.out.println("CHECKCACHE-isPartCached: LaunchPartOne: " > + downloadService.isPartCached(launchPartOne)); > + System.out.println("CHECKCACHE-isPartCached: LaunchPartTwo: " > + downloadService.isPartCached(launchPartTwo)); > + System.out.println("CHECKCACHE-isPartCached: NonExistingPart: > " + downloadService.isPartCached(nonExistingPart)); > + } > + > + /** > + * Checks the cache status of resources using isPartCached([]) - > an array with part names > + */ > + private void checkCacheUsingMultipleParts() throws > MalformedURLException { > + System.out.println("CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): > ValidLaunchParts: " + downloadService.isPartCached(validLaunchParts)); > + System.out.println("CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): > HalfValidLaunchParts: " + > downloadService.isPartCached(halfValidLaunchParts)); > + System.out.println("CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): > InvalidParts: " + downloadService.isPartCached(invalidParts)); > + } > + > + /** > + * Checks the cache status of extension resources using > isExtensionPartCached() > + */ > + private void checkExtensionCache() throws MalformedURLException { > + System.out.println("CHECKEXTENSIONCACHE-isExtensionPartCached: > ExtensionPartOne: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + System.out.println("CHECKEXTENSIONCACHE-isExtensionPartCached: > NonExistingPart: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, nonExistingPart)); > + System.out.println("CHECKEXTENSIONCACHE-isExtensionPartCached: > NonExistingUrl: " > + + > downloadService.isExtensionPartCached(NonExistingUrl, null, > extensionPartOne)); > + } > + > + /** > + * Checks the cache status of extension resources using > isExtensionPartCached([]) - an array with part names > + */ > + private void checkExtensionCacheUsingMultipleParts() throws > MalformedURLException { > + > System.out.println("CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): > ValidExtensionParts: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, validExtensionParts)); > + > System.out.println("CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): > HalfValidExtensionParts: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, halfValidExtensionParts)); > + > System.out.println("CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): > InvalidParts: " > + + > downloadService.isExtensionPartCached(NonExistingUrl, null, > invalidParts)); > + } > + > + /** > + * Checks the cache status of external (not mentioned in jnlps) > resources using isResourceCached() > + */ > + private void checkExternalCache() { > + System.out.println("CHECKEXTERNALCACHE-isResourceCached: > UrlToExternalResource: " + > downloadService.isResourceCached(urlToExternalResource, null)); > + System.out.println("CHECKEXTERNALCACHE-isResourceCached: > NonExistingUrl: " + downloadService.isResourceCached(NonExistingUrl, > null)); > + } > + > + /** > + * Removes resources from cache using removePart() > + */ > + private void removePart() throws IOException { > + System.out.println("REMOVEPART-removePart: > LaunchPartOne-BEFORE: " + downloadService.isPartCached(launchPartOne)); > + downloadService.removePart(launchPartOne); > + System.out.println("REMOVEPART-removePart: > LaunchPartOne-AFTER: " + downloadService.isPartCached(launchPartOne)); > + > + System.out.println("REMOVEPART-removePart: > LaunchPartTwo-BEFORE: " + downloadService.isPartCached(launchPartTwo)); > + downloadService.removePart(launchPartTwo); > + System.out.println("REMOVEPART-removePart: > LaunchPartTwo-AFTER: " + downloadService.isPartCached(launchPartTwo)); > + } > + > + /** > + * Removes extension resources from cache using > isExtensionPartCached() > + */ > + private void removeExtensionPart() throws IOException { > + System.out.println("REMOVEEXTENSIONPART-removeExtensionPart: > ExtensionPartOne-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + downloadService.removeExtensionPart(extensionUrl, null, > extensionPartOne); > + System.out.println("REMOVEEXTENSIONPART-removeExtensionPart: > ExtensionPartOne-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + } > + > + /** > + * Removes extension resources using part array (all parts exist) > from cache using isExtensionPartCached() > + */ > + private void removeExtensionUsingValidPartInArray() throws > IOException { > + > System.out.println("REMOVEEXTENSIONUSINGVALIDPARTINARRAY-removeExtensionPart(Array): > ValidExtensionParts-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + > + downloadService.removeExtensionPart(extensionUrl, null, > validExtensionParts); > + > + > System.out.println("REMOVEEXTENSIONUSINGVALIDPARTINARRAY-removeExtensionPart(Array): > ValidExtensionParts-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + > + } > + > + /** > + * Removes extension resources using part array (one part exists, > the other one does not) from cache using isExtensionPartCached() > + */ > + private void removeExtensionUsingHalfValidPartInArray() throws > IOException { > + > System.out.println("REMOVEEXTENSIONUSINGHALFVALIDPARTINARRAY-removeExtensionPart(Array): > HalfValidExtensionParts-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + > + downloadService.removeExtensionPart(extensionUrl, null, > halfValidExtensionParts); > + > + > System.out.println("REMOVEEXTENSIONUSINGHALFVALIDPARTINARRAY-removeExtensionPart(Array): > HalfValidExtensionParts-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + } > + > + /** > + * Removes external (not mentioned in jnlps) resources from cache > using removeResource() > + */ > + private void removeExternalResource() throws IOException { > + System.out.println("REMOVEEXTERNALPART-removeResource: > UrlToExternalResource-BEFORE: " + > downloadService.isResourceCached(urlToExternalResource, null)); > + downloadService.removeResource(urlToExternalResource, null); > + System.out.println("REMOVEEXTERNALPART-removeResource: > UrlToExternalResource-AFTER: " + > downloadService.isResourceCached(urlToExternalResource, null)); > + } > + > + /** > + * Loads resources from cache using loadPart() > + */ > + private void loadPart() throws IOException { > + System.out.println("LOADPART-loadPart: LaunchPartOne-BEFORE: > " + downloadService.isPartCached(launchPartOne)); > + downloadService.loadPart(launchPartOne, null); > + System.out.println("LOADPART-loadPart: LaunchPartOne-AFTER: " > + downloadService.isPartCached(launchPartOne)); > + > + System.out.println("LOADPART-loadPart: LaunchPartTwo-BEFORE: > " + downloadService.isPartCached(launchPartTwo)); > + downloadService.loadPart(launchPartTwo, null); > + System.out.println("LOADPART-loadPart: LaunchPartTwo-AFTER: " > + downloadService.isPartCached(launchPartTwo)); > + } > + > + /** > + * Load extension resources from cache using loadExtensionPart() > + */ > + private void loadExtensionPart() throws IOException { > + System.out.println("LOADEXTENSIONPART-loadExtensionPart: > ExtensionPartOne-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + downloadService.loadExtensionPart(extensionUrl, null, > extensionPartOne, null); > + System.out.println("LOADEXTENSIONPART-loadExtensionPart: > ExtensionPartOne-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + } > + > + /** > + * Loads extension resources using part array (all parts exist) > from cache using isExtensionPartCached() > + */ > + private void loadExtensionUsingValidPartInArray() throws > IOException { > + > System.out.println("LOADEXTENSIONUSINGVALIDPARTINARRAY-loadExtensionPart(Array): > ValidExtensionParts-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + > + downloadService.loadExtensionPart(extensionUrl, null, > validExtensionParts, null); > + > + > System.out.println("LOADEXTENSIONUSINGVALIDPARTINARRAY-loadExtensionPart(Array): > ValidExtensionParts-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + > + } > + > + /** > + * Loads extension resources using part array (one part exists, > the other one does not) from cache using isExtensionPartCached() > + */ > + private void loadExtensionUsingHalfValidPartInArray() throws > IOException { > + > System.out.println("LOADEXTENSIONUSINGHALFVALIDPARTINARRAY-loadExtensionPart(Array): > HalfValidExtensionParts-BEFORE: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + > + downloadService.loadExtensionPart(extensionUrl, null, > halfValidExtensionParts, null); > + > + > System.out.println("LOADEXTENSIONUSINGHALFVALIDPARTINARRAY-loadExtensionPart(Array): > HalfValidExtensionParts-AFTER: " > + + downloadService.isExtensionPartCached(extensionUrl, > null, extensionPartOne)); > + } > + > + /** > + * Loads external (not mentioned in jnlps) resources from cache > using removeResource() > + */ > + private void loadExternalResource() throws IOException { > + System.out.println("LOADEXTERNALRESOURCE-loadResource: > UrlToExternalResource-BEFORE: " + > downloadService.isResourceCached(urlToExternalResource, null)); > + downloadService.loadResource(urlToExternalResource, null, null); > + System.out.println("LOADEXTERNALRESOURCE-loadResource: > UrlToExternalResource-AFTER: " + > downloadService.isResourceCached(urlToExternalResource, null)); > + } > + > + /** > + * Repeatedly unloads and loads jars > + */ > + private void repeatedlyLoadingAndUnloadingJars() throws IOException { > + downloadService.removePart(launchPartOne); > + downloadService.loadPart(launchPartOne, null); > + > + downloadService.removePart(launchPartOne); > + System.out.println("MULTIPLEMETHODCALLS - removePart: > LaunchPartOne: " + downloadService.isPartCached(launchPartOne)); > + > + downloadService.loadPart(launchPartOne, null); > + System.out.println("MULTIPLEMETHODCALLS - loadPart: > LaunchPartOne: " + downloadService.isPartCached(launchPartOne)); > + } > + > + /** > + * Repeatedly unloads and loads external jars > + */ > + private void repeatedlyLoadingAndUnloadingExternalJars() throws > IOException { > + downloadService.removeResource(urlToExternalResource, null); > + downloadService.loadResource(urlToExternalResource, null, null); > + > + downloadService.removeResource(urlToExternalResource, null); > + System.out.println("MULTIPLEMETHODCALLS - removeResource: > UrlToExternalResource: " + > downloadService.isResourceCached(urlToExternalResource, null)); > + > + downloadService.loadResource(urlToExternalResource, null, null); > + System.out.println("MULTIPLEMETHODCALLS - loadResource: > UrlToExternalResource: " + > downloadService.isResourceCached(urlToExternalResource, null)); > + } > + > + /** > + * Loads external jar as preparation for external resource testing > + */ > + private void prepareExternalResourceTests() { > + try { > + if > (!downloadService.isResourceCached(urlToExternalResource, null)) > + downloadService.loadResource(urlToExternalResource, null, null); > + } catch (Exception e) { > + //Continue testing > + // This is okay to ignore as it may be a problem with > loadResouce( ), which will be identified within tests > + } > + } > + > + public static void main(String[] args) throws IOException, > InterruptedException { > + System.out.println("Running DownloadService.."); > + > + if (args.length < 2) { > + System.out.println("Requires 2 arguments: [server_url] > [checkCache | manageJars | manageExternalJars]"); > + System.out.println("Exiting.."); > + return; > + } > + > + DownloadServiceRunner ds = new DownloadServiceRunner(args[0]); > + > + if (args[1].equals("checkCache")) { > + //Cache Resources > + ds.checkCache(); > + ds.checkCacheUsingMultipleParts(); > + ds.checkExtensionCache(); > + ds.checkExtensionCacheUsingMultipleParts(); > + } > + > + if (args[1].equals("manageJnlpJars")) { > + //Remove Resources > + ds.removePart(); > + ds.removeExtensionPart(); > + > + //Load Resources > + ds.loadPart(); > + ds.loadExtensionPart(); > + > + //Manage using multiple part arrays > + ds.removeExtensionUsingValidPartInArray(); > + ds.loadExtensionUsingValidPartInArray(); > + ds.removeExtensionUsingHalfValidPartInArray(); > + ds.loadExtensionUsingHalfValidPartInArray(); > + > + //Unloads and loads jars repeatedly > + ds.repeatedlyLoadingAndUnloadingJars(); > + > + } else if (args[1].equals("manageExternalJars")) { > + ds.prepareExternalResourceTests(); > + ds.checkExternalCache(); > + ds.removeExternalResource(); > + ds.loadExternalResource(); > + > + //Unloads and loads jars repeatedly > + ds.repeatedlyLoadingAndUnloadingExternalJars(); > + } > + > + System.out.println("Exiting DownloadService.."); > + } > +} > diff --git > a/tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java > b/tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java > new file mode 100644 > --- /dev/null > +++ > b/tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java > @@ -0,0 +1,335 @@ > +/* DownloadServiceTest.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import java.io.File; > +import java.util.ArrayList; > +import java.util.List; > + > +import junit.framework.Assert; > +import net.sourceforge.jnlp.ProcessResult; > +import net.sourceforge.jnlp.ServerAccess; > +import org.junit.BeforeClass; > +import org.junit.Test; > + > +public class DownloadServiceTest { > + > + private static ServerAccess server = new ServerAccess(); > + private static String stderr; > + > + private static String stdoutCheckCache; > + private static String stdoutJnlpResources; > + private static String stdoutExternalResources; > + > + private static List checkCache = new ArrayList(); > + static { > + try { > + checkCache.add(server.getJavawsLocation()); > + checkCache.add("-arg"); > + checkCache.add(server.getUrl().toString() + "/"); > + checkCache.add("-arg"); > + checkCache.add("checkCache"); > + checkCache.add("-Xtrustall"); > + checkCache.add(ServerAccess.HEADLES_OPTION); > + checkCache.add(server.getUrl() + "/DownloadService.jnlp"); Perhaps these 'static' blocks should be in a set-up method / test constructor. > + } catch (Exception e) { > + System.out.println(e.getMessage()); > + } > + } > + > + private static List manageJnlpResources = new > ArrayList(); > + static { > + try { > + manageJnlpResources.add(server.getJavawsLocation()); > + manageJnlpResources.add("-arg"); > + manageJnlpResources.add(server.getUrl().toString() + "/"); > + manageJnlpResources.add("-arg"); > + manageJnlpResources.add("manageJnlpJars"); > + manageJnlpResources.add("-Xtrustall"); > + manageJnlpResources.add(ServerAccess.HEADLES_OPTION); > + manageJnlpResources.add(server.getUrl() + > "/DownloadService.jnlp"); > + } catch (Exception e) { > + System.out.println(e.getMessage()); > + } > + } > + > + private static List manageExternalResources = new > ArrayList(); > + static { > + try { > + manageExternalResources.add(server.getJavawsLocation()); > + manageExternalResources.add("-arg"); > + manageExternalResources.add(server.getUrl().toString() + "/"); > + manageExternalResources.add("-arg"); > + manageExternalResources.add("manageExternalJars"); > + manageExternalResources.add("-Xtrustall"); > + manageExternalResources.add(ServerAccess.HEADLES_OPTION); > + manageExternalResources.add(server.getUrl() + > "/DownloadService.jnlp"); > + } catch (Exception e) { > + System.out.println(e.getMessage()); > + } > + } > + > + @BeforeClass > + public static void initializeClass() throws Exception { > + ProcessResult processResult; > + > + //Check cache tests > + processResult = ServerAccess.executeProcess(checkCache); > + stdoutCheckCache = processResult.stdout; > + stderr = processResult.stderr; > + > + //Jnlp resource tests > + processResult = ServerAccess.executeProcess(manageJnlpResources); > + stdoutJnlpResources = processResult.stdout; > + stderr += "\n" + processResult.stderr; > + > + //External resource tests > + processResult = > ServerAccess.executeProcess(manageExternalResources); > + stdoutExternalResources = processResult.stdout; > + stderr += "\n" + processResult.stderr; These shouldn't all be run before the tests imo > + } > + > + @Test > + public void checkIfRequiredResourcesExist() { > + //Jnlp files > + Assert.assertTrue("DownloadService.jnlp is a required > resource that's missing.", > + new File(server.getDir().getAbsolutePath() + > "/DownloadService.jnlp").isFile()); > + Assert.assertTrue("DownloadServiceExtension.jnlp is a > required resource that's missing.", new > File(server.getDir().getAbsolutePath() > + + "/DownloadServiceExtension.jnlp").isFile()); > + > + //Jar files > + Assert.assertTrue("DownloadService.jar is a required resource > that's missing.", > + new File(server.getDir().getAbsolutePath() + > "/DownloadService.jar").isFile()); > + Assert.assertTrue("SignedJnlpResource.jar is a required > resource that's missing.", new File(server.getDir().getAbsolutePath() > + + "/SignedJnlpResource.jar").isFile()); > + Assert.assertTrue("SignedJarResource.jar is a required > resource that's missing.", > + new File(server.getDir().getAbsolutePath() + > "/SignedJarResource.jar").isFile()); > + Assert.assertTrue("MultiJar-NoSignedJnlp.jar is a required > resource that's missing.", new File(server.getDir().getAbsolutePath() > + + "/MultiJar-NoSignedJnlp.jar").isFile()); > + } > + > + @Test > + public void checkIfMainFinishedCorrectly() { > + String s = "Exiting DownloadService.."; > + Assert.assertTrue("CheckCache - DownloadServiceRunner > instance did not close as expected, this may cause other tests to fail.", > + stdoutCheckCache.contains(s)); > + Assert.assertTrue("ManageJnlpResources - > DownloadServiceRunner instance did not close as expected, this may > cause other tests to fail.", > + stdoutJnlpResources.contains(s)); > + Assert.assertTrue("ManageExternalResources - > DownloadServiceRunner instance did not close as expected, this may > cause other tests to fail.", > + stdoutExternalResources.contains(s)); > + } > + > + @Test > + public void testDownloadServiceAvailability() { > + String s = "DownloadService is not available."; > + Assert.assertFalse(stderr.contains(s)); > + } > + > + @Test > + public void testcheckCaches() { > + String s = "CHECKCACHE-isPartCached: LaunchPartOne: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + > + s = "CHECKCACHE-isPartCached: LaunchPartTwo: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + > + s = "CHECKCACHE-isPartCached: NonExistingPart: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + } > + > + @Test > + public void testcheckCachesUsingArray() { > + String s = "CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): > ValidLaunchParts: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + > + s = "CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): > HalfValidLaunchParts: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + > + s = "CHECKCACHEUSINGMUTIPLEPARTS-isPartCached(Array): > InvalidParts: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + } > + > + @Test > + public void testExtensioncheckCaches() { > + String s = "CHECKEXTENSIONCACHE-isExtensionPartCached: > ExtensionPartOne: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + > + s = "CHECKEXTENSIONCACHE-isExtensionPartCached: > NonExistingPart: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + > + s = "CHECKEXTENSIONCACHE-isExtensionPartCached: > NonExistingUrl: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + } > + > + @Test > + public void testExtensioncheckCachesUsingArray() { > + String s = > "CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): > ValidExtensionParts: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + > + s = > "CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): > HalfValidExtensionParts: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + > + s = > "CHECKEXTENSIONCACHEUSINGMUTIPLEPARTS-isExtensionPartCached(Array): > InvalidParts: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutCheckCache.contains(s)); > + > + } > + > + @Test > + public void testExternalResourceChecks() { > + //This is automatically cached from the test engine because > the .jar exists > + String s = "CHECKEXTERNALCACHE-isResourceCached: > UrlToExternalResource: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutExternalResources.contains(s)); > + > + s = "CHECKEXTERNALCACHE-isResourceCached: NonExistingUrl: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutExternalResources.contains(s)); > + } > + > + @Test > + public void testRemovePart() { > + String s = "REMOVEPART-removePart: LaunchPartOne-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + s = "REMOVEPART-removePart: LaunchPartOne-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + s = "REMOVEPART-removePart: LaunchPartTwo-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + s = "REMOVEPART-removePart: LaunchPartTwo-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + } > + > + @Test > + public void testRemoveExtensionPart() { > + String s = "REMOVEEXTENSIONPART-removeExtensionPart: > ExtensionPartOne-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + s = "REMOVEEXTENSIONPART-removeExtensionPart: > ExtensionPartOne-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + } > + > + @Test > + public void testRemoveExtensionPartUsingArray() { > + String s = > "REMOVEEXTENSIONUSINGVALIDPARTINARRAY-removeExtensionPart(Array): > ValidExtensionParts-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + s = > "REMOVEEXTENSIONUSINGVALIDPARTINARRAY-removeExtensionPart(Array): > ValidExtensionParts-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + s = > "REMOVEEXTENSIONUSINGHALFVALIDPARTINARRAY-removeExtensionPart(Array): > HalfValidExtensionParts-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + s = > "REMOVEEXTENSIONUSINGHALFVALIDPARTINARRAY-removeExtensionPart(Array): > HalfValidExtensionParts-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + } > + > + @Test > + public void testRemoveExternalResource() > + { > + String s = "REMOVEEXTERNALPART-removeResource: > UrlToExternalResource-BEFORE: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutExternalResources.contains(s)); > + > + s = "REMOVEEXTERNALPART-removeResource: > UrlToExternalResource-AFTER: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutExternalResources.contains(s)); > + > + } > + > + @Test > + public void testLoadPart() { > + //Part 'one' > + String s = "LOADPART-loadPart: LaunchPartOne-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + s = "LOADPART-loadPart: LaunchPartOne-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + //Part 'two' > + s = "LOADPART-loadPart: LaunchPartTwo-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + s = "LOADPART-loadPart: LaunchPartTwo-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + } > + > + @Test > + public void testLoadExtensionPart() { > + String s = "LOADEXTENSIONPART-loadExtensionPart: > ExtensionPartOne-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + s = "LOADEXTENSIONPART-loadExtensionPart: > ExtensionPartOne-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + } > + > + @Test > + public void testLoadExtensionPartUsingArray() { > + String s = > "LOADEXTENSIONUSINGVALIDPARTINARRAY-loadExtensionPart(Array): > ValidExtensionParts-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + s = > "LOADEXTENSIONUSINGVALIDPARTINARRAY-loadExtensionPart(Array): > ValidExtensionParts-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + s = > "LOADEXTENSIONUSINGHALFVALIDPARTINARRAY-loadExtensionPart(Array): > HalfValidExtensionParts-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + s = > "LOADEXTENSIONUSINGHALFVALIDPARTINARRAY-loadExtensionPart(Array): > HalfValidExtensionParts-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + } > + > + @Test > + public void testLoadExternalResource() { > + String s = "LOADEXTERNALRESOURCE-loadResource: > UrlToExternalResource-BEFORE: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutExternalResources.contains(s)); > + > + s = "LOADEXTERNALRESOURCE-loadResource: > UrlToExternalResource-AFTER: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutExternalResources.contains(s)); > + > + } > + > + @Test > + public void testRepeatedlyLoadingAndUnloadingJnlpResources() { > + String s = "MULTIPLEMETHODCALLS - removePart: LaunchPartOne: > false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + s = "MULTIPLEMETHODCALLS - loadPart: LaunchPartOne: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutJnlpResources.contains(s)); > + > + } > + > + @Test > + public void testRepeatedlyLoadingAndUnloadingExternalResources() { > + String s = "MULTIPLEMETHODCALLS - removeResource: > UrlToExternalResource: false"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutExternalResources.contains(s)); > + > + s = "MULTIPLEMETHODCALLS - loadResource: > UrlToExternalResource: true"; > + Assert.assertTrue("stdout should contain \"" + s + "\" but > did not.", stdoutExternalResources.contains(s)); > + } > +} While it isn't ideal because it checks true/false values being printed, which can accidentally turn out to be correct, it is indeed a test of DownloadService. As you explained it can't be done any other way really, so looks good to me. Other than the setup code changes I have no real further issues with this going into HEAD. Thanks for the ping (you should have prodded me a lot sooner! :), - Adam From adomurad at redhat.com Wed Oct 31 07:07:51 2012 From: adomurad at redhat.com (Adam Domurad) Date: Wed, 31 Oct 2012 10:07:51 -0400 Subject: [RFC][icedtea-web]: Set plugin JVM options in itw-settings In-Reply-To: <508ED961.4070705@redhat.com> References: <508ED961.4070705@redhat.com> Message-ID: <509130B7.8090508@redhat.com> On 10/29/2012 03:30 PM, Saad Mohammad wrote: > Hi, > > The patch attached contains a new feature allowing users to set plugin JVM > options through itw-settings. The patch also cleans up itw-settings UI by > organizing debugging, desktop integration, and security tab into a single tab > named Advanced Settings. > > A simple way of testing this feature is by adding '-verbose' within settings and > launching any applet in the web-browser. > > You'll also note the patch removes extra spaces after it retrieves jvm options > from itw-settings. This is because extra spaces can sometimes break the launch > of the plugin. > > Thanks. > > CHANGELOG > ======================================================================== > 2012-10-29 Saad Mohammad > > Added new options in itw-settings which allows users to set JVM > options when plugin is initialized. > * netx/net/sourceforge/jnlp/config/Defaults.java (getDefaults): > Added default for DeploymentConfiguration.KEY_PLUGIN_JVM_OPTIONS. > * netx/net/sourceforge/jnlp/config/DeploymentConfiguration.java: > Added new property (KEY_PLUGIN_JVM_OPTIONS) that stores the value of > JVM plugin options. > * netx/net/sourceforge/jnlp/controlpanel/AdvancedSettingsPanel.java: > New advanced settings panel containing a single organized view of > older tabs and plugin settings. > * netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java > (createMainSettingsPanel): > Added advanced settings to the list of tabs and moved debugging, > desktop integration, and security from the tab list to the new > panel. > * netx/net/sourceforge/jnlp/controlpanel/PluginPanel: > New plugin settings panel. > * netx/net/sourceforge/jnlp/resources/Messages.properties: > Added a new items (CPPluginJVMOptions, CPHeadPlugin, > CPTabAdvancedSettings) and removed unused ones. > * plugin/icedteanp/IcedTeaNPPlugin.cc: > (plugin_start_appletviewer): Adds JVM options to the command that > initalizes it. > (get_JVM_options): Returns JVM options set in itw-settings. > (trim_char): Cleans chars by removing extra spaces and new lines. > * plugin/icedteanp/IcedTeaNPPlugin.h: > Declaration of two new methods. > Omair already had good points, but I want to summarize some of my tips regarding avoiding buffer overflows and the like. (and convince you to use more C++ :) (Re: what Omair said about static functions, it is worthy to clarify (because it can be confusing with so many meanings of 'static'), static function in C/C++ means approximately what 'private static' means in Java. That is, it is not available outside the source file it was defined in. Defining a static function in a header file will tell the compiler there is a separate function in _every_ source file that has the header.) > diff --git a/plugin/icedteanp/IcedTeaNPPlugin.cc > b/plugin/icedteanp/IcedTeaNPPlugin.cc > --- a/plugin/icedteanp/IcedTeaNPPlugin.cc > +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc > @@ -1619,16 +1619,29 @@ > > gchar** command_line; > gchar** environment; > - > + gchar* jvm_options = get_JVM_options(); > + > + int numberOfCommandsToAllocate = 0; > int cmd_num = 0; > + > + if(jvm_options != NULL){ > + numberOfCommandsToAllocate++; > + printf("Using user specified JVM options: '%s'\n", jvm_options); > + } > + > if (plugin_debug) > { > - command_line = (gchar**) malloc(sizeof(gchar*)*11); > + numberOfCommandsToAllocate += 11; I notice a lot of details related to the amount of commands that might be added. Since this plugin relies on C++ anyway please consider using: std::vector command_line; command_line.push_back("Whatever"); Or, better yet std::vector command_line; command_line.push_back("Whatever"); gchar* -> std::string is perfectly valid. > + command_line = (gchar**) malloc(sizeof(gchar*) * > numberOfCommandsToAllocate); > command_line[cmd_num++] = g_strdup(appletviewer_executable); > command_line[cmd_num++] = g_strdup(PLUGIN_BOOTCLASSPATH); > // set the classpath to avoid using the default (cwd). > command_line[cmd_num++] = g_strdup("-classpath"); > command_line[cmd_num++] = g_strdup_printf("%s/lib/rt.jar", > ICEDTEA_WEB_JRE); > + > + if (jvm_options != NULL) > + command_line[cmd_num++] = g_strdup(jvm_options); > + > command_line[cmd_num++] = g_strdup("-Xdebug"); > command_line[cmd_num++] = g_strdup("-Xnoagent"); > if (plugin_debug_suspend) > @@ -1644,8 +1657,13 @@ > command_line[cmd_num] = NULL; > } else > { > - command_line = (gchar**) malloc(sizeof(gchar*)*8); > + numberOfCommandsToAllocate += 10; > + command_line = (gchar**) malloc(sizeof(gchar*) * > numberOfCommandsToAllocate); > command_line[cmd_num++] = g_strdup(appletviewer_executable); > + > + if (jvm_options != NULL) > + command_line[cmd_num++] = g_strdup(jvm_options); > + > command_line[cmd_num++] = g_strdup(PLUGIN_BOOTCLASSPATH); > command_line[cmd_num++] = g_strdup("-classpath"); > command_line[cmd_num++] = g_strdup_printf("%s/lib/rt.jar", > ICEDTEA_WEB_JRE); > @@ -1658,7 +1676,7 @@ > environment = plugin_filter_environment(); > > if (!g_spawn_async (NULL, command_line, environment, > - (GSpawnFlags) G_SPAWN_DO_NOT_REAP_CHILD, > + (GSpawnFlags) G_SPAWN_DO_NOT_REAP_CHILD, > NULL, NULL, &appletviewer_pid, &channel_error)) > { > if (channel_error) > @@ -1673,6 +1691,7 @@ > error = NPERR_GENERIC_ERROR; > } > > + //Free memory > g_strfreev (environment); > > for (int i = 0; i < cmd_num; i++) { > @@ -1683,18 +1702,106 @@ > g_free(command_line); > command_line = NULL; > > + if (jvm_options != NULL){ > + g_free(jvm_options); > + jvm_options = NULL; > + } > + > if (appletviewer_pid) > { > PLUGIN_DEBUG("Initialized VM with pid=%d\n", appletviewer_pid); > appletviewer_watch_id = g_child_watch_add(appletviewer_pid, > (GChildWatchFunc) appletviewer_monitor, (gpointer) appletviewer_pid); > } > > - > PLUGIN_DEBUG ("plugin_start_appletviewer return\n"); > return error; > } > > /* > + * Returns JVM options set in itw-settings > + */ > +static gchar* > +get_JVM_options() > +{ > + gchar** commands; > + gchar* cmd_line_str; > + gchar *output; > + int cmd_num = 0; > + int cmd_length = 0; //Characters length of the full command > + > + commands = (gchar**) malloc(sizeof(gchar*) * 8); > + commands[cmd_num++] = g_strdup(appletviewer_executable); > + commands[cmd_num++] = g_strdup(PLUGIN_BOOTCLASSPATH); > + commands[cmd_num++] = g_strdup("-classpath"); > + commands[cmd_num++] = g_strdup_printf("%s/lib/rt.jar", > ICEDTEA_WEB_JRE); > + commands[cmd_num++] = > g_strdup("net.sourceforge.jnlp.controlpanel.CommandLine"); > + commands[cmd_num++] = g_strdup("get"); > + commands[cmd_num++] = g_strdup("deployment.plugin.jvm.arguments"); > + commands[cmd_num] = NULL; > + > + //Calculate the character length of the commands > + for (int i = 0; i < cmd_num; i++) { > + cmd_length += strlen(commands[i]); > + } > + > + cmd_line_str = (gchar*) malloc(sizeof(gchar*) * cmd_length + 1); As I said on IRC, this is actually not enough buffer space. I'd say use std::string and rest easy that you don't cause a buffer overflow :). > + strcpy(cmd_line_str, ""); > + > + for (int i = 0; i < cmd_num; i++){ > + strcat(cmd_line_str, commands[i]); > + strcat(cmd_line_str, " "); > + > + //Free memory > + g_free (commands[i]); > + commands[i] = NULL; > + } > + strcat(cmd_line_str, "\0"); strcat'ing the null character is never necessary. The way strcat works is by linearly scanning the string, finding where the '\0' is, and adding the string to add. (Note, as a result, std::string can be more efficient in this regard, since it stores length.) Please use strncat wherever possible. Strcat is quite unsafe (it is not buffer-size aware) (again, this is where std::string will safe you headache.) > + > + //Get JVM options set in itw-settings > + g_spawn_command_line_sync(cmd_line_str, &output, NULL, NULL, > &channel_error); > + > + //Free memory > + g_free(commands); > + g_free(cmd_line_str); > + > + output = (gchar*) trim_char(output); > + if (strlen(output) < 1 || strcmp(output, "null") == 0){ > + g_free(output); > + output = NULL; > + } > + return output; > +} > + > +/* > + * Removes newlines and extra spaces from char > + */ > +static char* > +trim_char(char* to_trim) > +{ > + if (to_trim == '\0'){ > + return to_trim; > + } > + > + char* trimmed = (char*) calloc(((strlen(to_trim)) + 1), sizeof(char)); > + strcpy(trimmed, ""); > + > + for (int i = 0; i < strlen(to_trim); i++){ This loop condition does a linear search of the string _every iteration_. It will be O(N^2) time! > + //Removes extra spaces and new lines > + if (!(to_trim[i] == '\n' || i > 0 && to_trim[i] == ' ' && > to_trim[i - 1] == ' ')){ > + char* orig_char = (char*) calloc(2, sizeof(char)); No reason at all to dynamically allocate a 2 character string here. If you really wanted the convenience of a 2 character string, you can do: char orig_char[2]; And the rest of the code would be as-is, and the free would not be needed. (But strcat is a lot to add one char anyway). > + orig_char[0] = to_trim[i]; > + orig_char[1] = '\0'; > + > + strcat(trimmed, orig_char); > + > + free(orig_char); > + orig_char = NULL; > + } > + } > + return trimmed; > +} Strongly recommend something like here: http://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring Specifically: > |std::string s; > s.erase(s.find_last_not_of(" \n\r\t")+1); > | Seems sufficient. I hope you don't find C/C++ too painful :) Best regards, - Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121031/8b4b8123/attachment.html From bugzilla-daemon at icedtea.classpath.org Wed Oct 31 07:42:04 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 31 Oct 2012 14:42:04 +0000 Subject: [Bug 1205] Plugin crashes with java.lang.NullPointerException with AUSkey software In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1205 Adam Domurad changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adomurad at redhat.com Assignee|dbhole at redhat.com |adomurad at redhat.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121031/2449f9b1/attachment.html From jfabriko at redhat.com Wed Oct 31 08:44:35 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Wed, 31 Oct 2012 16:44:35 +0100 Subject: [rfc][icedtea-web] fixing the testcases output for JSToJSet and JSToJGet Message-ID: <50914763.7010202@redhat.com> 2012-10-31 Jana Fabrikova * tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java: Modifying the testcase output into simpler text. * tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java: Modifying the testcase output into simpler text. Please see the attached patch that simplifies the testcases output, Jana -------------- next part -------------- A non-text attachment was scrubbed... Name: modifying_testcases_JSToJSet_JSToJGet.patch Type: text/x-patch Size: 5122 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121031/318de903/modifying_testcases_JSToJSet_JSToJGet.patch From jvanek at redhat.com Wed Oct 31 08:56:02 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 31 Oct 2012 16:56:02 +0100 Subject: [rfc][icedtea-web] fixing the testcases output for JSToJSet and JSToJGet In-Reply-To: <50914763.7010202@redhat.com> References: <50914763.7010202@redhat.com> Message-ID: <50914A12.50100@redhat.com> On 10/31/2012 04:44 PM, Jana Fabrikova wrote: > 2012-10-31 Jana Fabrikova > > * tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java: > Modifying the testcase output into simpler text. > * tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java: > Modifying the testcase output into simpler text. > > Please see the attached patch that simplifies the testcases output, > Jana Yes please, go on. Dont forgot to fix it in patches awaiting review. Thanx for quick fix! j. From jfabriko at icedtea.classpath.org Wed Oct 31 09:06:53 2012 From: jfabriko at icedtea.classpath.org (jfabriko at icedtea.classpath.org) Date: Wed, 31 Oct 2012 16:06:53 +0000 Subject: /hg/icedtea-web: Simplifying the testcases output in JSToJSet an... Message-ID: changeset 34a7d51b30f5 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=34a7d51b30f5 author: Jana Fabrikova date: Wed Oct 31 17:07:58 2012 +0100 Simplifying the testcases output in JSToJSet and JSToJGet reproducers. diffstat: ChangeLog | 7 ++ tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java | 22 +++---- tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java | 30 +++++----- 3 files changed, 32 insertions(+), 27 deletions(-) diffs (122 lines): diff -r 9327b9bd2d37 -r 34a7d51b30f5 ChangeLog --- a/ChangeLog Mon Oct 29 15:07:56 2012 -0400 +++ b/ChangeLog Wed Oct 31 17:07:58 2012 +0100 @@ -1,3 +1,10 @@ +2012-10-31 Jana Fabrikova + + *tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java: + Modifying the testcase output to a simpler text. + *tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java: + Modifying the testcase output to a simpler text. + 2012-10-29 Omair Majid * tests/reproducers/signed/DeploymentPropertiesAreExposed/resources/DeploymentPropertiesAreExposed.jnlp, diff -r 9327b9bd2d37 -r 34a7d51b30f5 tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java --- a/tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java Mon Oct 29 15:07:56 2012 -0400 +++ b/tests/reproducers/simple/JSToJGet/testcases/JSToJGetTest.java Wed Oct 31 17:07:58 2012 +0100 @@ -74,12 +74,12 @@ private void evaluateStdoutContents(String testStr, ProcessResult pr) { // Assert that the applet was initialized. - Assert.assertTrue("JSToJGetTest stdout should contain \"" + initStr - + "\" but it didn't.", pr.stdout.contains(initStr)); + Assert.assertTrue("JSToJGetTest stdout should contain " + initStr + + " but it didnt.", pr.stdout.contains(initStr)); // Assert that the applet was set up for the GM tests. - Assert.assertTrue("JSToJGetTest stdout should contain \"" + setupStr - + "\" but it didn't.", pr.stdout.contains(setupStr)); + Assert.assertTrue("JSToJGetTest stdout should contain " + setupStr + + " but it didnt.", pr.stdout.contains(setupStr)); // Assert that the tests have passed. String s0 = testStr + passStr; @@ -99,26 +99,24 @@ } String failStr = "JSToJGet " + testStr - + ": \"passed\" not found in the applet stdout, which is: " - + pr.stdout.substring(indBegin, pr.stdout.length()); + + ": passed not found in the applet stdout."; if (ind1 != -1) { // int inde = pr.stdout.indexOf(expStr); // int indf = pr.stdout.indexOf(foundStr); - int indend = pr.stdout.indexOf(endStr); - failStr = pr.stdout.substring(ind1, indend + endStr.length()); + // int indend = pr.stdout.indexOf(endStr); + failStr = "JSToJGet: value mismatch in "+testStr; } if (ind2 != -1) { // int inde = pr.stdout.indexOf(expStr); // int indf = pr.stdout.indexOf(foundStr); - int indend = pr.stdout.indexOf(endStr); - failStr = pr.stdout.substring(ind2, indend + endStr.length()); + // int indend = pr.stdout.indexOf(endStr); + failStr = "JSToJGet: type mismatch in "+testStr; } if (ind3 != -1) { - failStr = "JSToJGet: " + testStr - + pr.stdout.substring(ind3, pr.stdout.length()); + failStr = "JSToJGet: an error occured during " + testStr; } Assert.assertTrue(failStr, (ind3 == -1));// no error on Java side diff -r 9327b9bd2d37 -r 34a7d51b30f5 tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java --- a/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java Mon Oct 29 15:07:56 2012 -0400 +++ b/tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java Wed Oct 31 17:07:58 2012 +0100 @@ -66,12 +66,12 @@ private void evaluateStdoutContents(String expectedStdout, ProcessResult pr) { // Assert that the applet was initialized. - Assert.assertTrue("JSToJSetTest stdout should contain \"" + initStr - + "\" but it didn't.", pr.stdout.contains(initStr)); + Assert.assertTrue("JSToJSet: the stdout should contain " + initStr + + ", but it didnt.", pr.stdout.contains(initStr)); // Assert that the values set by JavaScript are ok - Assert.assertTrue("The output should include: "+expectedStdout+", but is: "+pr.stdout, - pr.stdout.contains(expectedStdout)); + Assert.assertTrue("JSToJSet: the output should include: "+expectedStdout+", but it didnt.", + pr.stdout.contains(expectedStdout)); } @@ -83,23 +83,23 @@ } private void jsToJavaSetSpecialTest(String fieldStr, String valueStr, int testType) throws Exception { - String strURL = "/JSToJSet.html?"; - String expectedStdout = ""; - switch( testType ){ + String strURL = "/JSToJSet.html?"; + String expectedStdout = ""; + switch( testType ){ case 0://array element - strURL += fieldStr + ";" + valueStr; - expectedStdout = "New array value is: "+valueStr; + strURL += fieldStr + ";" + valueStr; + expectedStdout = "New array value is: "+valueStr; break; case 1://whole array, set 1st element - strURL += fieldStr + ";[" + valueStr; - expectedStdout = "New array value is: "+valueStr; - break; + strURL += fieldStr + ";[" + valueStr; + expectedStdout = "New array value is: "+valueStr; + break; case 2://char et al - to be set at JS side - strURL += fieldStr + ";JavaScript"; - expectedStdout = "New value is: "+valueStr; + strURL += fieldStr + ";JavaScript"; + expectedStdout = "New value is: "+valueStr; break; default: - break; + break; } ProcessResult pr = server.executeBrowser(strURL, new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); From bugzilla-daemon at icedtea.classpath.org Wed Oct 31 10:48:03 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 31 Oct 2012 17:48:03 +0000 Subject: [Bug 1156] Fatal: Read Error: Could not read or parse the JNLP file. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1156 Saad Mohammad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |smohammad at redhat.com Depends on| |909 Resolution|DUPLICATE |--- Assignee|omajid at redhat.com |smohammad at redhat.com --- Comment #2 from Saad Mohammad --- I have taken a deeper look into this bug. Aside from the dependency of percent-encoding trouble (Bug PR909), the 'best' URL is being determined incorrectly by ResourceTracker.findBestUrl( ) when the resource is initialized. As a result, I have reopened this bug. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121031/24f14d86/attachment.html From bugzilla-daemon at icedtea.classpath.org Wed Oct 31 10:48:03 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 31 Oct 2012 17:48:03 +0000 Subject: [Bug 909] The Java applet at http://de.gosupermodel.com/games/wardrobegame.jsp fails. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=909 Saad Mohammad changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1156 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121031/b69ddbec/attachment.html From bugzilla-daemon at icedtea.classpath.org Wed Oct 31 11:09:02 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 31 Oct 2012 18:09:02 +0000 Subject: [Bug 1204] Archive URL wrongly resolved In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1204 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|dbhole at redhat.com |adomurad at redhat.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121031/5c88f584/attachment.html From dbhole at redhat.com Wed Oct 31 11:36:51 2012 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 31 Oct 2012 14:36:51 -0400 Subject: One battle after another (Bug 1198 - JSObject is not valid on Javascript side) In-Reply-To: References: Message-ID: <20121031183650.GL6705@redhat.com> * helpcrypto helpcrypto [2012-10-30 09:57]: > So, what you guys say about this bug? > > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1198 > > (I have another 2 bugs related to PKCS11, but they arent critical, and > involve much more diggin) > Thanks for updating it. Sorry for the lag, I've been away for the past couple of days. I will take a look at it later today/tomorrow; this does look like a bug to me now. Deepak > Thanks! From bugzilla-daemon at icedtea.classpath.org Wed Oct 31 14:10:07 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 31 Oct 2012 21:10:07 +0000 Subject: [Bug 1198] JSObject is not valid on Javascript side In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1198 --- Comment #3 from Deepak Bhole --- Hi, I took a second look at this issue. As I understand it, JS is calling testFunction() in the applet code which in turn creates a JSObject representing "new Object()" that resides in the Java VM. The code is then trying to set "code" in the newly created JSObject. However this JSObject is just a proxy for the Object instance created by "new Object()". And The Object class does not have a member .code I am not sure why the Oracle VM works here, but I don't see why it should. Regardless of whether JS is strong or weakly typed, the JSObject in question here represents an Object in a VM which is strongly typed. Attempting to set an arbitrary property within the Object instance should result in an error. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121031/4d56bc45/attachment.html