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/05/18 11:33:16 UTC

[jira] Created: (HARMONY-3908) [drlvm] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper

[drlvm] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper
-------------------------------------------------------------------------------------------------------------------

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


Drlvm crashes in primitives support if call invoke() method with wrong argument: 
Argument is object of a class extends Number instead of expected object of primitive type wrapper.

Please, consider the following code:

import java.lang.reflect.Method;

public class invokeTest {

	byte b = 0;
	
	public static void main(String[] args) {
	    try {
	    	Method method = invokeTest.class.getDeclaredMethod("test", new Class[] {Byte.TYPE});
	    	method.invoke(new invokeTest(), new Object[] {new N()}); 
	    	System.out.println("TEST FAILED: no exception");
	    } catch(IllegalArgumentException e) {
	    	System.out.println("TEST PASSED: " + e);
	    } catch(Exception e) {
	    	System.out.println("TEST FAILED: unexpected " + e);
	    }
	}
	
	public void test(byte b) {
    	this.b = b;
    }
}

class N extends Number {
	
	public double doubleValue() { 
		return 0; 
	}
	
	public float floatValue() { 
		return 0;
	}

	public int intValue() {
		return 0;
	}

	public long longValue() {
		return 0;
	}
}

Output on Harmony-r539255:

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 = r539255, (May 18 2007), Windows/ia32/msvc 1310, release build
http://incubator.apache.org/harmony

Internal error:C:\BT\build\checkouts\drlvm\vm\vmcore\src\jit\primitives_support.cpp:320: Unknown type descriptor

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

 
Output on HotSpot:

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: java.lang.IllegalArgumentException: argument type mismatch


Please, NOTE that if N doesn't extend any class or extends some class other than Number the test passes.



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


[jira] Updated: (HARMONY-3908) [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper

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

Eugene S. Ostrovsky updated HARMONY-3908:
-----------------------------------------

    Attachment: H3908-Regression-test.patch

Added patch:
  H3908-Regression-test.patch

Regression test for the issue.

> [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3908
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3908
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Elena Sayapina
>         Attachments: H3908-Regression-test.patch, invokeTest.java
>
>
> Drlvm crashes in primitives support if call invoke() method with wrong argument: 
> Argument is object of a class extends Number instead of expected object of primitive type wrapper.
> Please, consider the following code:
> import java.lang.reflect.Method;
> public class invokeTest {
> 	byte b = 0;
> 	
> 	public static void main(String[] args) {
> 	    try {
> 	    	Method method = invokeTest.class.getDeclaredMethod("test", new Class[] {Byte.TYPE});
> 	    	method.invoke(new invokeTest(), new Object[] {new N()}); 
> 	    	System.out.println("TEST FAILED: no exception");
> 	    } catch(IllegalArgumentException e) {
> 	    	System.out.println("TEST PASSED: " + e);
> 	    } catch(Exception e) {
> 	    	System.out.println("TEST FAILED: unexpected " + e);
> 	    }
> 	}
> 	
> 	public void test(byte b) {
>     	this.b = b;
>     }
> }
> class N extends Number {
> 	
> 	public double doubleValue() { 
> 		return 0; 
> 	}
> 	
> 	public float floatValue() { 
> 		return 0;
> 	}
> 	public int intValue() {
> 		return 0;
> 	}
> 	public long longValue() {
> 		return 0;
> 	}
> }
> Output on Harmony-r539255:
> 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 = r539255, (May 18 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Internal error:C:\BT\build\checkouts\drlvm\vm\vmcore\src\jit\primitives_support.cpp:320: Unknown type descriptor
> This application has requested the Runtime to terminate it in an unusual way.
> Please contact the application's support team for more information.
>  
> Output on HotSpot:
> 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: java.lang.IllegalArgumentException: argument type mismatch
> Please, NOTE that if N doesn't extend any class or extends some class other than Number the test passes.

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


[jira] Closed: (HARMONY-3908) [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper

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

Elena Sayapina closed HARMONY-3908.
-----------------------------------


Thank you, Gregory, Eugene.
Verified on Harmony-r547521-msvc-debug.



> [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3908
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3908
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Elena Sayapina
>            Assignee: Gregory Shimansky
>         Attachments: H3908-Added-check-for-wrapper-objects-in-reflection-invoke.patch, H3908-Regression-test.patch, invokeTest.java
>
>
> Drlvm crashes in primitives support if call invoke() method with wrong argument: 
> Argument is object of a class extends Number instead of expected object of primitive type wrapper.
> Please, consider the following code:
> import java.lang.reflect.Method;
> public class invokeTest {
> 	byte b = 0;
> 	
> 	public static void main(String[] args) {
> 	    try {
> 	    	Method method = invokeTest.class.getDeclaredMethod("test", new Class[] {Byte.TYPE});
> 	    	method.invoke(new invokeTest(), new Object[] {new N()}); 
> 	    	System.out.println("TEST FAILED: no exception");
> 	    } catch(IllegalArgumentException e) {
> 	    	System.out.println("TEST PASSED: " + e);
> 	    } catch(Exception e) {
> 	    	System.out.println("TEST FAILED: unexpected " + e);
> 	    }
> 	}
> 	
> 	public void test(byte b) {
>     	this.b = b;
>     }
> }
> class N extends Number {
> 	
> 	public double doubleValue() { 
> 		return 0; 
> 	}
> 	
> 	public float floatValue() { 
> 		return 0;
> 	}
> 	public int intValue() {
> 		return 0;
> 	}
> 	public long longValue() {
> 		return 0;
> 	}
> }
> Output on Harmony-r539255:
> 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 = r539255, (May 18 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Internal error:C:\BT\build\checkouts\drlvm\vm\vmcore\src\jit\primitives_support.cpp:320: Unknown type descriptor
> This application has requested the Runtime to terminate it in an unusual way.
> Please contact the application's support team for more information.
>  
> Output on HotSpot:
> 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: java.lang.IllegalArgumentException: argument type mismatch
> Please, NOTE that if N doesn't extend any class or extends some class other than Number the test passes.

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


[jira] Updated: (HARMONY-3908) [drlvm] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper

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

Elena Sayapina updated HARMONY-3908:
------------------------------------

    Attachment: invokeTest.java

> [drlvm] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3908
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3908
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Elena Sayapina
>         Attachments: invokeTest.java
>
>
> Drlvm crashes in primitives support if call invoke() method with wrong argument: 
> Argument is object of a class extends Number instead of expected object of primitive type wrapper.
> Please, consider the following code:
> import java.lang.reflect.Method;
> public class invokeTest {
> 	byte b = 0;
> 	
> 	public static void main(String[] args) {
> 	    try {
> 	    	Method method = invokeTest.class.getDeclaredMethod("test", new Class[] {Byte.TYPE});
> 	    	method.invoke(new invokeTest(), new Object[] {new N()}); 
> 	    	System.out.println("TEST FAILED: no exception");
> 	    } catch(IllegalArgumentException e) {
> 	    	System.out.println("TEST PASSED: " + e);
> 	    } catch(Exception e) {
> 	    	System.out.println("TEST FAILED: unexpected " + e);
> 	    }
> 	}
> 	
> 	public void test(byte b) {
>     	this.b = b;
>     }
> }
> class N extends Number {
> 	
> 	public double doubleValue() { 
> 		return 0; 
> 	}
> 	
> 	public float floatValue() { 
> 		return 0;
> 	}
> 	public int intValue() {
> 		return 0;
> 	}
> 	public long longValue() {
> 		return 0;
> 	}
> }
> Output on Harmony-r539255:
> 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 = r539255, (May 18 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Internal error:C:\BT\build\checkouts\drlvm\vm\vmcore\src\jit\primitives_support.cpp:320: Unknown type descriptor
> This application has requested the Runtime to terminate it in an unusual way.
> Please contact the application's support team for more information.
>  
> Output on HotSpot:
> 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: java.lang.IllegalArgumentException: argument type mismatch
> Please, NOTE that if N doesn't extend any class or extends some class other than Number the test passes.

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


[jira] Assigned: (HARMONY-3908) [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper

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

Gregory Shimansky reassigned HARMONY-3908:
------------------------------------------

    Assignee: Gregory Shimansky

> [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3908
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3908
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Elena Sayapina
>            Assignee: Gregory Shimansky
>         Attachments: H3908-Added-check-for-wrapper-objects-in-reflection-invoke.patch, H3908-Regression-test.patch, invokeTest.java
>
>
> Drlvm crashes in primitives support if call invoke() method with wrong argument: 
> Argument is object of a class extends Number instead of expected object of primitive type wrapper.
> Please, consider the following code:
> import java.lang.reflect.Method;
> public class invokeTest {
> 	byte b = 0;
> 	
> 	public static void main(String[] args) {
> 	    try {
> 	    	Method method = invokeTest.class.getDeclaredMethod("test", new Class[] {Byte.TYPE});
> 	    	method.invoke(new invokeTest(), new Object[] {new N()}); 
> 	    	System.out.println("TEST FAILED: no exception");
> 	    } catch(IllegalArgumentException e) {
> 	    	System.out.println("TEST PASSED: " + e);
> 	    } catch(Exception e) {
> 	    	System.out.println("TEST FAILED: unexpected " + e);
> 	    }
> 	}
> 	
> 	public void test(byte b) {
>     	this.b = b;
>     }
> }
> class N extends Number {
> 	
> 	public double doubleValue() { 
> 		return 0; 
> 	}
> 	
> 	public float floatValue() { 
> 		return 0;
> 	}
> 	public int intValue() {
> 		return 0;
> 	}
> 	public long longValue() {
> 		return 0;
> 	}
> }
> Output on Harmony-r539255:
> 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 = r539255, (May 18 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Internal error:C:\BT\build\checkouts\drlvm\vm\vmcore\src\jit\primitives_support.cpp:320: Unknown type descriptor
> This application has requested the Runtime to terminate it in an unusual way.
> Please contact the application's support team for more information.
>  
> Output on HotSpot:
> 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: java.lang.IllegalArgumentException: argument type mismatch
> Please, NOTE that if N doesn't extend any class or extends some class other than Number the test passes.

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


[jira] Updated: (HARMONY-3908) [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper

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

Eugene S. Ostrovsky updated HARMONY-3908:
-----------------------------------------

    Attachment: H3908-Added-check-for-wrapper-objects-in-reflection-invoke.patch

Added patch:
H3908-Added-check-for-wrapper-objects-in-reflection-invoke.patch

Fix for the issue.

> [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3908
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3908
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Elena Sayapina
>         Attachments: H3908-Added-check-for-wrapper-objects-in-reflection-invoke.patch, H3908-Regression-test.patch, invokeTest.java
>
>
> Drlvm crashes in primitives support if call invoke() method with wrong argument: 
> Argument is object of a class extends Number instead of expected object of primitive type wrapper.
> Please, consider the following code:
> import java.lang.reflect.Method;
> public class invokeTest {
> 	byte b = 0;
> 	
> 	public static void main(String[] args) {
> 	    try {
> 	    	Method method = invokeTest.class.getDeclaredMethod("test", new Class[] {Byte.TYPE});
> 	    	method.invoke(new invokeTest(), new Object[] {new N()}); 
> 	    	System.out.println("TEST FAILED: no exception");
> 	    } catch(IllegalArgumentException e) {
> 	    	System.out.println("TEST PASSED: " + e);
> 	    } catch(Exception e) {
> 	    	System.out.println("TEST FAILED: unexpected " + e);
> 	    }
> 	}
> 	
> 	public void test(byte b) {
>     	this.b = b;
>     }
> }
> class N extends Number {
> 	
> 	public double doubleValue() { 
> 		return 0; 
> 	}
> 	
> 	public float floatValue() { 
> 		return 0;
> 	}
> 	public int intValue() {
> 		return 0;
> 	}
> 	public long longValue() {
> 		return 0;
> 	}
> }
> Output on Harmony-r539255:
> 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 = r539255, (May 18 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Internal error:C:\BT\build\checkouts\drlvm\vm\vmcore\src\jit\primitives_support.cpp:320: Unknown type descriptor
> This application has requested the Runtime to terminate it in an unusual way.
> Please contact the application's support team for more information.
>  
> Output on HotSpot:
> 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: java.lang.IllegalArgumentException: argument type mismatch
> Please, NOTE that if N doesn't extend any class or extends some class other than Number the test passes.

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


[jira] Updated: (HARMONY-3908) [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper

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

Gregory Shimansky updated HARMONY-3908:
---------------------------------------

    Summary: [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper  (was: [drlvm] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper)

> [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3908
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3908
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Elena Sayapina
>         Attachments: invokeTest.java
>
>
> Drlvm crashes in primitives support if call invoke() method with wrong argument: 
> Argument is object of a class extends Number instead of expected object of primitive type wrapper.
> Please, consider the following code:
> import java.lang.reflect.Method;
> public class invokeTest {
> 	byte b = 0;
> 	
> 	public static void main(String[] args) {
> 	    try {
> 	    	Method method = invokeTest.class.getDeclaredMethod("test", new Class[] {Byte.TYPE});
> 	    	method.invoke(new invokeTest(), new Object[] {new N()}); 
> 	    	System.out.println("TEST FAILED: no exception");
> 	    } catch(IllegalArgumentException e) {
> 	    	System.out.println("TEST PASSED: " + e);
> 	    } catch(Exception e) {
> 	    	System.out.println("TEST FAILED: unexpected " + e);
> 	    }
> 	}
> 	
> 	public void test(byte b) {
>     	this.b = b;
>     }
> }
> class N extends Number {
> 	
> 	public double doubleValue() { 
> 		return 0; 
> 	}
> 	
> 	public float floatValue() { 
> 		return 0;
> 	}
> 	public int intValue() {
> 		return 0;
> 	}
> 	public long longValue() {
> 		return 0;
> 	}
> }
> Output on Harmony-r539255:
> 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 = r539255, (May 18 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Internal error:C:\BT\build\checkouts\drlvm\vm\vmcore\src\jit\primitives_support.cpp:320: Unknown type descriptor
> This application has requested the Runtime to terminate it in an unusual way.
> Please contact the application's support team for more information.
>  
> Output on HotSpot:
> 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: java.lang.IllegalArgumentException: argument type mismatch
> Please, NOTE that if N doesn't extend any class or extends some class other than Number the test passes.

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


[jira] Resolved: (HARMONY-3908) [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper

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

Gregory Shimansky resolved HARMONY-3908.
----------------------------------------

    Resolution: Fixed

Patch applied at 547333. Please check that the bug is fixed for you.

> [drlvm][kernel] Drlvm crashes on Method.invoke(obj, {arg}) if arg extends Number instead of expected primitive type wrapper
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3908
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3908
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Elena Sayapina
>            Assignee: Gregory Shimansky
>         Attachments: H3908-Added-check-for-wrapper-objects-in-reflection-invoke.patch, H3908-Regression-test.patch, invokeTest.java
>
>
> Drlvm crashes in primitives support if call invoke() method with wrong argument: 
> Argument is object of a class extends Number instead of expected object of primitive type wrapper.
> Please, consider the following code:
> import java.lang.reflect.Method;
> public class invokeTest {
> 	byte b = 0;
> 	
> 	public static void main(String[] args) {
> 	    try {
> 	    	Method method = invokeTest.class.getDeclaredMethod("test", new Class[] {Byte.TYPE});
> 	    	method.invoke(new invokeTest(), new Object[] {new N()}); 
> 	    	System.out.println("TEST FAILED: no exception");
> 	    } catch(IllegalArgumentException e) {
> 	    	System.out.println("TEST PASSED: " + e);
> 	    } catch(Exception e) {
> 	    	System.out.println("TEST FAILED: unexpected " + e);
> 	    }
> 	}
> 	
> 	public void test(byte b) {
>     	this.b = b;
>     }
> }
> class N extends Number {
> 	
> 	public double doubleValue() { 
> 		return 0; 
> 	}
> 	
> 	public float floatValue() { 
> 		return 0;
> 	}
> 	public int intValue() {
> 		return 0;
> 	}
> 	public long longValue() {
> 		return 0;
> 	}
> }
> Output on Harmony-r539255:
> 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 = r539255, (May 18 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Internal error:C:\BT\build\checkouts\drlvm\vm\vmcore\src\jit\primitives_support.cpp:320: Unknown type descriptor
> This application has requested the Runtime to terminate it in an unusual way.
> Please contact the application's support team for more information.
>  
> Output on HotSpot:
> 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: java.lang.IllegalArgumentException: argument type mismatch
> Please, NOTE that if N doesn't extend any class or extends some class other than Number the test passes.

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