You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Elena Sayapina (JIRA)" <ji...@apache.org> on 2007/07/04 09:47:04 UTC

[jira] Created: (HARMONY-4332) [drlvm][kernel] Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0

[drlvm][kernel] Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0
---------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4332
                 URL: https://issues.apache.org/jira/browse/HARMONY-4332
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Elena Sayapina


Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0

Please, consider the following code:

public class enumerateTest {

	public static void main(String[] args) {
		try {
			Thread.enumerate(new Thread[0]);
			System.out.println("TEST PASSED");
		} catch (Exception e) {
			e.printStackTrace();
			System.out.println("TEST FAILED: unexpected " + e);
		}
	}
}

Output on Harmony- r552662:

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 = r552662, (Jul  3 2007), Windows/ia32/msvc 1310, release build
http://harmony.apache.org

java.lang.ArrayIndexOutOfBoundsException
        at java.lang.ThreadGroup.enumerate(ThreadGroup.java:519)
        at java.lang.ThreadGroup.enumerate(ThreadGroup.java:212)
        at java.lang.Thread.enumerate(Thread.java:344)
        at enumerateTest.main(enumerateTest.java:5)
TEST FAILED: unexpected java.lang.ArrayIndexOutOfBoundsException

Output on RI:

java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)

TEST PASSED


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-4332) [drlvm][kernel] Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky reassigned HARMONY-4332:
------------------------------------------

    Assignee: Gregory Shimansky

> [drlvm][kernel] Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4332
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4332
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Elena Sayapina
>            Assignee: Gregory Shimansky
>         Attachments: H4332.patch
>
>
> Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0
> Please, consider the following code:
> public class enumerateTest {
> 	public static void main(String[] args) {
> 		try {
> 			Thread.enumerate(new Thread[0]);
> 			System.out.println("TEST PASSED");
> 		} catch (Exception e) {
> 			e.printStackTrace();
> 			System.out.println("TEST FAILED: unexpected " + e);
> 		}
> 	}
> }
> Output on Harmony- r552662:
> 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 = r552662, (Jul  3 2007), Windows/ia32/msvc 1310, release build
> http://harmony.apache.org
> java.lang.ArrayIndexOutOfBoundsException
>         at java.lang.ThreadGroup.enumerate(ThreadGroup.java:519)
>         at java.lang.ThreadGroup.enumerate(ThreadGroup.java:212)
>         at java.lang.Thread.enumerate(Thread.java:344)
>         at enumerateTest.main(enumerateTest.java:5)
> TEST FAILED: unexpected java.lang.ArrayIndexOutOfBoundsException
> Output on RI:
> java version "1.5.0_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)
> TEST PASSED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-4332) [drlvm][kernel] Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky resolved HARMONY-4332.
----------------------------------------

    Resolution: Fixed

Patch is applied at 616296.

> [drlvm][kernel] Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4332
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4332
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Elena Sayapina
>            Assignee: Gregory Shimansky
>         Attachments: H4332.patch
>
>
> Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0
> Please, consider the following code:
> public class enumerateTest {
> 	public static void main(String[] args) {
> 		try {
> 			Thread.enumerate(new Thread[0]);
> 			System.out.println("TEST PASSED");
> 		} catch (Exception e) {
> 			e.printStackTrace();
> 			System.out.println("TEST FAILED: unexpected " + e);
> 		}
> 	}
> }
> Output on Harmony- r552662:
> 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 = r552662, (Jul  3 2007), Windows/ia32/msvc 1310, release build
> http://harmony.apache.org
> java.lang.ArrayIndexOutOfBoundsException
>         at java.lang.ThreadGroup.enumerate(ThreadGroup.java:519)
>         at java.lang.ThreadGroup.enumerate(ThreadGroup.java:212)
>         at java.lang.Thread.enumerate(Thread.java:344)
>         at enumerateTest.main(enumerateTest.java:5)
> TEST FAILED: unexpected java.lang.ArrayIndexOutOfBoundsException
> Output on RI:
> java version "1.5.0_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)
> TEST PASSED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4332) [drlvm][kernel] Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0

Posted by "Pavel Rebriy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Rebriy updated HARMONY-4332:
----------------------------------

    Attachment: H4332.patch

The patch to fix the bug.

> [drlvm][kernel] Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4332
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4332
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Elena Sayapina
>         Attachments: H4332.patch
>
>
> Thread.enumerate(Thread[] array) throws unexpected ArrayIndexOutOfBoundsException if array.length = 0
> Please, consider the following code:
> public class enumerateTest {
> 	public static void main(String[] args) {
> 		try {
> 			Thread.enumerate(new Thread[0]);
> 			System.out.println("TEST PASSED");
> 		} catch (Exception e) {
> 			e.printStackTrace();
> 			System.out.println("TEST FAILED: unexpected " + e);
> 		}
> 	}
> }
> Output on Harmony- r552662:
> 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 = r552662, (Jul  3 2007), Windows/ia32/msvc 1310, release build
> http://harmony.apache.org
> java.lang.ArrayIndexOutOfBoundsException
>         at java.lang.ThreadGroup.enumerate(ThreadGroup.java:519)
>         at java.lang.ThreadGroup.enumerate(ThreadGroup.java:212)
>         at java.lang.Thread.enumerate(Thread.java:344)
>         at enumerateTest.main(enumerateTest.java:5)
> TEST FAILED: unexpected java.lang.ArrayIndexOutOfBoundsException
> Output on RI:
> java version "1.5.0_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)
> TEST PASSED

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.