Assertion failure: deleted, at js/src/shell/js.cpp:1100 with Promise
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox64 | --- | unaffected |
firefox65 | --- | unaffected |
firefox66 | --- | fixed |
People
(Reporter: gkw, Assigned: arai)
References
Details
(4 keywords, Whiteboard: [jsbugmon:update])
Attachments
(2 files)
The following testcase crashes on mozilla-central revision 6317367156dd (build with --enable-debug --enable-more-deterministic, run with --fuzzing-safe --no-threads --no-baseline --no-ion):
// jsfunfuzz-generated
z = newGlobal();
// Adapted from randomly chosen test: js/src/tests/test262/language/expressions/async-generator/named-yield-star-getiter-sync-returns-undefined-throw.js
evalcx("(async function() { l })()", z);
// jsfunfuzz-generated
Promise.prototype.then = z.Promise.prototype.then;
// Adapted from randomly chosen test: js/src/tests/test262/language/statements/async-generator/yield-star-next-not-callable-object-throw.js
async function* f() { n };
f().next().then();
Backtrace:
#0 TrackUnhandledRejections (cx=<optimized out>, state=JS::PromiseRejectionHandlingState::Handled, promise=...) at js/src/shell/js.cpp:1100
#1 ForwardingPromiseRejectionTrackerCallback (cx=0x7f636c718000, promise=..., state=JS::PromiseRejectionHandlingState::Handled, data=<optimized out>) at js/src/shell/js.cpp:1112
#2 0x000055944a096919 in PerformPromiseThenWithReaction (cx=0x7f636c718000, promise=..., reaction=...) at js/src/builtin/Promise.cpp:4274
#3 0x000055944a07bed3 in PerformPromiseThen (cx=0x7f636c718000, promise=..., onFulfilled_=..., onRejected_=..., resultCapability=...) at js/src/builtin/Promise.cpp:4212
#4 0x000055944a07dc68 in js::OriginalPromiseThen (cx=0x7f636c718000, promiseObj=..., onFulfilled=..., onRejected=..., dependent=..., createDependent=js::CreateDependentPromise::Always) at js/src/builtin/Promise.cpp:3393
#5 0x000055944a0825a4 in Promise_then_impl (cx=0x7f636c718000, promiseVal=..., onFulfilled=..., onRejected=..., rval=..., rvalUsed=<optimized out>) at js/src/builtin/Promise.cpp:4157
/snip
For detailed crash information, see attachment.
The assertion failure name is scary ("deleted") so setting s-s as a start.
![]() |
Reporter | |
Comment 1•6 years ago
|
||
![]() |
Reporter | |
Comment 2•6 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/c9f108854caa
user: Tooru Fujisawa
date: Tue Jan 08 02:34:57 2019 +0000
summary: Bug 1517868 - Report unhandled rejections in JS shell. r=jorendorff
Arai-san, is bug 1517868 a likely regressor?
Assignee | ||
Comment 3•6 years ago
|
||
thanks.
this is shell-only and also not a security issue.
just that the JS shell doesn't track promise rejection properly.
(it doesn't wrap promise object on correct condition)
feel free to open.
I'll post patch shortly.
Assignee | ||
Comment 4•6 years ago
|
||
Updated•6 years ago
|
Comment 7•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Updated•6 years ago
|
Description
•