harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r501393 - in /harmony/enhanced/drlvm/trunk: src/test/regression/H2808/ src/test/regression/H2808/finTest.java src/test/regression/H2808/finTest1.j src/test/regression/H2808/finTest2.j vm/vmcore/src/class_support/Prepare.cpp
Date Tue, 30 Jan 2007 12:54:40 GMT
Author: gshimansky
Date: Tue Jan 30 04:54:39 2007
New Revision: 501393

URL: http://svn.apache.org/viewvc?view=rev&rev=501393
Log:
Applied HARMONY-2808 [drlvm] VM crashes instead of throwing VerifyError when used class overrides
final method

Attached test converted to regression tests and included in commit.
Tests passed on Ubuntu6 x86, Windows 2003 server x86 and SuSE9 x86_64


Added:
    harmony/enhanced/drlvm/trunk/src/test/regression/H2808/
    harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest.java   (with props)
    harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest1.j   (with props)
    harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest2.j   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Prepare.cpp

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest.java?view=auto&rev=501393
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest.java Tue Jan 30 04:54:39
2007
@@ -0,0 +1,18 @@
+package org.apache.harmony.drlvm.tests.regression.h2808;
+
+import junit.framework.TestCase;
+
+public class finTest extends TestCase {
+    public void test() {
+        try {
+            new finTest1().test();
+            fail("Test failed. VerifyError was not thrown");
+        } catch (VerifyError e) {
+            System.out.println("Test passed: "+e);
+        } catch (Throwable e) {
+            fail("Test failed: unexpected "+e);
+            e.printStackTrace();
+        }
+    }
+}
+

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest1.j
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest1.j?view=auto&rev=501393
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest1.j (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest1.j Tue Jan 30 04:54:39
2007
@@ -0,0 +1,27 @@
+.class public org/apache/harmony/drlvm/tests/regression/h2808/finTest1
+.super java/lang/Object
+;
+; standard initializer
+.method public <init>()V
+   aload_0
+   invokespecial java/lang/Object/<init>()V
+   return
+.end method 
+; final method
+.method public final testMethod()I
+  .limit locals 2
+  .limit stack 2
+  sipush 1
+  ireturn
+.end method
+;
+.method public test()V
+  .limit stack 2
+  .limit locals 2
+  new org/apache/harmony/drlvm/tests/regression/h2808/finTest2
+  dup
+  invokespecial org/apache/harmony/drlvm/tests/regression/h2808/finTest2/<init>()V
+  aload 0
+  invokevirtual org/apache/harmony/drlvm/tests/regression/h2808/finTest2/testMethod()V
+  return
+.end method

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest1.j
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest2.j
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest2.j?view=auto&rev=501393
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest2.j (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest2.j Tue Jan 30 04:54:39
2007
@@ -0,0 +1,17 @@
+.class public org/apache/harmony/drlvm/tests/regression/h2808/finTest2
+.super org/apache/harmony/drlvm/tests/regression/h2808/finTest1
+;
+; standard initializer
+.method public <init>()V
+   aload_0
+   invokespecial finTest1/<init>()V
+   return
+.end method 
+;
+.method public final testMethod()I
+  .limit locals 2
+  .limit stack 2
+  sipush 2
+  ireturn
+.end method
+

Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H2808/finTest2.j
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Prepare.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Prepare.cpp?view=diff&rev=501393&r1=501392&r2=501393
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Prepare.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Prepare.cpp Tue Jan 30 04:54:39
2007
@@ -1263,7 +1263,7 @@
     // STEP 7 ::: ASSIGN OFFSETS to the class and virtual METHODS
     //
     assign_offsets_to_methods(env);
-    if(in_error())
+    if(exn_raised())
         return false;
 
     //



Mime
View raw message