You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2007/01/16 18:45:22 UTC

svn commit: r496795 - /harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp

Author: gshimansky
Date: Tue Jan 16 09:45:21 2007
New Revision: 496795

URL: http://svn.apache.org/viewvc?view=rev&rev=496795
Log:
Applied HARMONY-2976. [drlvm][interpreter] VM crashes instead of throwing NullPointerException

Tests passed on Ubuntu x86, Windows 2003 server x86, SuSE9 x86_64


Modified:
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp?view=diff&rev=496795&r1=496794&r2=496795
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp Tue Jan 16 09:45:21 2007
@@ -2256,6 +2256,8 @@
     vm_monitor_enter_wrapper(frame.locked_monitors->monitor);
     M2N_FREE_MACRO;
 
+    if (exn_raised()) return;
+
     frame.stack.ref() = FLAG_NONE;
     frame.stack.pop();
     frame.ip++;
@@ -2827,15 +2829,14 @@
                                     frame.locked_monitors = new_ml;
                                     Opcode_MONITORENTER(frame);
                                     frame.exc = get_current_thread_exception();
-                                    goto check_exception;
-                                    /*
+
                                     if (frame.exc != 0) {
                                         frame.locked_monitors = new_ml->next;
+
                                         new_ml->next = frame.free_monitors;
                                         frame.free_monitors = new_ml;
                                         goto got_exception;
                                     }
-                                    */
                                 }
                                 break;
             case OPCODE_MONITOREXIT: