Closed
Bug 1499471
Opened 7 years ago
Closed 7 years ago
Assertion failure: !JS_IsExceptionPending(cx_), at js/src/vm/JSContext.cpp:1687
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla64
| Tracking | Status | |
|---|---|---|
| firefox-esr60 | --- | unaffected |
| firefox62 | --- | unaffected |
| firefox63 | --- | unaffected |
| firefox64 | --- | fixed |
People
(Reporter: gkw, Assigned: iain)
References
Details
(4 keywords, Whiteboard: [jsbugmon:update])
Attachments
(4 files)
The following testcase crashes on mozilla-central revision 31724aea10ca (build with --enable-debug, run with --fuzzing-safe --no-threads --ion-eager):
(function() {
inputs = [];
f = (function(x) {
4294967297 ** (x >>> 0) * Math.fround(y);
});
if (f) {
for (var j = 0; j < 2; ++j) {
try {
f(inputs[0]);
} catch (e) {}
}
}
})();
Backtrace:
#0 0x000055cd7fa1b9d0 in js::AutoUnsafeCallWithABI::AutoUnsafeCallWithABI (this=0x7ffd3bccd240, strictness=js::NoExceptions) at js/src/vm/JSContext.cpp:1687
#1 0x000055cd7f295c7d in js::powi (y=0, x=<optimized out>) at js/src/jsmath.cpp:546
#2 js::ecmaPow (x=4294967297, y=-5.4861240687936887e+303) at js/src/jsmath.cpp:583
#3 0x000055cd7f27cf27 in PowOperation (cx=<optimized out>, lhs=..., rhs=..., res=...) at js/src/vm/Interpreter.cpp:1842
#4 js::PowValues (cx=<optimized out>, lhs=..., rhs=..., res=...) at js/src/vm/Interpreter.cpp:5228
#5 0x000055cd7f78172a in js::jit::RPow::recover (this=<optimized out>, cx=0x7fee46b18000, iter=...) at js/src/jit/Recover.cpp:824
#6 0x000055cd7f61bfdd in js::jit::SnapshotIterator::computeInstructionResults (this=<optimized out>, cx=0x7fee46b18000, results=0x7ffd3bcce520) at js/src/jit/JitFrames.cpp:2056
#7 0x000055cd7f61b5c7 in js::jit::SnapshotIterator::initInstructionResults (this=0x7ffd3bccd7b8, fallback=...) at js/src/jit/JitFrames.cpp:2008
/snip
For detailed crash information, see attachment.
| Reporter | ||
Comment 1•7 years ago
|
||
| Reporter | ||
Comment 2•7 years ago
|
||
autobisectjs shows this is probably related to the following changeset:
The first bad revision is:
changeset: https://hg.mozilla.org/mozilla-central/rev/ad329ec90b6e
user: Iain Ireland
date: Mon Oct 15 13:31:34 2018 +0000
summary: Bug 1499010: Mark ecmaPow to allow calling from recovery code r=tcampbell
Iain, is bug 1499010 a likely regressor?
Blocks: 1499010
Flags: needinfo?(iireland)
| Reporter | ||
Comment 3•7 years ago
|
||
| Reporter | ||
Comment 4•7 years ago
|
||
| Assignee | ||
Comment 5•7 years ago
|
||
For context: we added an assertion on our functions that are called directly from jitted code, saying that they shouldn't be called with a pending exception unless we marked them specially. The goal was to make it clear which functions were being used in unusual ways. It turns out that a surprising number of functions are being called from recovery code. Each of these assertion bugs is a separate function that we need to annotate.
It is reasonably safe to assume that anything that asserts on |!JS_IsExceptionPending(cx_), at js/src/vm/JSContext.cpp:1687| and includes |js::jit::R[Foo]::recover| somewhere in the stack trace is another instance of the same underlying problem. In this case, the three stack traces above mean that changes are necessary in three places: js::powi, js::NumberDiv, and js::EmulatesUndefined.
Patch coming momentarily.
Flags: needinfo?(iireland)
| Assignee | ||
Comment 6•7 years ago
|
||
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d4fe026dee75
Mark unsafe API functions to allow calling from recovery code r=tcampbell
Comment 8•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Updated•7 years ago
|
Assignee: nobody → iireland
Updated•7 years ago
|
status-firefox62:
--- → unaffected
status-firefox63:
--- → unaffected
status-firefox-esr60:
--- → unaffected
Flags: in-testsuite?
| Assignee | ||
Comment 9•7 years ago
|
||
The testcase attached to bug 1499010 also covers this bug.
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•