Nice catch Byeong,

the bug stems from the bytecode reflection code added last year. I've created a new tracker that I'll tackle [1] (your patch will fix the bytecode case but not the out-of-line). I've linked it into other related bugs that have been closed in MRP in order to get SPECjvm2008 running.

Regards,
Ian

[1] http://jira.codehaus.org/browse/MRP-3
--
Building a better RVM at http://mrp.codehaus.org/

2009/4/13 Byeong Lee <bclee@cs.utexas.edu>

It appears that Jikes RVM has a bug in the implementation of its reflection. For the detail, look at the patch and the test case: reflection.patch and Reflection.java. Try the following.

1. To see the bug, try the following three command lines.

$javac ReflectionTest.java

$java -showversion ReflectionTest
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)

newInstance: pass
invokeVirtual: pass
invokeStatic: pass

$rvm ReflectionTest
...
newInstance: pass
invokeVirtual: fail
unexpected cause of the Invocation target exception:
java.lang.reflect.InvocationTargetException
...
invokeStatic: fail
unexpected cause of the Invocation target exception:

2. To correct the bug, try the following.

 * Apply the patch: reflection.patch
 * Build Jikes RVM
 * Run it

$rvm ReflectionTest
newInstance: pass
invokeVirtual: pass
invokeStatic: pass

Cheers,
Byeong

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers