[Webkit-unassigned] [Bug 26276] Need a mechanism to determine stack extent

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 28 12:52:21 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=26276





--- Comment #3 from Xan Lopez <xan.lopez at gmail.com>  2010-08-28 12:52:21 PST ---
(In reply to comment #2)
> In the new parser I took a different approach and simply put a size limit by subtracting 512k (or something) from the first time we enter the parser on a given thread -- this assumes that the very first time we parse something we aren't already using too much stack space.  It also causes problems on platforms that have very low stack sizes :-/

(... after reading that code ...)

I see.

So I assume that even if it's less than perfect this is still better than the mechanisms used in, say, Interpreter.cpp?

BTW, just for fun I added an ASSERT in JSParser.cpp::canRecurse(), like


         char sample = 0;
         ASSERT(m_endAddress);
+        ASSERT(&sample > m_endAddress);
         return &sample > m_endAddress;

and, if I'm not messing up, it does not seem to be triggered even once running LayoutTests/fast/js or the JSC tests. Do we have any reasonable test for the stack overflow business? :)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list