Closed Bug 610652 Opened 12 years ago Closed 12 years ago

JM: overflow not handled for x - (-2147483648)

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- final+

People

(Reporter: jandem, Assigned: dvander)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

Test case:
---
function a1(a2) {
    return 10 - a2;
}
a3 = a1(-2147483648);
print(a3);
---
This should print a positive number (2147483658). 
In JM it prints -2147483638.
blocking2.0: --- → ?
Assignee: general → dvander
Status: NEW → ASSIGNED
blocking2.0: ? → final+
Attached patch fixSplinter Review
Nice catch, Jan. Just when I thought the arithmetic path was bug-free!
Attachment #490194 - Flags: review?(dmandelin)
Attachment #490194 - Flags: review?(dmandelin) → review+
http://hg.mozilla.org/mozilla-central/rev/95f3ef09d58e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.