Closed
Bug 508146
Opened 15 years ago
Closed 15 years ago
TM: Fix stack arithmetic for deeply nested closures
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: dmandelin, Assigned: dmandelin)
Details
(Keywords: verified1.9.2, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
2.08 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
While reading code to fix another bug, I noticed that the stack navigation arithmetic GetUpvarOnTrace had not been updated for the inclusion of |arguments| in the native stack area (see bug 453730). It fails on this test case: function f(a, b) { function g(x, y) { function h(m, n) { function k(u, v) { for (var i = 0; i < 5; ++i) { print(a + ' ' + b + ' ' + x + ' ' + y + ' ' + m + ' ' + n + ' ' + u + ' ' + v); } } k(m+1, n+1); } h(x+1, y+1); } g(a+1, b+1); } for (var i = 0; i < 5; ++i) { f(i, i+i); } It's really only m and n that get the wrong value, but I figure testing more rigorously isn't bad. The solution is simply to adjust the formulas to account for the presence of |arguments| on the trace stack right after the arguments and before the local slots.
Attachment #392371 -
Flags: review?(gal)
Updated•15 years ago
|
Attachment #392371 -
Flags: review?(gal) → review+
Assignee | ||
Comment 1•15 years ago
|
||
Pushed to TM as 691a47bca2ae. Note that as of today, this doesn't affect release branch, as the patch that caused the problem (c76558a87dd9) hasn't been taken on branch.
Whiteboard: fixed-in-tracemonkey
Comment 2•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/691a47bca2ae
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Flags: blocking1.9.2+
Updated•15 years ago
|
Priority: -- → P1
Comment 3•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/6ca5523844b0
status1.9.2:
--- → beta1-fixed
Comment 5•15 years ago
|
||
testNestedClosures v 1.9.3, 1.9.2
Status: RESOLVED → VERIFIED
Keywords: verified1.9.2
You need to log in
before you can comment on or make changes to this bug.
Description
•