Reviewers: Sven Panne,
Description:
Prevent race between GC and interrupts from other threads.
[email protected]
BUG=328804
LOG=N
Please review this at https://codereview.chromium.org/157393002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+7, -1 lines):
M src/heap.cc
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index
e0b312067fc5c38013c36d76da9f69beae64c4a4..a40d5f18ff609942d6ee5999ce9eb19340426121
100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -6081,7 +6081,13 @@ void Heap::IterateWeakRoots(ObjectVisitor* v,
VisitMode mode) {
void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) {
- v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]);
+ { // Avoid race with interrupts that set the stack limit on the root
list.
+ // Note that GC does not actually care about the value of the stack
limit
+ // as long as it is a smi. We may want to revisit this if this causes
+ // performance regressions by blocking the optimizing compiler thread.
+ ExecutionAccess access(isolate());
+ v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]);
+ }
v->Synchronize(VisitorSynchronization::kStrongRootList);
v->VisitPointer(BitCast<Object**>(&hidden_string_));
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.