harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r499839 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp
Date Thu, 25 Jan 2007 16:36:19 GMT
Author: gshimansky
Date: Thu Jan 25 08:36:18 2007
New Revision: 499839

URL: http://svn.apache.org/viewvc?view=rev&rev=499839
Log:
Applied HARMONY-2721 [drlvm][test] Add test in HARMONY-2083 to regression test stuite

It appears that there is a race condition in using class_report_failure because
it is called after Class is unlocked. So it is possible that 2 threads come
with different errors to calling cp.resolve_as_error. To avoid errors
duplication since it is necessary to use only the first error it is better
to check for existing error before calling cp.resolve_as_error.


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp?view=diff&rev=499839&r1=499838&r2=499839
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp Thu Jan 25 08:36:18
2007
@@ -114,9 +114,11 @@
 
     tmn_suspend_disable();
     target->lock();
-    // vvv - This should be atomic change
-    cp.resolve_as_error(cp_index, exn);
-    // ^^^
+    if (!cp.is_entry_in_error(cp_index)) {
+        // vvv - This should be atomic change
+        cp.resolve_as_error(cp_index, exn);
+        // ^^^
+    }
     target->unlock();
     tmn_suspend_enable();
 }



Mime
View raw message