Closed Bug 643913 Opened 9 years ago Closed 9 years ago

TI+JM: incorrect result for testcase involving eval, neg

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Unassigned)

References

(Blocks 1 open bug)

Details

--
function f() {
    var x;
    eval("x = 3.14");
    x = 123;
    var y = -(-x);
    assertEq(y, 123);
}
f();
--
Fails with -m -a -n (works with -m -a):
test.js:6: Error: Assertion failed: got NaN, expected 123
In JSOP_NEG, if the popped value has unknown type tag but the result is a known double, we could end up constructing an integer and storing it in the double slot.

http://hg.mozilla.org/projects/jaegermonkey/rev/496bd6239fb8
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.