Last Comment Bug 722598 - Crash [@ js::mjit::JITScript::destroyChunk] or "Assertion failure: i < nchunks,"
: Crash [@ js::mjit::JITScript::destroyChunk] or "Assertion failure: i < nchunks,"
Status: RESOLVED FIXED
js-triage-needed
: assertion, crash, regression, testcase
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 Windows 7
: -- critical (vote)
: mozilla13
Assigned To: Brian Hackett (:bhackett)
:
Mentors:
Depends on:
Blocks: jsfunfuzz 706914
  Show dependency treegraph
 
Reported: 2012-01-30 18:42 PST by Gary Kwong [:gkw] [:nth10sd]
Modified: 2012-03-15 17:09 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
stacks (12.97 KB, text/plain)
2012-01-30 18:42 PST, Gary Kwong [:gkw] [:nth10sd]
no flags Details
patch (667 bytes, patch)
2012-02-06 12:10 PST, Brian Hackett (:bhackett)
dvander: review+
Details | Diff | Review

Description Gary Kwong [:gkw] [:nth10sd] 2012-01-30 18:42:22 PST
Created attachment 592952 [details]
stacks

The testcase to be attached asserts js debug shell on m-c changeset 7cdb5f5d38c6 with -m and -n at Assertion failure: i < nchunks, and crashes js opt shell at js::mjit::JITScript::destroyChunk

s-s because JIT crashes seem scary.
Comment 2 Gary Kwong [:gkw] [:nth10sd] 2012-01-30 18:52:41 PST
This *might* have been caused by the chunk patch in bug 706914.
Comment 3 Gary Kwong [:gkw] [:nth10sd] 2012-02-06 00:10:16 PST
A small testcase, js opt shell 32-bit, m-c changeset feb866aec8d8, with -m, -a, -n :

function whatToTestSpidermonkeyTrunk(code) {
    return {
        e: true,
        g: true & !code.match(/l/) && !(code.match(/=/) && "" != 1) && code.match(/f/) && (e || e.f("") == -1),
        y: true & code.i && f("") == -1
    }
}
whatToTest = whatToTestSpidermonkeyTrunk
function tryItOut(code) {
    if (count == 0) {
        gc()
    }
    whatToTest(code)
    try {
        Function(code)()
    } catch (e) {}
}
count = 0
tryItOut("mjitChunkLimit(13)")
count = tryItOut("")
tryItOut("mjitChunkLimit(72)")
tryItOut("")
tryItOut("")
tryItOut("l")
tryItOut("f")
Comment 4 Brian Hackett (:bhackett) 2012-02-06 12:10:58 PST
Created attachment 594769 [details] [diff] [review]
patch

Problem with the mjitChunkLimit shell function (so not security-sensitive).  Changing the chunk limit changes the chunk structure of a script which can invalidate invalidation constraints.
Comment 5 Brian Hackett (:bhackett) 2012-02-12 12:19:42 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/65872ea859eb
Comment 6 Marco Bonardo [::mak] 2012-02-13 08:50:00 PST
https://hg.mozilla.org/mozilla-central/rev/65872ea859eb

Note You need to log in before you can comment on or make changes to this bug.