Closed
Bug 953289
Opened 11 years ago
Closed 11 years ago
Crash [@ JitActivationIterator] or Opt-Crash [@ markIfUnmarked]
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 980630
People
(Reporter: decoder, Unassigned)
References
Details
(Keywords: crash, sec-high, testcase, Whiteboard: [jsbugmon:])
Crash Data
Attachments
(3 files)
|
966 bytes,
text/plain
|
Details | |
|
1.66 KB,
patch
|
decoder
:
feedback-
|
Details | Diff | Splinter Review |
|
1.37 KB,
patch
|
Details | Diff | Splinter Review |
The following testcase crashes on mozilla-central revision 451f47a70238 (run with --fuzzing-safe):
function Foo() {
var y = 0;
for (var i = 0; i < 100; new ArrayBuffer(8192)) { y++ }
}
try {
for (var i = (1); i < 100; i++) {
var x = new Foo();
}
} catch(exc1) {}
const BUF_64KB = new ArrayBuffer(64 * 1024);
| Reporter | ||
Comment 1•11 years ago
|
||
Updated•11 years ago
|
Whiteboard: [jsbugmon:update,bisect]
| Reporter | ||
Updated•11 years ago
|
Whiteboard: [jsbugmon:update,bisect] → [jsbugmon:update]
| Reporter | ||
Comment 2•11 years ago
|
||
JSBugMon: Bisection requested, failed due to error (try manually).
Comment 3•11 years ago
|
||
autoBisect shows this is probably related to the following changeset:
The first bad revision is:
changeset: http://hg.mozilla.org/mozilla-central/rev/9c90bda44992
user: Brian Hackett
date: Thu Aug 15 07:33:30 2013 -0700
summary: Bug 864220 - Use mprotect to trigger interrupts in Ion compiled code, r=luke,jandem.
Brian, is bug 864220 a possible regressor?
Blocks: 864220
Flags: needinfo?(bhackett1024)
Updated•11 years ago
|
Crash Signature: [@ JitActivationIterator] or Opt-Crash [@ markIfUnmarked] → [@ JitActivationIterator]
[@ markIfUnmarked]
Comment 4•11 years ago
|
||
Since bhackett is on vacation, do you think the regression in comment 3 is right, jandem? Thanks.
Setting to sec-high because of the opt crashes on a non-zero value.
Flags: needinfo?(bhackett1024)
Keywords: sec-high
Comment 5•11 years ago
|
||
I wasn't able to reproduce a crash on debug or opt 32-bit linux shells on cset 5163bf6b21b2. This seems oom-related. Are you running the test on 32 or 64-bit hardware?
Comment 6•11 years ago
|
||
On OS X, malloc is printing messages to stderr. I agree with Luke that this is likely OOM. decoder, you've been fixing OOM bugs lately, would it be possible to get a stack trace of the allocation that fails?
| Reporter | ||
Comment 7•11 years ago
|
||
I'm running 32-bit non-threadsafe builds for this. Here is the last allocation that fails (m-c rev 80a27198344a):
Breakpoint 1, js_ReportOutOfMemory (cxArg=0x92d2e68) at js/src/jscntxt.cpp:356
356 js_ReportOutOfMemory(ThreadSafeContext *cxArg)
#0 js_ReportOutOfMemory (cxArg=0x92d2e68) at js/src/jscntxt.cpp:356
#1 0x0858e1a6 in AllocateArrayBufferContents (maybecx=<optimized out>, nbytes=8192, oldptr=0x0) at js/src/vm/TypedArrayObject.cpp:253
#2 0x08597029 in js::ArrayBufferObject::allocateSlots (this=0xfe37b160, maybecx=0x92d2e68, bytes=8192, clear=true) at js/src/vm/TypedArrayObject.cpp:276
#3 0x085e8e2d in js::ArrayBufferObject::create (cx=0x92d2e68, nbytes=8192, clear=true) at js/src/vm/TypedArrayObject.cpp:648
#4 0x085ed6a4 in js::ArrayBufferObject::class_constructor (cx=0x92d2e68, argc=1, vp=0xffffbf94) at js/src/vm/TypedArrayObject.cpp:220
#5 0xf7b11733 in ?? ()
I went through that call stack, and the OOM is propagated as expected, up to and including [@ js::ArrayBufferObject::class_constructor]. From there, it's JIT code calling as it seems. Is the JIT code maybe not checking the return value here? I'm curious how to figure out what's wrong in this case (as I try to learn more about fixing OOM errors).
Flags: needinfo?(jdemooij)
Comment 8•11 years ago
|
||
I can't reproduce this crash on OS X, but I did see something suspicious when I stepped through this in lldb. decoder, can you see if this helps? Probably not but worth a try.
Attachment #8359723 -
Flags: feedback?(choller)
Flags: needinfo?(jdemooij)
| Reporter | ||
Comment 9•11 years ago
|
||
Comment on attachment 8359723 [details] [diff] [review]
Patch
As discussed on IRC, unfortunately this doesn't fix it.
Attachment #8359723 -
Flags: feedback?(choller) → feedback-
Flags: needinfo?(jdemooij)
Updated•11 years ago
|
Group: javascript-core-security
Comment 10•11 years ago
|
||
This is a TI OOM problem. Brian, I added two comments that show where the problems are, can you take this from here?
Flags: needinfo?(jdemooij) → needinfo?(bhackett1024)
| Reporter | ||
Updated•11 years ago
|
Crash Signature: [@ JitActivationIterator]
[@ markIfUnmarked] → [@ JitActivationIterator]
[@ markIfUnmarked]
Whiteboard: [jsbugmon:update] → [jsbugmon:update,ignore]
| Reporter | ||
Comment 11•11 years ago
|
||
JSBugMon: The testcase found in this bug no longer reproduces (tried revision bd40e935d3b5).
| Reporter | ||
Updated•11 years ago
|
Crash Signature: [@ JitActivationIterator]
[@ markIfUnmarked] → [@ JitActivationIterator]
[@ markIfUnmarked]
Whiteboard: [jsbugmon:update,ignore] → [jsbugmon:bisectfix]
| Reporter | ||
Updated•11 years ago
|
Crash Signature: [@ JitActivationIterator]
[@ markIfUnmarked] → [@ JitActivationIterator]
[@ markIfUnmarked]
Whiteboard: [jsbugmon:bisectfix] → [jsbugmon:]
| Reporter | ||
Comment 12•11 years ago
|
||
JSBugMon: Fix Bisection requested, result:
autoBisect shows this is probably related to the following changeset:
The first good revision is:
changeset: http://hg.mozilla.org/mozilla-central/rev/357895a6aaac
user: Jon Coppeard
date: Wed Feb 05 14:09:41 2014 +0000
summary: Bug 965745 - Always patch loop backedges in Ion if interrupt flag is set r=jandem
This iteration took 364.238 seconds to run.
Comment 13•11 years ago
|
||
This should be fixed by bug 980630, though on this path we'll just MOZ_CRASH().
Crash Signature: [@ JitActivationIterator]
[@ markIfUnmarked] → [@ JitActivationIterator]
[@ markIfUnmarked]
Flags: needinfo?(bhackett1024)
| Reporter | ||
Comment 14•11 years ago
|
||
Can we avoid to MOZ_CRASH() due to OOM without outputting a proper message before that? In GGC, there are a few places where OOM cannot be handled, and we output an OOM assertion message before the crash. That way, it's easier for automation, like fuzzing, to distinguish these conditions from others.
Flags: needinfo?(bhackett1024)
Comment 15•11 years ago
|
||
Sure, but can you add that comment to bug 980630? It's kind of dumb if MOZ_CRASH() doesn't print anything before crashing.
Flags: needinfo?(bhackett1024)
Comment 16•11 years ago
|
||
Duping per comment 13.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Updated•11 years ago
|
Group: core-security, javascript-core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•