Closed Bug 893368 Opened 7 years ago Closed 7 years ago

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

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: jruderman, Assigned: bbouvier)

References

(Blocks 1 open bug)

Details

(Keywords: regression, testcase)

Attachments

(1 file)

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.
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+
https://hg.mozilla.org/mozilla-central/rev/21154eef33ac
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Depends on: 894781
You need to log in before you can comment on or make changes to this bug.