Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 19128 invoked from network); 13 Oct 2006 15:13:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Oct 2006 15:13:21 -0000 Received: (qmail 52398 invoked by uid 500); 13 Oct 2006 15:13:21 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 52292 invoked by uid 500); 13 Oct 2006 15:13:21 -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 52281 invoked by uid 99); 13 Oct 2006 15:13:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Oct 2006 08:13:21 -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; Fri, 13 Oct 2006 08:13:20 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 260877142FA for ; Fri, 13 Oct 2006 08:12:36 -0700 (PDT) Message-ID: <16153092.1160752356153.JavaMail.jira@brutus> Date: Fri, 13 Oct 2006 08:12:36 -0700 (PDT) From: "Serguei Zapreyev (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-1863) [classlib][drlvm] On Windows Runtime.exec(String[]cmdarray, String[] envp) throws IOException on large envp array while RI does not throw In-Reply-To: <6872210.1160741495993.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-1863?page=comments#action_12442045 ] Serguei Zapreyev commented on HARMONY-1863: ------------------------------------------- So, looks like the original test detects the known restriction of the implementation support and I suggest to close the issue because it isn't a bug. > [classlib][drlvm] On Windows Runtime.exec(String[]cmdarray, String[] envp) throws IOException on large envp array while RI does not throw > ----------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-1863 > URL: http://issues.apache.org/jira/browse/HARMONY-1863 > Project: Harmony > Issue Type: Bug > Environment: Windows > Reporter: Vera Petrashkova > Attachments: log.txt, log2.txt, Test.java, Test2.java, testExec2.zip > > > java.lang.Runtime.exec(String [] cmdarray, String[] envp) throws IOException when > envp array contains about 80 strings which have large lengths. > RI parses these specified environment variables successfully. > > Code for reproducing: > ------------------ > import junit.framework.TestCase; > import java.io.*; > public class testExec2 extends TestCase { > public static int nmbEnv = 80; > public final static String ENV_S = "env"; > public final static String ENV_S1 = "0123456789"; > > public void testExec() { > String [] envs = new String [nmbEnv]; > for (int i = 0; i < nmbEnv; i++) { > envs[i] = ENV_S+Integer.toString(i)+"="; > String s = ""; > for (int j = 0; j < i; j++) { > s = s + ENV_S1; > } > s = s+"a"; > envs[i] = envs[i] + s; > } > String [] cmdL = new String[4]; // + nmbEnv]; > cmdL[0] = System.getProperty("java.home")+File.separator+"bin"+File.separator+"java"; > cmdL[1] = "-classpath"; > cmdL[2] = "."; > cmdL[3] = "testExec2_App"; > // System.out.println(envs[nmbEnv-1]); > try { > Process p = Runtime.getRuntime().exec(cmdL, envs); > p.waitFor(); > int ans = p.exitValue(); > if (ans != 0) { > assertEquals("Incorrect exitValue", 0, ans); > } > } catch (Throwable e) { > e.printStackTrace(); > fail("Unexpected error: "+e); > } > } > } > class testExec2_App { > public static void main(String[] args) { > System.exit(0); > } > } > ------------------ > > Output on RI > ================== > java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) > . > Time: 0.188 > OK (1 test) > > Output on Harmony > ================ > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r454528, (Oct 13 2006), Windows/ia32/msvc 1310, release build > http://incubator.apache.org/harmony > .java.io.IOException: The creation of the Process has just failed: "H:\share\binaries\buil > ds\combined\20061013\drl_20061013_win_ia32_0002_msvc_r_H\bin\java" -classpath . testExec2_App > at java.lang.Runtime$SubProcess.execVM(Unknown Source) > at java.lang.Runtime.exec(Unknown Source) > at java.lang.Runtime.exec(Unknown Source) > at testExec2.testExec(testExec2.java:27) > at java.lang.reflect.VMReflection.invokeMethod(Native Method) > at java.lang.reflect.Method.invoke(Unknown Source) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:125) > at junit.framework.TestResult$1.protect(TestResult.java:107) > at junit.framework.TestResult.runProtected(TestResult.java:135) > at junit.framework.TestResult.run(TestResult.java:104) > at junit.framework.TestCase.run(TestCase.java:119) > at junit.framework.TestSuite.runTest(TestSuite.java:209) > at junit.framework.TestSuite.run(TestSuite.java:202) > at junit.textui.TestRunner.doRun(TestRunner.java:115) > at junit.textui.TestRunner.start(TestRunner.java:171) > at junit.textui.TestRunner.main(TestRunner.java:136) > F > Time: 0.047 > There was 1 failure: > 1) testExec(testExec2)junit.framework.AssertionFailedError: Unexpected error: java.io.IOEx > ception: The creation of the Process has just failed: "H:\share\binaries\builds\combined\2 > 0061013\drl_20061013_win_ia32_0002_msvc_r_H\bin\java" -classpath . testExec2_App > at testExec2.testExec(testExec2.java:35) > at java.lang.reflect.VMReflection.invokeMethod(Native Method) > > FAILURES!!! -- 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