Bug 128544

Summary: REGRESSION(r163660-r163664): js/dom/stack-trace.html fails
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: ggaren, mark.lam, webkit-bug-importer
Priority: P1 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
fixed the test to be more resilient to stack usage changes.
mark.lam: review-
patch 2. ap: review+

Comment 1 Alexey Proskuryakov 2014-02-10 10:46:20 PST
Updated TestExpectations in <http://trac.webkit.org/r163798>.
Comment 2 Radar WebKit Bug Importer 2014-02-10 11:41:59 PST
<rdar://problem/16027877>
Comment 3 Mark Lam 2014-02-10 13:03:08 PST
Note: this test does not fail for release builds.

The reason is because the issue lies in the debug build using a different amount of stack than a release build.  As a result, it encounters a stack overflow error at a different place.  I'll have to think about how we can make the test resilient to this kind of difference in stack usage rate.
Comment 4 Geoffrey Garen 2014-02-10 14:13:14 PST
I would change the test just to dump the top portion of the backtrace.
Comment 5 Mark Lam 2014-02-10 14:18:28 PST
(In reply to comment #4)
> I would change the test just to dump the top portion of the backtrace.

It already does.  However, the recursive parts (repeated in the stack trace) are:

    eval at [native code]                            <== Release build overflows here.
    selfRecursive3 at stack-trace.js:72:9
    at eval code                                        <== Debug build overflows here.

To fix this, I’m adding some facility to the test to check for a recursive pattern in the top part of the stack trace.  The test will pass the above if the top of the stack trace shows a repeated pattern that is expected no matter which line of the repeated pattern that the stack trace ends in.
Comment 6 Mark Lam 2014-02-10 15:38:22 PST
Created attachment 223754 [details]
fixed the test to be more resilient to stack usage changes.
Comment 7 Mark Lam 2014-02-10 15:39:24 PST
Comment on attachment 223754 [details]
fixed the test to be more resilient to stack usage changes.

need to fix a tab.
Comment 8 Mark Lam 2014-02-10 15:41:52 PST
Created attachment 223756 [details]
patch 2.
Comment 9 Mark Lam 2014-02-10 15:51:11 PST
Thanks for the review.  Landed in r163829: <http://trac.webkit.org/r163829>.