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/04/24 17:14:42 UTC

svn commit: r531975 - in /harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread: mon_enter_exit.cpp thread_manager.cpp

Author: gshimansky
Date: Tue Apr 24 08:14:41 2007
New Revision: 531975

URL: http://svn.apache.org/viewvc?view=rev&rev=531975
Log:
Applied patch which fixes interpreter crash in HARMONY-2081: [drlvm] Synthetic test with monexit without monenter before passed on RI but failed on DRLVM

The bug itself is not fixed because one of the tests fail on interpreter


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_manager.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp?view=diff&rev=531975&r1=531974&r2=531975
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/mon_enter_exit.cpp Tue Apr 24 08:14:41 2007
@@ -129,7 +129,10 @@
     assert(p_obj);
     jobject jobj = oh_allocate_local_handle();
     jobj->object = p_obj;
+    hythread_suspend_enable();
+    // the function crashes during exception throwing if called in hythread_disabled state
     jthread_monitor_exit(jobj);
+    hythread_suspend_disable();
 }
 
 static uint32 vm_monitor_try_enter_default(ManagedObject *p_obj) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_manager.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_manager.cpp?view=diff&rev=531975&r1=531974&r2=531975
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_manager.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_manager.cpp Tue Apr 24 08:14:41 2007
@@ -158,7 +158,9 @@
     if (interpreter_enabled()) {
         // FIXME - Function set_current_thread_exception does the same
         // actions as exn_raise_object, and it should be replaced.
+        hythread_suspend_disable();
         set_current_thread_exception(object->object);
+        hythread_suspend_enable();
     } else {
         if (is_unwindable()) {
             exn_throw_object(object);