[Bug 89] New: VMStackWalker
| Newsgroups | gmane.comp.java.vm.sablevm.bugs |
|---|---|
| Message-ID | <[email protected]> |
http://sablevm.org/bugs/show_bug.cgi?id=89
Summary: VMStackWalker
Product: SableVM
Version: staging
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: default
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
SableJIT can no longer bootstrap following the changes to the VMStackWalker.
Method.getParameterTypes() calls into various utility methods in ReflectUtil
(class with package access only) that eventually do a Class.forName(className).
This in turns calls:
Class.forName(className, true, VMStackWalker.getCallingLoader())
The calling loader is computed to be the bootstrap class loader that is then
used, instead of the SableJITClassLoader, to load the class.
Context used by getCallingLoader (uses entry 2):
(NB: The SableJITClassLoader is responsible of loading both SableJIT classes and
the junit testing framework classes)
0 --> gnu/classpath/VMStackWalker (cl: null)
1 --> java/lang/Class (cl: null)
2 --> java/lang/reflect/ReflectUtil (cl: null)
3 --> java/lang/reflect/ReflectUtil (cl: null)
4 --> java/lang/reflect/ReflectUtil (cl: null)
5 --> java/lang/reflect/Method (cl: null)
6 --> junit/framework/TestSuite (cl: sablejit/SableJITClassLoader)
7 --> junit/framework/TestSuite (cl: sablejit/SableJITClassLoader)
8 --> junit/framework/TestSuite (cl: sablejit/SableJITClassLoader)
9 --> junit/framework/TestSuite (cl: sablejit/SableJITClassLoader)
10 --> sablejit/arch/ArchitectureTest (cl: sablejit/SableJITClassLoader)
11 --> sablejit/TestAll (cl: sablejit/SableJITClassLoader)
12 --> sablejit/TestAll (cl: sablejit/SableJITClassLoader)
13 --> java/lang/reflect/Method (cl: null)
14 --> java/lang/reflect/Method (cl: null)
15 --> sablejit/SableJITClassLoader (cl: null)
16 --> sablejit/SableJITClassLoader (cl: null)
java.lang.ClassNotFoundException: sablejit.arch.ArchitectureFactory
at java.lang.VMClassLoader.loadClass (VMClassLoader.java:175)
at java.lang.Class.forName (Class.java:351)
at java.lang.Class.forName (Class.java:259)
at java.lang.reflect.ReflectUtil.typeToClass (ReflectUtil.java:99)
at java.lang.reflect.ReflectUtil.namesToClasses (ReflectUtil.java:153)
at java.lang.reflect.ReflectUtil.getParameterTypes (ReflectUtil.java:229)
at java.lang.reflect.Method.getParameterTypes (Method.java:191)
at junit.framework.TestSuite.isTestMethod (TestSuite.java:190)
at junit.framework.TestSuite.isPublicTestMethod (TestSuite.java:185)
at junit.framework.TestSuite.addTestMethod (TestSuite.java:108)
at junit.framework.TestSuite.TestSuite (TestSuite.java:75)
at sablejit.arch.ArchitectureTest.suite (ArchitectureTest.java:7526)
at sablejit.TestAll.suite (TestAll.java:26)
at sablejit.TestAll.main (TestAll.java:33)
at java.lang.reflect.Method.invokeNative (Method.java)
at java.lang.reflect.Method.invoke (Method.java:605)
at sablejit.SableJITClassLoader.invokeMainClass (SableJITClassLoader.java:189)
at sablejit.SableJITClassLoader.main (SableJITClassLoader.java:241)
at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)
at java.lang.VirtualMachine.main (VirtualMachine.java:92)
I will work on some fix. I see two options to study:
1) Have the StackWalker skip more frames
2) Explicitly specify the class loader to use for Class.forName() calls done
internally in reflection implementation.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.