Revision: 11217
Author:   [email protected]
Date:     Tue Apr  3 03:15:12 2012
Log:      Fix race condition in test-thread-termination.

The test case failed to stop the preemption thread before destroying the
isolate which led to a race condition where the isolate was accessed
after it had been destroyed.

[email protected]
BUG=v8:2049
TEST=cctest/test-thread-termination/TerminateMultipleV8ThreadsDefaultIsolate

Review URL: https://chromiumcodereview.appspot.com/9969092
http://code.google.com/p/v8/source/detail?r=11217

Modified:
 /branches/bleeding_edge/test/cctest/test-thread-termination.cc

=======================================
--- /branches/bleeding_edge/test/cctest/test-thread-termination.cc Fri Jun 10 02:54:04 2011 +++ /branches/bleeding_edge/test/cctest/test-thread-termination.cc Tue Apr 3 03:15:12 2012
@@ -255,6 +255,10 @@
     threads[i]->Join();
     delete threads[i];
   }
+  {
+    v8::Locker locker;
+    v8::Locker::StopPreemption();
+  }

   delete semaphore;
   semaphore = NULL;

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to