Bug 156532 - ShadowChicken::visitChildren() should not visit tailMarkers and throwMarkers.
Summary: ShadowChicken::visitChildren() should not visit tailMarkers and throwMarkers.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-04-13 00:00 PDT by Mark Lam
Modified: 2016-04-14 11:04 PDT (History)
7 users (show)

See Also:


Attachments
proposed patch. (2.49 KB, patch)
2016-04-13 00:06 PDT, Mark Lam
saam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2016-04-13 00:00:44 PDT
ShadowChicken can store tailMarkers and throwMarkers in its log, specifically in the callee field of a log packet.  However, ShadowChicken::visitChildren() unconditionally visits the callee field of each packet as if they are real objects.  If visitChildren() encounters one of these markers in the log, we get a crash.

This crash was observed in the v8-v6/v8-regexp.js stress test running with shadow chicken when r199393 landed.  r199393 introduced tail calls to a RegExp split fast path, and the v8-regexp.js test exercised this fast path a lot.  Throw in some timely GCs, and we get a crash party.

The fix is to have ShadowChicken::visitChildren() filter out the tailMarker and throwMarker.

Alternatively, if perf is an issue, we can allocate 2 dedicated objects for these markers so that ShadowChicken can continue to visit them.  For now, I'm going with the filter.
Comment 1 Mark Lam 2016-04-13 00:06:09 PDT
Created attachment 276308 [details]
proposed patch.
Comment 2 Filip Pizlo 2016-04-13 07:22:02 PDT
R=me too
Comment 3 Mark Lam 2016-04-13 09:10:48 PDT
Thanks for the review.  Landed in r199496: <http://trac.webkit.org/r199496>.
Comment 4 Mark Lam 2016-04-14 11:04:56 PDT
<rdar://problem/25630551>