Changeset 199496 in webkit
- Timestamp:
- Apr 13, 2016 9:10:13 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r199459 r199496 1 2016-04-13 Mark Lam <mark.lam@apple.com> 2 3 ShadowChicken::visitChildren() should not visit tailMarkers and throwMarkers. 4 https://bugs.webkit.org/show_bug.cgi?id=156532 5 6 Reviewed by Saam Barati and Filip Pizlo. 7 8 ShadowChicken can store tailMarkers and throwMarkers in its log, specifically in 9 the callee field of a log packet. However, ShadowChicken::visitChildren() 10 unconditionally visits the callee field of each packet as if they are real 11 objects. If visitChildren() encounters one of these markers in the log, we get a 12 crash. 13 14 This crash was observed in the v8-v6/v8-regexp.js stress test running with shadow 15 chicken when r199393 landed. r199393 introduced tail calls to a RegExp split 16 fast path, and the v8-regexp.js test exercised this fast path a lot. Throw in 17 some timely GCs, and we get a crash party. 18 19 The fix is to have ShadowChicken::visitChildren() filter out the tailMarker and 20 throwMarker. 21 22 Alternatively, if perf is an issue, we can allocate 2 dedicated objects for 23 these markers so that ShadowChicken can continue to visit them. For now, I'm 24 going with the filter. 25 26 * interpreter/ShadowChicken.cpp: 27 (JSC::ShadowChicken::visitChildren): 28 1 29 2016-04-13 Yusuke Suzuki <utatane.tea@gmail.com> 2 30 -
trunk/Source/JavaScriptCore/interpreter/ShadowChicken.cpp
r199076 r199496 355 355 void ShadowChicken::visitChildren(SlotVisitor& visitor) 356 356 { 357 for (unsigned i = m_logCursor - m_log; i--;) 358 visitor.appendUnbarrieredReadOnlyPointer(m_log[i].callee); 357 for (unsigned i = m_logCursor - m_log; i--;) { 358 JSObject* callee = m_log[i].callee; 359 if (callee != Packet::tailMarker() && callee != Packet::throwMarker()) 360 visitor.appendUnbarrieredReadOnlyPointer(callee); 361 } 359 362 360 363 for (Frame& frame : m_stack)
Note: See TracChangeset
for help on using the changeset viewer.