Issue Details (XML | Word | Printable)

Key: RVM-814
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: David Grove
Reporter: Byeong Lee
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RVM

Wrong exception from Java reflection

Created: 14/Apr/09 02:22 PM   Updated: 08/Jun/09 09:36 AM   Resolved: 08/Jun/09 09:36 AM
Return to search
Component/s: Runtime: Class Library
Affects Version/s: 3.0.1, svn head
Fix Version/s: 3.1.0

Time Tracking:
Not Specified

File Attachments: 1. Text File reflection.patch (3 kB)
2. Java Source File ReflectionTest.java (4 kB)

Environment: Intel IA32, Linux 2.6.27, Ubuntu 8.10

Testcase included: yes
Patch Submitted: Yes


 Description  « Hide

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



Ian Rogers added a comment - 07/May/09 10:00 AM

Also tracked with a better break down of the actual problem in MRP: http://jira.codehaus.org/browse/MRP-3


Filip Pizlo added a comment - 31/May/09 07:20 PM

Patch committed in r15700.


Ian Rogers added a comment - 01/Jun/09 02:27 AM

Just FYI, MRP won't apply this patch as it is incorrect.


David Grove added a comment - 08/Jun/09 08:58 AM

testing alternate fix.


David Grove added a comment - 08/Jun/09 09:36 AM

alternate fix committed in r15701.