Closed Bug 470223 Opened 17 years ago Closed 17 years ago

TM: Crash when typing in location bar, jit.chrome=true @ js_NewObjectWithGivenProto

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla1.9.1b3

People

(Reporter: Mardak, Unassigned)

References

()

Details

(4 keywords, Whiteboard: fixed by bug 470300)

Attachments

(2 files)

Stack looks like.. 0 js_NewObjectWithGivenProto 1 js_NewObject 2 js_NewArrayObject 3 array_slice 4 js_Interpret 5 js_Invoke 6 js_InternalInvoke 7 JS_CallFunctionValue So perhaps it's not |let| scope causing problems but now that we trace it, we run into an issue with something else?
The only thing with a "let (block) expression;" in the location bar is.. regions = regions.sort(function(a, b) let (start = a[0] - b[0]) start == 0 ? a[1] - b[1] : start); http://hg.mozilla.org/mozilla-central/file/d2c8c9456549/toolkit/content/widgets/autocomplete.xml#l1279 But if it can be any plain let declaration, there are many. So assuming it's slice causing the problem, there should be only one: return boundaries.slice(1); http://hg.mozilla.org/mozilla-central/file/d2c8c9456549/toolkit/content/widgets/autocomplete.xml#l1313
Severity: normal → critical
Flags: blocking1.9.1?
Here's the function pulled out of autocomplete.xml, but I'm not 100% sure it's the thing that's actually causing the crash. But it is causing wierdness.. When running OPT builds, the third iteration (5th call to _getBoundaryIndices) seems to result in either.. TypeError: Math is null TypeError: Math.max is not a function TypeError: print is not a function ./Darwin_OPT.OBJ/js -j getBoundary.js 0,11,12,23 1,16,17,26,27,41 0,11,12,23 1,16,17,26,27,41 TypeError: print is not a function debug builds show.. ./Darwin_DBG.OBJ/js -j getBoundary.js 0,11,12,23 1,16,17,26,27,41 Assertion failure: StackBase(fp) + blockDepth == regs.sp, at jsinterp.cpp:6834 Trace/BPT trap
Attached file reduced testcase
I haven't been able to reduce this any more.. but the first call results in R being [0], while the second call results in R being [0,1]. Running it results in.. Assertion failure: blockDepth <= StackDepth(script), at jsinterp.cpp:6809 Trace/BPT trap
Blocks: 453668
Summary: Crash when typing in location bar, jit.chrome=true @ js_NewObjectWithGivenProto → TM: Crash when typing in location bar, jit.chrome=true @ js_NewObjectWithGivenProto
Somewhat smaller, but basically the same as attachment 353689 [details] function F(A) { for (R = [], s = 0; (m = A.indexOf("m", s++)) >= 0; ) R.push([m]); for (i = R.length; i--; ) { let r = R[i]; if (r[0]); } } F("m"); F("mm"); To cause problems.. 1) |F| must be called with 2 different values 2) |R.push([m])| needs to push |m| (and not a constant) 2.1) R.push([A.indexOf(...]) doesn't trigger the problem 3) |r| needs to be declared with |let| 4) |if (r[0])| needs to be there (but could be !r[0]) Not sure if indexOf is required.. but I tried replacing the first loop with a plain loop that pushes 0, 1. Or passing in [0], [0,1] for A and have it push/copy that into R. Those didn't work.
I get this crash too on Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20081218 Minefield/3.2a1pre ID:20081218035829 some bp : bp-a3b001df-03b7-428e-9a5f-774d42081218, bp-5545c232-5bbc-4c87-bd49-852e52081218
Normally you would just go to about:config and switch jit.chrome to false, but that's kinda hard to do if typing in the location bar crashes the browser ;) Workaround: 1) Open Preferences -> Privacy -> History -> Suggest: "Nothing" 2) about:config into the location bar 3) Search for "jit" and double click javascript.options.jit.chrome to false 4) Reset Preferences -> Privacy -> History -> Suggest: "History & Bookmarks"
Whiteboard: workaround in comment #6
Thanks I already did :) But it's a good idea to put the workaround in the bug.
Flags: blocking1.9.1? → blocking1.9.1+
copy/pasting about:config into the location bar works as well (except if this still leaves more than one possibility?)
I bet the fix will show up in bug 470300. /be
Depends on: 470300
The reduced testcase from comment #4 doesn't assert anymore, so the location bar crash should be gone.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: workaround in comment #6 → fixed by bug 470300
Target Milestone: --- → mozilla1.9.1b3
Verified fixed on Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20081219 Minefield/3.2a1pre ID:20081219034805
Status: RESOLVED → VERIFIED
WFM on 1.9.1 tip, fixed1.9.1 per bug 470300 comment 8.
Keywords: fixed1.9.1
Keywords: testcase
http://hg.mozilla.org/mozilla-central/rev/1f9f85340743 /cvsroot/mozilla/js/tests/js1_7/regress/regress-470223.js,v <-- regress-470223.js initial revision: 1.1
Flags: in-testsuite+
Flags: in-litmus-
v 1.9.1, 1.9.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: