Closed Bug 831087 Opened 12 years ago Closed 12 years ago

IonMonkey: Differential Testing: Getting different output w/without --ion-eager with /=

Categories

(Core :: JavaScript Engine, defect)

x86_64
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla21
Tracking Status
firefox18 --- unaffected
firefox19 --- unaffected
firefox20 --- fixed
firefox21 --- fixed
firefox-esr10 --- unaffected
firefox-esr17 --- unaffected
b2g18 --- unaffected

People

(Reporter: gkw, Assigned: h4writer)

References

Details

(Keywords: regression, testcase)

Attachments

(1 file, 2 obsolete files)

try { for (y = 0; y < 1; y++) { x = y; } } catch (e) {} function f() { (x /= -9) } f() print(uneval(this.x)) shows "-0" on js debug shell on m-c changeset 56ff556e74d9 without any CLI arguments but shows "0" with --ion-eager autoBisect shows this is probably related to the following changeset: The first bad revision is: changeset: 114758:92c4255955d2 user: Hannes Verschore date: Mon Dec 03 00:09:56 2012 +0100 summary: Bug 816787: Remove negative zero check for truncated uses, r=mjrosenb
Hannes, does bug 816787 seem like a likely regressor?
Flags: needinfo?(hv1989)
The actual culprit is bug 736135. This landed before ionmonkey landed in FF18, therefore making it possible to encounter FF18+. Bug 816787 only makes it easier to get this faulty behaviour.
Assignee: general → hv1989
Attachment #702725 - Flags: review?(mrosenberg)
Flags: needinfo?(hv1989)
Comment on attachment 702725 [details] [diff] [review] Negative zero can only get removed when rhs is positive Review of attachment 702725 [details] [diff] [review]: ----------------------------------------------------------------- Looks like I forgot to qref, before posting. ::: js/src/ion/MIR.cpp @@ +792,5 @@ > // negative overflow check can be skipped. > if (lhs()->isConstant() && !lhs()->toConstant()->value().isInt32(INT32_MIN)) > setCanBeNegativeZero(false); > > // If rhs is a constant int != -1, likewise. // If rhs is a positive constant, likewise @@ +793,5 @@ > if (lhs()->isConstant() && !lhs()->toConstant()->value().isInt32(INT32_MIN)) > setCanBeNegativeZero(false); > > // If rhs is a constant int != -1, likewise. > + if (rhs()->isConstant() && rhs()->toConstant()->value().toInt32() > 0) if (rhs()->isConstant() && rhs()->toConstant()->value().toInt32() >= 0)
Now the qref'ed patch with testcase. Sorry about the mess
Attachment #702725 - Attachment is obsolete: true
Attachment #702725 - Flags: review?(mrosenberg)
Attachment #702727 - Flags: review?(mrosenberg)
Thanks Jan for noticing this. But regression range was correct. In that bug I wrongly changed two "canBeNegativeOverflow" to "canBeNegativeZero" !
Attachment #702727 - Attachment is obsolete: true
Attachment #702727 - Flags: review?(mrosenberg)
Attachment #702750 - Flags: review?(mrosenberg)
Attachment #702750 - Flags: review?(mrosenberg) → review+
Hannes, once this lands in m-c, we can request for landing on aurora.
Status: NEW → ASSIGNED
Flags: needinfo?(hv1989)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Comment on attachment 702750 [details] [diff] [review] Use canBeNegativeOverflow [Approval Request Comment] Bug caused by (feature/regressing bug #): Bug 816787 User impact if declined: Wrongly reporting 0 instead of -0 for very very specific code running in IonMonkey. Testing completed (on m-c, etc.): m-c Risk to taking this patch (and alternatives if risky): I would say zero. This is two lines that are wrongly adjusted by bug 816787. This revert it to the original code. String or UUID changes made by this patch: /
Attachment #702750 - Flags: approval-mozilla-aurora?
Flags: needinfo?(hv1989)
Comment on attachment 702750 [details] [diff] [review] Use canBeNegativeOverflow low risk regression fix, approving for aurora.
Attachment #702750 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: