Closed Bug 582268 Opened 14 years ago Closed 14 years ago

JM: "Assertion failure: !fe->data.isConstant(),"

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: gkw, Assigned: dmandelin)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(1 file)

7%s

asserts js debug shell on JM changeset e0988eae6c08 with -m at Assertion failure: !fe->data.isConstant(), at ../methodjit/FrameState-inl.h:403
Reproduces on moo tip only on 32-bit (with and without ICs).
This is the same assert signature as bug 582144, so it might be the same bug. Taking.
Assignee: general → dmandelin
Status: NEW → ASSIGNED
Attached patch PatchSplinter Review
Cause was the same as most assertions of non-constness: there wasn't quite enough specialization for a constant lhs in the mod operator.
Attachment #460655 - Flags: review?(dvander)
Comment on attachment 460655 [details] [diff] [review]
Patch

>+    if (lhs->isConstant() && lhs->getValue().isInt32())
>+        lhsMaybeNeg = lhsIsNeg = (lhs->getValue().toInt32() < 0);

Nit: I think if lhs->isConstant() the second condition is guaranteed true.

> 
>-    /* :TODO: This is wrong, must load into EDX as well. */
>+    MaybeJump done;
>+    if (lhsMaybeNeg) {
>+        Jump negZero1 = masm.branchTest32(Assembler::NonZero, X86Registers::edx);
>+        MaybeJump negZero2;
>+        if (!lhsIsNeg) {
>+            RegisterID lhsData = frame.tempRegForData(lhs);
>+            negZero2 = masm.branchTest32(Assembler::Zero, lhsData, Imm32(0x80000000));
>+        }
>+        /* Darn, negative 0. */
>+        masm.storeValue(DoubleValue(-0.0), frame.addressOf(lhs));

tempRegForData can cause a spill here, so it must be hoisted to the top of the |lhsMaybeNeg| block.
Attachment #460655 - Flags: review?(dvander) → review+
http://hg.mozilla.org/projects/jaegermonkey/rev/57abe59a01db
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Automatically extracted testcase for this bug was committed:

https://hg.mozilla.org/mozilla-central/rev/efaf8960a929
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: