This will require a data structure that doesn't use FastMalloc to record CodeBlocks during the stack scan. We already have something along these lines: MarkStackArray. It assumes it's only storing JSCells, but we could generalize it to serve more than one purpose.
Created attachment 223194 [details] Patch
<rdar://problem/15980362>
Comment on attachment 223194 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=223194&action=review r=me > Source/JavaScriptCore/heap/GCSegmentedArray.h:137 > + if (!m_currentSegment) > + return *this; This should be an ASSERT. It's undefined behavior to ++ past the end of an iterator.
Committed r163450: <http://trac.webkit.org/changeset/163450>