[ https://issues.apache.org/jira/browse/HARMONY-3862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506195
]
Nina Rinskaya commented on HARMONY-3862:
----------------------------------------
A simple reproducer (see Test.java below) compiled by Eclipse compiler (both 3.2 and 3.3)
gives the same java.lang.VerifyError on Harmony.
To reproduce:
1. Create Test.java:
-------------------------------------
public class Test {
public boolean test() {
try {
Thread.sleep(10);
} catch (Exception e) {
} finally {
try {
try {
Thread.sleep(10);
} finally {
Thread.sleep(10);
}
} catch (Exception e) {
}
}
return true;
}
public static void main(String[] args) {
new Test().test();
System.out.println("SUCCESS");
}
}
-------------------------------------
2. Compile Test.java (below) with Eclipse 3.2/3.3 compiler (use RI to run ECJ because of
https://bugs.eclipse.org/bugs/show_bug.cgi?id=188648):
C:\jdk1.5.0_06\bin\java.exe -classpath c:\work\eut_eclipse\eclipse\plugins\org.eclipse.jdt.core_3.2.0.v_671.jar
org.eclipse.jdt.internal.compiler.batch.Main Test.java
3. Output on Harmony:
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 = r547521, (Jun 15 2007), Windows/ia32/msvc 1310, release build
http://harmony.apache.org
Uncaught exception in main:
java.lang.VerifyError: (class: Test, method: test()Z) A subroutine splits execution into several
ret instructions
at java.lang.ClassLoader.defineClass0(ClassLoader.java)
at java.lang.ClassLoader.defineClass(ClassLoader.java:438)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:70)
at java.net.URLClassLoader.access$3(URLClassLoader.java:1)
at java.net.URLClassLoader$URLHandler.createClass(URLClassLoader.java:261)
at java.net.URLClassLoader$URLFileHandler.findClass(URLClassLoader.java:560)
at java.net.URLClassLoader.findClassImpl(URLClassLoader.java:1194)
at java.net.URLClassLoader$4.run(URLClassLoader.java:889)
at java.net.URLClassLoader$4.run(URLClassLoader.java:1)
at java.security.AccessController.doPrivilegedImpl(AccessController.java:171)
at java.security.AccessController.doPrivileged(AccessController.java:64)
at java.net.URLClassLoader.findClass(URLClassLoader.java:891)
at java.lang.ClassLoader.loadClass(ClassLoader.java:575)
at java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:963)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
FAILED to invoke JVM.
Output on RI:
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
SUCCESS
4. The bytecode below corresponds to ECJ 3.2 compiled .class file:
-----------------
Compiled from "Test.java"
public class Test extends java.lang.Object{
public Test();
Code:
0: aload_0
1: invokespecial #8; //Method java/lang/Object."<init>":()V
4: return
public boolean test();
Code:
0: ldc2_w #13; //long 10l
3: invokestatic #15; //Method java/lang/Thread.sleep:(J)V
6: goto 55
9: pop
10: goto 55
13: astore_2
14: jsr 19
17: aload_2
18: athrow
19: astore_1
20: ldc2_w #13; //long 10l
23: invokestatic #15; //Method java/lang/Thread.sleep:(J)V
26: goto 46
29: astore 4
31: jsr 37
34: aload 4
36: athrow
37: astore_3
38: ldc2_w #13; //long 10l
41: invokestatic #15; //Method java/lang/Thread.sleep:(J)V
44: ret 3
46: jsr 37
49: goto 53
52: pop
53: ret 1
55: jsr 19
58: iconst_1
59: ireturn
Exception table:
from to target type
0 9 9 Class java/lang/Exception
0 13 13 any
55 58 13 any
20 29 29 any
46 49 29 any
20 52 52 Class java/lang/Exception
public static void main(java.lang.String[]);
Code:
0: new #1; //class Test
3: dup
4: invokespecial #25; //Method "<init>":()V
7: invokevirtual #26; //Method test:()Z
10: pop
11: getstatic #28; //Field java/lang/System.out:Ljava/io/PrintStream;
14: ldc #34; //String SUCCESS
16: invokevirtual #36; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
19: return
}
-----------------
> [drlvm][verifier] A subroutine splits execution into several ret instructions
> -----------------------------------------------------------------------------
>
> Key: HARMONY-3862
> URL: https://issues.apache.org/jira/browse/HARMONY-3862
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, DRLVM
> Environment: Harmony 5.0 M1
> Windows XP SP 2
> Eclipse 3.2
> OpenSSH_4.5p1
> Reporter: James Roper
>
> I am using Eclipse with an external SSH client (the one bundled with Cygwin) to connect
to a CVS server (using the "ext" method in Eclipse). It works fine when running Eclipse under
the Sun HotSpot JVM, however, with Harmony, Eclipse reports the following error:
> An internal error occured during: "Updating Synchronize view for CVS Workspace.".
> (class: org/eclipse/team/internal/core/subscribers/ContentComparator, method: compare(Ljava/lang/Object;Lorg/eclipse/core/runtime/IProgressMonitor;)Z)
A subroutine splits execution into several ret instructions
> If you need any more information about my environment, let me know. Off topic, are these
the sort of bugs I should be reporting in JIRA? I couldn't find any bugs that looked like
they were the same as this, I'm just a user trying out Milestone 1 because I want to help
the Harmony project.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|