harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r463912 - in /incubator/harmony/enhanced/drlvm/trunk/vm: interpreter/src/interpreter.cpp vmcore/include/version_svn_tag.h
Date Sat, 14 Oct 2006 11:07:24 GMT
Author: geirm
Date: Sat Oct 14 04:07:22 2006
New Revision: 463912

URL: http://svn.apache.org/viewvc?view=rev&rev=463912
Log:
HARMONY-1561

Interpreter throws IllegalAccessError on putfield opcode for all methods except <init>.
It should not throw the error if the <init> method for this object is in the calling
stack.
Reproducible on activemq-4.0.2.

Had to -R putfield.patch before applying H-1561.diff

TestPutFinal.j passes , as do smoke, c-unit, kernel on Ubuntu 6



Modified:
    incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp?view=diff&rev=463912&r1=463911&r2=463912
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp Sat Oct 14 04:07:22
2006
@@ -1780,21 +1780,9 @@
         M2N_FREE_MACRO;
     }
 
-    if (field->is_final()) {
-        if (!frame.method->is_init()) {
-
-            // searching for the constructor for this class in stack.
-            for (StackFrame *f = frame.prev; true; f = f->prev) {
-                if (f == NULL) {
-                    throwIAE(field_get_name(field));
-                    return;
-                }
-
-                if (f->This == frame.This && f->method->is_init()) {
-                    break;
-                }
-            }
-        }
+    if (field->is_final() && clazz != field->get_class()) {
+        throwIAE(field_get_name(field));
+        return;
     }
 
     DEBUG_BYTECODE(field->get_name()->bytes << " " << field->get_descriptor()->bytes
@@ -2526,7 +2514,7 @@
             << frame.method->get_descriptor()->bytes << endl);
 
     assert(frame.method->is_static() || frame.This);
-
+    
     M2N_ALLOC_MACRO;
     assert(!check_current_thread_exception());
     assert(!hythread_is_suspend_enabled());

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h?view=diff&rev=463912&r1=463911&r2=463912
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h Sat Oct 14
04:07:22 2006
@@ -18,6 +18,6 @@
 #ifndef _VERSION_SVN_TAG_
 #define _VERSION_SVN_TAG_
 
-#define VERSION_SVN_TAG  "454528"
+#define VERSION_SVN_TAG  "463908"
 
 #endif // _VERSION_SVN_TAG_



Mime
View raw message