Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 59317 invoked from network); 18 Oct 2006 10:59:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Oct 2006 10:59:08 -0000 Received: (qmail 87223 invoked by uid 500); 18 Oct 2006 10:59:04 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 87181 invoked by uid 500); 18 Oct 2006 10:59:04 -0000 Mailing-List: contact harmony-dev-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-dev@incubator.apache.org Received: (qmail 87170 invoked by uid 99); 18 Oct 2006 10:59:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 03:59:04 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of paulex.yang@gmail.com designates 66.249.92.174 as permitted sender) Received: from [66.249.92.174] (HELO ug-out-1314.google.com) (66.249.92.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 03:59:01 -0700 Received: by ug-out-1314.google.com with SMTP id y2so172293uge for ; Wed, 18 Oct 2006 03:58:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=aWqXQ6nopJpg8vuAkkzokv/y7FVtvqcjHWfRsGnHVputTBHZdfzbRJULdjEMiMqy36P7lm4L3UPatLwZReh0oz/OrajGj4f7RhmuWheQ1bKc3uDu/Z5eWN7mx52l3Pp9wtlOOfoo7K8rKRQQjB290e+FRu4+EeGtM17yePitaRk= Received: by 10.66.220.17 with SMTP id s17mr11517723ugg; Wed, 18 Oct 2006 03:58:39 -0700 (PDT) Received: from ?9.20.183.63? ( [195.212.29.92]) by mx.google.com with ESMTP id 39sm769545ugb.2006.10.18.03.58.38; Wed, 18 Oct 2006 03:58:38 -0700 (PDT) Message-ID: <453608DE.8060407@gmail.com> Date: Wed, 18 Oct 2006 11:58:38 +0100 From: Paulex Yang User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [classlib][archive]Security policy leads to vm crashes in loading class of JarFile References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 A little further hack shows that, the cause is o.a.h.luni.util.Msg cannot be initialized so early, which is the exception message i18n helper class. Its static init codes try to load ResourceBundle but failed. The new i18n helper o.a.h.l.internal.nls.Messages has same issue. I modified the java.net.URL ln.296 as below, and the test passed. - throw new MalformedURLException( - org.apache.harmony.luni.util.Msg.getString( - "K00d8", spec)); //$NON-NLS-1$ + throw new MalformedURLException("exception message here"); Leo Li wrote: > Hi, all: > During the self-hosting of Derby, I found a security policy if is > applied will lead to errors in loading the class of JarFile. IBM vm > will throw java/lang/UnsatisfiedLinkError: java/util/zip/ZipFile.ntvi > while > drlvm will crash with "SEH handler: shutdown errorSEH handler: too many > shutdown errors..." > > Here is the testcase: > > > import java.util.jar.*; > public class TestJarFile { > > public static void main(String[] args) throws Exception{ > System.out.println(JarFile.CENATT); > } > > } > > And the attachment is the derby_tests.policy. > > Then run: > > java -Djava.security.manager > -Djava.security.policy=derby_tests.policyTestJarFile > > Run passes, > > Harmony on IBM VM fails with java/lang/UnsatisfiedLinkError: > java/util/zip/ZipFile.ntvi > > Harmony on Drlvm fails with SEH handler: shutdown errorSEH handler: > too many > shutdown errors > > If the security manager is not specified, Harmony passes. > > -- Paulex Yang China Software Development Lab IBM --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org