Code:
a = new Promise(() => {});
b = async () => {
await a;
};
b();
Trace:
49.328 CrashReporter(45:45): --- Backtrace for thread #0 (TID 44) ---
49.328 CrashReporter(45:45): 0x1cf2502e: [libsystem.so] syscall2 +0xe (syscall.cpp:25 => syscall.cpp:24)
49.328 CrashReporter(45:45): 0x3d174594: [libc.so] raise +0x24 (syscall.h:35 => signal.cpp:21 => signal.cpp:34)
49.328 CrashReporter(45:45): 0x3d15f9a9: [libc.so] abort +0x29 (stdlib.cpp:215)
49.328 CrashReporter(45:45): 0x3d16043c: [libc.so] __assertion_failed +0x6c (assert.cpp:33)
49.328 CrashReporter(45:45): 0xbd83469e: [libjs.so.serenity] JS::await(JS::GlobalObject&, JS::Value) +0x91e (Completion.cpp:114)
49.328 CrashReporter(45:45): 0xbd742b17: [libjs.so.serenity] JS::AwaitExpression::execute(JS::Interpreter&, JS::GlobalObject&) const +0x117 (AST.cpp:410)
49.332 CrashReporter(45:45): 0xbd73af88: [libjs.so.serenity] JS::ExpressionStatement::execute(JS::Interpreter&, JS::GlobalObject&) const [clone .localalias] +0xa8 (AST.cpp:220)
49.332 CrashReporter(45:45): 0xbd73d4ab: [libjs.so.serenity] JS::ScopeNode::evaluate_statements(JS::Interpreter&, JS::GlobalObject&) const +0x8b (AST.cpp:93)
49.332 CrashReporter(45:45): 0xbd73d5ea: [libjs.so.serenity] JS::FunctionBody::execute(JS::Interpreter&, JS::GlobalObject&) const [clone .localalias] +0xaa (AST.cpp:108)
49.332 CrashReporter(45:45): 0xbd85f879: [libjs.so.serenity] JS::ThrowCompletionOr<JS::Value> JS::ECMAScriptFunctionObject::async_block_start(JS::PromiseCapability const&, JS::ExecutionContext&)::{lambda(auto:1&, auto:2&)#1}::operator()<JS::VM, JS::GlobalObject>(JS::VM&, JS::GlobalObject&) const +0x79 (ECMAScriptFunctionObject.cpp:704)
49.336 CrashReporter(45:45): 0xbd85fd32: [libjs.so.serenity] AK::Function<JS::ThrowCompletionOr<JS::Value> (JS::VM&, JS::GlobalObject&)>::CallableWrapper<JS::ECMAScriptFunctionObject::async_block_start(JS::PromiseCapability const&, JS::ExecutionContext&)::{lambda(auto:1&, auto:2&)#1}>::call(JS::VM&, JS::GlobalObject&) +0x32 (Function.h:151)
49.336 CrashReporter(45:45): 0xbd90f2e9: [libjs.so.serenity] JS::NativeFunction::call() +0x79 (Function.h:91)
49.336 CrashReporter(45:45): 0xbd90fe8b: [libjs.so.serenity] JS::NativeFunction::internal_call(JS::Value, JS::MarkedValueList) [clone .localalias] +0x24b (NativeFunction.cpp:110)
49.336 CrashReporter(45:45): 0xbd7d537a: [libjs.so.serenity] JS::call_impl(JS::GlobalObject&, JS::Value, JS::Value, AK::Optional<JS::MarkedValueList>) +0x34a (AbstractOperations.cpp:60)
49.339 CrashReporter(45:45): 0xbdb14937: [libjs.so.serenity] JS::VM::call_internal(JS::FunctionObject&, JS::Value, AK::Optional<JS::MarkedValueList>) +0xa7 (VM.cpp:513)
49.339 CrashReporter(45:45): 0xbd85e745: [libjs.so.serenity] JS::ECMAScriptFunctionObject::async_block_start(JS::PromiseCapability const&, JS::ExecutionContext&) +0x2d5 (VM.h:329 => VM.h:332 => ECMAScriptFunctionObject.cpp:743)
49.344 CrashReporter(45:45): 0xbd85eac7: [libjs.so.serenity] JS::ECMAScriptFunctionObject::async_function_start(JS::PromiseCapability const&) +0x87 (ECMAScriptFunctionObject.cpp:688)
49.344 CrashReporter(45:45): 0xbd862a19: [libjs.so.serenity] JS::ECMAScriptFunctionObject::ordinary_call_evaluate_body() [clone .localalias] +0x269 (ECMAScriptFunctionObject.cpp:835)
49.344 CrashReporter(45:45): 0xbd864292: [libjs.so.serenity] JS::ECMAScriptFunctionObject::internal_call(JS::Value, JS::MarkedValueList) [clone .localalias] +0x692 (ECMAScriptFunctionObject.cpp:163)
49.348 CrashReporter(45:45): 0xbd7d537a: [libjs.so.serenity] JS::call_impl(JS::GlobalObject&, JS::Value, JS::Value, AK::Optional<JS::MarkedValueList>) +0x34a (AbstractOperations.cpp:60)
49.348 CrashReporter(45:45): 0xbdb14937: [libjs.so.serenity] JS::VM::call_internal(JS::FunctionObject&, JS::Value, AK::Optional<JS::MarkedValueList>) +0xa7 (VM.cpp:513)
49.348 CrashReporter(45:45): 0xbd7498df: [libjs.so.serenity] JS::CallExpression::execute(JS::Interpreter&, JS::GlobalObject&) const +0x36f (VM.h:326 => AST.cpp:338)
49.348 CrashReporter(45:45): 0xbd73af88: [libjs.so.serenity] JS::ExpressionStatement::execute(JS::Interpreter&, JS::GlobalObject&) const [clone .localalias] +0xa8 (AST.cpp:220)
49.352 CrashReporter(45:45): 0xbd73d4ab: [libjs.so.serenity] JS::ScopeNode::evaluate_statements(JS::Interpreter&, JS::GlobalObject&) const +0x8b (AST.cpp:93)
49.352 CrashReporter(45:45): 0xbd7577f5: [libjs.so.serenity] JS::Program::execute(JS::Interpreter&, JS::GlobalObject&) const +0x165 (AST.cpp:165)
49.352 CrashReporter(45:45): 0xbd791e3d: [libjs.so.serenity] JS::Interpreter::run(JS::GlobalObject&, JS::Program const&) +0x23d (Interpreter.cpp:62)
49.352 CrashReporter(45:45): 0x28ba29ee: [/bin/js] parse_and_run(JS::Interpreter&, AK::StringView, AK::StringView) +0x53e (js.cpp:950)
49.352 CrashReporter(45:45): 0x28ba4a6d: [/bin/js] .L5109 +0x775 (js.cpp:1108 => js.cpp:1479)
49.352 CrashReporter(45:45): 0x692741c1: [libmain.so.serenity] main +0x81 (Main.cpp:20)
49.359 CrashReporter(45:45): 0x28b92d7c: [/bin/js] _entry +0x5c (crt0.cpp:46)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too