Changeset 226010 in webkit
- Timestamp:
- Dec 17, 2017 2:53:51 AM (6 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r226000 r226010 1 2017-12-16 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 [JSC] Number of SlotVisitors can increase after setting up m_visitCounters 4 https://bugs.webkit.org/show_bug.cgi?id=180906 5 6 Reviewed by Filip Pizlo. 7 8 The number of SlotVisitors can increase after setting up m_visitCounters. 9 If it happens, our m_visitCounters misses the visit count of newly added 10 SlotVisitors. It accidentally decides that constraints are converged. 11 This leads to random assertion hits in Linux environment. 12 13 In this patch, we compare the number of SlotVisitors in didVisitSomething(). 14 If the number of SlotVisitors is changed, we conservatively say we did 15 visit something. 16 17 * heap/Heap.h: 18 * heap/HeapInlines.h: 19 (JSC::Heap::numberOfSlotVisitors): 20 * heap/MarkingConstraintSet.h: 21 * heap/MarkingConstraintSolver.cpp: 22 (JSC::MarkingConstraintSolver::didVisitSomething const): 23 1 24 2017-12-16 Keith Miller <keith_miller@apple.com> 2 25 -
trunk/Source/JavaScriptCore/heap/Heap.h
r225831 r226010 373 373 template<typename Func> 374 374 void forEachSlotVisitor(const Func&); 375 unsigned numberOfSlotVisitors(); 375 376 376 377 private: -
trunk/Source/JavaScriptCore/heap/HeapInlines.h
r225524 r226010 270 270 } 271 271 272 inline unsigned Heap::numberOfSlotVisitors() 273 { 274 auto locker = holdLock(m_parallelSlotVisitorLock); 275 return m_parallelSlotVisitors.size() + 2; // m_collectorSlotVisitor and m_mutatorSlotVisitor 276 } 277 272 278 } // namespace JSC -
trunk/Source/JavaScriptCore/heap/MarkingConstraintSet.h
r225524 r226010 68 68 bool executeConvergenceImpl(SlotVisitor&); 69 69 70 bool drain(SlotVisitor&, BitVector& unexecuted, BitVector& executed, bool& didVisitSomething);71 72 70 Heap& m_heap; 73 71 BitVector m_unexecutedRoots; -
trunk/Source/JavaScriptCore/heap/MarkingConstraintSolver.cpp
r225524 r226010 52 52 return true; 53 53 } 54 // If the number of SlotVisitors increases after creating m_visitCounters, 55 // we conservatively say there could be something visited by added SlotVisitors. 56 if (m_heap.numberOfSlotVisitors() > m_visitCounters.size()) 57 return true; 54 58 return false; 55 59 }
Note: See TracChangeset
for help on using the changeset viewer.