Closed
Bug 621512
Opened 14 years ago
Closed 14 years ago
JM: jsop_length should use urshift32 instead of rshiftPtr
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: jandem, Assigned: jandem)
References
Details
(Keywords: regression, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
1.13 KB,
patch
|
sstangl
:
review+
|
Details | Diff | Splinter Review |
Consider this test case: --- function f() { var s1 = Array(15000).join('-'); var s2 = Array(9000).join(s1); s2 = "" + s2; assertEq(s2.length, 134976001); } f(); --- This fails in JM: test.js:6: Error: Assertion failed: got -133459455, expected 134976001 The problem is that mjit::Compiler::jsop_length uses rshiftPtr instead of urshift32.
Assignee | ||
Updated•14 years ago
|
Summary: JM: wrong result for jsop_length → JM: jsop_length should use urshift32 instead of rshiftPtr
Assignee | ||
Comment 1•14 years ago
|
||
This uses urshift32 like we do in generateStringLengthStub (PolyIC.cpp). I did not add the test case because it uses a lot of memory...
Attachment #499825 -
Flags: review?(sstangl)
Assignee | ||
Updated•14 years ago
|
Keywords: regression
Updated•14 years ago
|
blocking2.0: --- → betaN+
Comment 2•14 years ago
|
||
Comment on attachment 499825 [details] [diff] [review] Fix Great find.
Attachment #499825 -
Flags: review?(sstangl) → review+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 3•14 years ago
|
||
Anybody willing to land this patch? It's a one line change and really safe.
Comment 4•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/96482f2ef48e /be
Whiteboard: fixed-in-tracemonkey
Updated•14 years ago
|
Keywords: checkin-needed
Comment 5•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/96482f2ef48e
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•