Closed Bug 511837 Opened 15 years ago Closed 15 years ago

TM: Crash [@ nanojit::Assembler::freeRsrcOf] or "Assertion failed: p->isQuad() (../nanojit/Nativei386.cpp:1325)" or "Assertion failure: s0->isQuad(), at ../jstracer.cpp" or "Assertion failure: m != TT_INT32 || isInt32(*vp), at ../jstracer.cpp" with Math

Categories

(Core :: JavaScript Engine, defect, P1)

x86
macOS
defect

Tracking

()

VERIFIED FIXED
Tracking Status
status1.9.2 --- beta1-fixed

People

(Reporter: gkw, Assigned: gal)

References

Details

(5 keywords, Whiteboard: fixed-in-tracemonkey)

Crash Data

Attachments

(1 file)

for each(l in ['', 0, 0, ]) {
    print(Math.round(false))
}

asserts js debug shell with -j at Assertion failure: s0->isQuad(), at ../jstracer.cpp:1337

autoBisect shows this is probably related to bug 511307:

The first bad revision is:
changeset:   31632:ccf91ba2d62a
user:        Andreas Gal
date:        Wed Aug 19 15:31:10 2009 -0700
summary:     Specialize math functions to integer arithmetic where appropriate (511307, r=dvander).
Flags: blocking1.9.2?
for (x = 0; x < 3; ++x) {
  a = Math.floor('')
}

crashes js opt shell with -j at nanojit::Assembler::freeRsrcOf at null and asserts js debug shell with -j at Assertion failed: p->isQuad() (../nanojit/Nativei386.cpp:1325)

autoBisect also points fingers at bug 511307.
Summary: TM: "Assertion failure: s0->isQuad(), at ../jstracer.cpp" with Math → TM: Crash [@ nanojit::Assembler::freeRsrcOf] or "Assertion failed: p->isQuad() (../nanojit/Nativei386.cpp:1325)" or "Assertion failure: s0->isQuad(), at ../jstracer.cpp" with Math
options().n;
(function () {
    Math
})()
for (let x in [0, 0]) {
    ''.replace((Math.min(3, /x/)))
}

asserts js debug shell with -j at Assertion failure: m != TT_INT32 || isInt32(*vp), at ../jstracer.cpp:3206, autoBisect fingering out bug 511307 too.
Keywords: crash
Summary: TM: Crash [@ nanojit::Assembler::freeRsrcOf] or "Assertion failed: p->isQuad() (../nanojit/Nativei386.cpp:1325)" or "Assertion failure: s0->isQuad(), at ../jstracer.cpp" with Math → TM: Crash [@ nanojit::Assembler::freeRsrcOf] or "Assertion failed: p->isQuad() (../nanojit/Nativei386.cpp:1325)" or "Assertion failure: s0->isQuad(), at ../jstracer.cpp" or "Assertion failure: m != TT_INT32 || isInt32(*vp), at ../jstracer.cpp" with Math
(In reply to comment #1)
> for (x = 0; x < 3; ++x) {
>   a = Math.floor('')
> }
> 
> crashes js opt shell with -j at nanojit::Assembler::freeRsrcOf at null and
> asserts js debug shell with -j at Assertion failed: p->isQuad()
> (../nanojit/Nativei386.cpp:1325)
> 
> autoBisect also points fingers at bug 511307.

Now this morphed to asserting only at Assertion failure: s0->isQuad(), at ../jstracer.cpp:1337. That said, I still see nanojit::Assembler::freeRsrcOf js opt null deref crashes, I'll need to wait for a reduced testcase first.
Assignee: general → gal
Confirmed on TM tip. Good test case.
Attached patch patchSplinter Review
Attachment #396798 - Flags: review?(dvander)
Attachment #396798 - Flags: review?(dvander) → review+
http://hg.mozilla.org/tracemonkey/rev/d4faaf65fefb
Whiteboard: fixed-in-tracemonkey
Status: NEW → ASSIGNED
Flags: blocking1.9.2? → blocking1.9.2+
http://hg.mozilla.org/mozilla-central/rev/d4faaf65fefb
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Priority: -- → P1
js/src/trace-test/tests/basic/testIntFloor.js
Flags: in-testsuite+
v 1.9.3, 1.9.2
Status: RESOLVED → VERIFIED
Keywords: verified1.9.2
Crash Signature: [@ nanojit::Assembler::freeRsrcOf]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: