Closed Bug 639459 Opened 14 years ago Closed 14 years ago

TI+JM: incorrect result for x / x

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

Details

(Whiteboard: fixed-in-jaegermonkey)

Attachments

(1 file)

-- function f() { var a = [].length; return a / a; } assertEq(f(), NaN); -- This fails with -m -n -a: Error: Assertion failed: got -2147483648, expected NaN The problem is that the same FP-register is used for lhs and rhs. To check whether the result of the division fits in an integer we use the rhs-register as temp reg and this fails. Patch in a minute.
Attached patch Patch (deleted) — Splinter Review
Allocates a temp register for the is-integer check. The tracker can handle FP-registers now so this also ensures we don't overwrite fpRight.
Attachment #517399 - Flags: review?(bhackett1024)
Attachment #517399 - Flags: review?(bhackett1024) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-jaegermonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: