OdinMonkey: Incorrect result with (abs(INT_MIN) % 3)

RESOLVED FIXED in mozilla25

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Jesse Ruderman, Assigned: bbouvier)

Tracking

(Blocks: 2 bugs, {regression, testcase})

Trunk
mozilla25
x86
Mac OS X
regression, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
function m(stdlib)
{
  "use asm";
  var abs = stdlib.Math.abs;
  function f(p)
  {
    p = p|0;
    return ((abs(p|0)|0) % 3)|0;
  }
  return f;
}
var f = m(this);
assertEq(f(0x80000000), -2);

With asm enabled: got 2, expected -2

Like bug 892291 (recently fixed), this started when bug 864400 landed, but might be a pre-existing range analysis bug.
(Assignee)

Comment 1

5 years ago
Created attachment 775920 [details] [diff] [review]
proposed fix + test case

Easy fixes, easy fixes everywhere.
Assignee: general → bbouvier
Status: NEW → ASSIGNED
Attachment #775920 - Flags: review?(nicolas.b.pierron)
Attachment #775920 - Flags: review?(nicolas.b.pierron) → review+

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/21154eef33ac
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
(Reporter)

Updated

5 years ago
Depends on: 894781
You need to log in before you can comment on or make changes to this bug.