Bug 19956 - Strange relation between script loading and call stack size
Summary: Strange relation between script loading and call stack size
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2008-07-09 07:20 PDT by Fabian Jakobs
Modified: 2008-07-10 06:25 PDT (History)
4 users (show)

See Also:


Attachments
Testcase (1.35 KB, text/html)
2008-07-09 07:21 PDT, Fabian Jakobs
no flags Details
JavaScript file needed for the test (7.88 KB, text/plain)
2008-07-09 07:21 PDT, Fabian Jakobs
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Jakobs 2008-07-09 07:20:18 PDT
I have a very strange problem with Safari 3.1.2 and WebKit nightly. We
use a loader script, which inserts script tags dynamically into the
header. Now I observe the strange behavior that doing so seems to limit
the available call stack size. We load many scripts (> 300) in a loop
this way and run into an call stack size exceeded error.

I have reduced the problem to the attached HTML, where you can see the
effect. Still I have problems interpreting the results. Safari 3.1.2
shows me a decrease of the available call stack size, while it does not
really work in the Nightly. What is happening inside of Safari there?
Comment 1 Fabian Jakobs 2008-07-09 07:21:01 PDT
Created attachment 22172 [details]
Testcase
Comment 2 Fabian Jakobs 2008-07-09 07:21:53 PDT
Created attachment 22173 [details]
JavaScript file needed for the test
Comment 3 Sebastian Werner 2008-07-09 10:03:21 PDT
Just tested your example. It starts with 498 here and ends with 308. Goes down with four in each iteration.

MacBook 2Ghz, 2GB
Mac OS X 10.5.4
Safari 3.1.2
Comment 4 Sebastian Werner 2008-07-09 10:11:49 PDT
Webkit rev 35067 dies with a stack overflow after the insertion of the second(!) script.

Firefox 3 reports 2998 on every message. No decreasing detectable.
Comment 5 David Kilzer (:ddkilzer) 2008-07-10 06:25:04 PDT
<rdar://problem/6066033>