Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 96205 invoked from network); 4 Sep 2006 10:47:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Sep 2006 10:47:59 -0000 Received: (qmail 62136 invoked by uid 500); 4 Sep 2006 10:47:58 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 62104 invoked by uid 500); 4 Sep 2006 10:47:58 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 62093 invoked by uid 99); 4 Sep 2006 10:47:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Sep 2006 03:47:58 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Sep 2006 03:47:56 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DDB17714319 for ; Mon, 4 Sep 2006 10:44:28 +0000 (GMT) Message-ID: <15053083.1157366668905.JavaMail.jira@brutus> Date: Mon, 4 Sep 2006 03:44:28 -0700 (PDT) From: "Mikhail Loenko (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Updated: (HARMONY-1147) [classlib][kernel] Harmony+j9 throws NPE while Harmony+drlvm and RI throws IndexOutOfBoundsException for SecureClassLoader.defineClass() In-Reply-To: <4111913.1155268814978.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-1147?page=all ] Mikhail Loenko updated HARMONY-1147: ------------------------------------ Summary: [classlib][kernel] Harmony+j9 throws NPE while Harmony+drlvm and RI throws IndexOutOfBoundsException for SecureClassLoader.defineClass() (was: [classlib][security] Harmony+j9 throws NPE while Harmony+drlvm and RI throws IndexOutOfBoundsException for SecureClassLoader.defineClass()) changed name to reflect sub-component > [classlib][kernel] Harmony+j9 throws NPE while Harmony+drlvm and RI throws IndexOutOfBoundsException for SecureClassLoader.defineClass() > ----------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-1147 > URL: http://issues.apache.org/jira/browse/HARMONY-1147 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Vladimir Ivanov > > Harmony+j9 throws NPE for SecureClassLoader.defineClass(..) while Harmony+drlvm and RI throws IndexOutOfBoundsException. > ==================== test.java ===================== > import java.net.URL; > import java.security.*; > public class test { > public static void main(String args[]) { > try { > CodeSource lcs = new CodeSource(new URL(new URL("http://www.intel.com"), "0"), new CodeSigner[192]); > new CL().test1((String) null, new byte[]{2,2}, 0, 127, lcs); > } catch (Exception e) { > System.out.println("exception: " + e); > } > } > } > class CL extends SecureClassLoader { > CL(){ super(); } > public int test1 (String name, byte[] array, int off, int len, CodeSource cs) { > try{ > defineClass(name, array, off, len, cs); > } catch(Exception e) { > e.printStackTrace(); > } > return 0; > } > } > ================================================ > Output: > C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -cp . -showversion test > java version "1.5.0" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) > BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar)) > java.lang.ArrayIndexOutOfBoundsException > at java.lang.ClassLoader.defineClass(Ljava.lang.String;[BIILjava.security.ProtectionDomain;)Ljava.lang.Class;(Unknown Source) > at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) > at CL.test1(test.java:18) > at test.main(test.java:8) > C:\tmp\tmp17>C:\harmony\classlib1.5\deploy\jdk\jre\bin\java.exe -cp . -showversion test > java version 1.5 (subset) > (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > java.lang.NullPointerException > at java.security.CodeSource.getCertificatesNoClone(CodeSource.java:170) > at java.security.CodeSource.getCertificates(CodeSource.java:145) > at java.lang.ClassLoader.defineClass(ClassLoader.java:238) > at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:68) > at CL.test1(test.java:18) > at test.main(test.java:8) > C:\tmp\tmp17>C:\harmony\drlvm1.5\build\win_ia32_msvc_debug\deploy\jre\bin\java -Dvm.assert_dialog=false -cp . -showversion test > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r430209, (Aug 10 2006), Windows/ia32/msvc 1310, debug build > http://incubator.apache.org/harmony > java.lang.IndexOutOfBoundsException: Check your arguments > at java.lang.ClassLoader.defineClass() > at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:68) > at CL.test1(test.java:18) > at test.main(test.java:8) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira