Closed Bug 605874 Opened 14 years ago Closed 14 years ago

10k demo: Too much recursion with Firefox 4, run well in Firefox 3.6

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 584603
Tracking Status
blocking2.0 --- final+

People

(Reporter: paul, Unassigned)

References

()

Details

http://10k.aneventapart.com/Uploads/320/

This demo runs well with fx 3.6.
With fx 4, nothing is drawn, firefox freezes, and this exception is raised several time:

  Error: too much recursion
  Source File: http://10k.aneventapart.com/Uploads/320/
  Line: 18
Might be bug 584603.  Does disabling methodjit help?

The relevant part of the code looks like this:


function h2r(h, s, l) {
    var r, g, b;
    if (s == 0) {
        r = g = b = l;
    } else {
        function h2r(p, q, t) {
...
        }

        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
        var p = 2 * l - q;
        r = h2r(p, q, h + 1 / 3);
        g = h2r(p, q, h);
        b = h2r(p, q, h - 1 / 3);

note the nested function statement rebinding the name of the existing function....
Depends on: 584603
Seems like this should block final.
blocking2.0: --- → ?
blocking2.0: ? → final+
This repros turning off all the jits.  Renaming the inner h2r to something that doesn't collide with the outer h2r runs the demo nicely, so this is indeed a dup.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
> This repros turning off all the jits.

But bug 584603 only appears with methodjit enabled, no?

I really think we should leave this open until that bug is fixed, then retest...
The shell test case I posted in bug 584603 comment 5 repros with all jitflags and is directly derived from the source in comment 1.
You need to log in before you can comment on or make changes to this bug.