Closed
Bug 1308744
Opened 8 years ago
Closed 8 years ago
Crash [@ js::frontend::BytecodeEmitter::emitFunction] or [@ js::frontend::BytecodeEmitter::emitTree]
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox50 | --- | unaffected |
firefox51 | --- | unaffected |
firefox52 | --- | fixed |
People
(Reporter: gkw, Unassigned)
References
Details
(Keywords: bugmon, crash, testcase, Whiteboard: [jsbugmon:update,ignore])
Crash Data
Attachments
(1 file)
35.23 KB,
text/plain
|
Details |
The following testcase crashes on mozilla-central revision 313a2d049350 (build with --enable-debug --enable-more-deterministic, run with --fuzzing-safe --no-threads --ion-eager): [{ a: b = (function() { return { f() {}, g() {} } }) }] = c Backtrace: 0 js-dbg-64-dm-clang-darwin-313a2d049350 0x000000010ad1bc45 js::frontend::BytecodeEmitter::emitFunction(js::frontend::ParseNode*, bool) + 2565 (BytecodeEmitter.cpp:9847) 1 js-dbg-64-dm-clang-darwin-313a2d049350 0x000000010ad0c126 js::frontend::BytecodeEmitter::emitTree(js::frontend::ParseNode*, js::frontend::BytecodeEmitter::EmitLineNumberNote) + 1302 (BytecodeEmitter.cpp:9179) 2 js-dbg-64-dm-clang-darwin-313a2d049350 0x000000010ad2224f js::frontend::BytecodeEmitter::emitPropertyList(js::frontend::ParseNode*, JS::MutableHandle<js::PlainObject*>, js::frontend::PropListType) + 671 (BytecodeEmitter.cpp:8382) 3 js-dbg-64-dm-clang-darwin-313a2d049350 0x000000010ad22ae5 js::frontend::BytecodeEmitter::emitObject(js::frontend::ParseNode*) + 373 (BytecodeEmitter.cpp:8487) 4 js-dbg-64-dm-clang-darwin-313a2d049350 0x000000010ad0c556 js::frontend::BytecodeEmitter::emitTree(js::frontend::ParseNode*, js::frontend::BytecodeEmitter::EmitLineNumberNote) + 2374 (BytecodeEmitter.cpp:9492) /snip For detailed crash information, see attachment.
Reporter | ||
Comment 1•8 years ago
|
||
Reporter | ||
Comment 2•8 years ago
|
||
autoBisect shows this is probably related to the following changeset: The first bad revision is: changeset: https://hg.mozilla.org/mozilla-central/rev/9716bcfed35d user: Tooru Fujisawa date: Tue Sep 27 13:57:00 2016 +0900 summary: Bug 1184922 - Part 1: Do not call iter.next() if the previous iter.next().done was true in array destructuring. r=shu Arai-san, is bug 1184922 a likely regressor?
Blocks: 1184922
Crash Signature: [@ js::frontend::BytecodeEmitter::emitFunction] → [@ js::frontend::BytecodeEmitter::emitFunction]
[@ js::frontend::BytecodeEmitter::emitTree]
Flags: needinfo?(arai.unmht)
Summary: Crash [@ js::frontend::BytecodeEmitter::emitFunction] → Crash [@ js::frontend::BytecodeEmitter::emitFunction] or [@ js::frontend::BytecodeEmitter::emitTree]
Comment 3•8 years ago
|
||
Yes, and it's already backed out in m-i. the issue is that we try to emit an object twice for different script for the same function, by different emitter (sadly, the pointer is same, as it's on stack...) emitLink is created while emitting first time, and we used the same emitLink while emitting second time, that's wrong. so, even if emitLink is non-null, it doesn't mean that the object is in the objectList of the current emitter. possible solutions: * clear emitLink before or after emitting a function, if emitting twice (maybe need RAII) * search through objectList elements everytime * search through objectList elements everytime, if emitting twice (needs RAII)
Comment 4•8 years ago
|
||
another solution: * add unique ID to BytecodeEmitter or ObjectList and store it to ObjectBox, and ignore the emitLink value if the ID is different
Comment 5•8 years ago
|
||
We can clear emitLink in CGObjectList::finish. Patch is ready, will fix in bug 1184922
Flags: needinfo?(arai.unmht)
Updated•8 years ago
|
Crash Signature: [@ js::frontend::BytecodeEmitter::emitFunction]
[@ js::frontend::BytecodeEmitter::emitTree] → [@ js::frontend::BytecodeEmitter::emitFunction]
[@ js::frontend::BytecodeEmitter::emitTree]
Whiteboard: [jsbugmon:update] → [jsbugmon:update,ignore]
Comment 6•8 years ago
|
||
JSBugMon: The testcase found in this bug no longer reproduces (tried revision 90d8afaddf91).
Comment 7•8 years ago
|
||
fixed in bug 1184922
Status: NEW → RESOLVED
Crash Signature: [@ js::frontend::BytecodeEmitter::emitFunction]
[@ js::frontend::BytecodeEmitter::emitTree] → [@ js::frontend::BytecodeEmitter::emitFunction]
[@ js::frontend::BytecodeEmitter::emitTree]
Closed: 8 years ago
Resolution: --- → FIXED
Comment 8•7 years ago
|
||
Should we try to uplift the fix?
status-firefox50:
--- → affected
status-firefox51:
--- → affected
Comment 9•7 years ago
|
||
This bug is a regression from bug 1184922 comment #33 (firefox 52) and soon backed out there (bug 1184922 comment #34). So this issue itself doesn't affect firefox 50 or 51. Have you spotted similar issue on older branches?
Comment 10•7 years ago
|
||
For some reason I thought 1184922 landed earlier than 52.
You need to log in
before you can comment on or make changes to this bug.
Description
•