Bug 170732 - ASSERTION FAILED: match(ASYNC)
Summary: ASSERTION FAILED: match(ASYNC)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 170844
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-11 08:59 PDT by André Bargull
Modified: 2017-04-14 12:52 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description André Bargull 2017-04-11 08:59:33 PDT
svn revision: 215179

Test case:
---
async function f() {
    await async()=>{}
}
---

Triggers this assertion:
---
ASSERTION FAILED: match(ASYNC)
---

Stacktrace:
---
#0  0x00007ffff6c846f6 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:323
#1  0x00007ffff67fcdd7 in JSC::Parser<JSC::Lexer<unsigned char> >::parseAssignmentExpression<JSC::SyntaxChecker> (this=0x7fffffff9f40, context=..., classifier=...)
    at ../../Source/JavaScriptCore/parser/Parser.cpp:3416
#2  0x00007ffff67e945a in JSC::Parser<JSC::Lexer<unsigned char> >::parseAssignmentExpression<JSC::SyntaxChecker> (this=0x7fffffff9f40, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3376
#3  0x00007ffff680580a in JSC::Parser<JSC::Lexer<unsigned char> >::parseExpression<JSC::SyntaxChecker> (this=0x7fffffff9f40, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3338
#4  0x00007ffff67ed34d in JSC::Parser<JSC::Lexer<unsigned char> >::parseExpressionOrLabelStatement<JSC::SyntaxChecker> (this=0x7fffffff9f40, context=..., allowFunctionDeclarationAsStatement=true)
    at ../../Source/JavaScriptCore/parser/Parser.cpp:2764
#5  0x00007ffff67d8ac7 in JSC::Parser<JSC::Lexer<unsigned char> >::parseStatementListItem<JSC::SyntaxChecker> (this=0x7fffffff9f40, context=..., directive=@0x7fffffff8f48: 0x0, 
    directiveLiteralLength=0x7fffffff8f38) at ../../Source/JavaScriptCore/parser/Parser.cpp:596
#6  0x00007ffff67d63a1 in JSC::Parser<JSC::Lexer<unsigned char> >::parseSourceElements<JSC::SyntaxChecker> (this=0x7fffffff9f40, context=..., mode=JSC::CheckForStrictMode)
    at ../../Source/JavaScriptCore/parser/Parser.cpp:325
#7  0x00007ffff683a07b in JSC::Parser<JSC::Lexer<unsigned char> >::parseFunctionBody<JSC::ASTBuilder> (this=0x7fffffff9f40, context=..., syntaxChecker=..., startLocation=..., startColumn=16, 
    functionKeywordStart=6, functionNameStart=15, parametersStart=16, constructorKind=JSC::ConstructorKind::None, superBinding=JSC::SuperBinding::NotNeeded, bodyType=JSC::StandardFunctionBodyBlock, 
    parameterCount=0, parseMode=JSC::SourceParseMode::AsyncFunctionMode) at ../../Source/JavaScriptCore/parser/Parser.cpp:1922
#8  0x00007ffff67ff353 in JSC::Parser<JSC::Lexer<unsigned char> >::<lambda()>::operator()(void) const (__closure=0x7fffffff9270) at ../../Source/JavaScriptCore/parser/Parser.cpp:2300
#9  0x00007ffff6800726 in JSC::Parser<JSC::Lexer<unsigned char> >::parseFunctionInfo<JSC::ASTBuilder> (this=0x7fffffff9f40, context=..., requirements=JSC::FunctionNameRequirements::Named, 
    mode=JSC::SourceParseMode::AsyncFunctionMode, nameIsInContainingScope=true, constructorKind=JSC::ConstructorKind::None, expectedSuperBinding=JSC::SuperBinding::NotNeeded, functionKeywordStart=6, 
    functionInfo=..., functionDefinitionType=JSC::Parser<JSC::Lexer<unsigned char> >::FunctionDefinitionType::Declaration) at ../../Source/JavaScriptCore/parser/Parser.cpp:2319
#10 0x00007ffff67eb2c7 in JSC::Parser<JSC::Lexer<unsigned char> >::parseAsyncFunctionDeclaration<JSC::ASTBuilder> (this=0x7fffffff9f40, context=..., 
    exportType=JSC::Parser<JSC::Lexer<unsigned char> >::ExportType::NotExported, declarationDefaultContext=JSC::DeclarationDefaultContext::Standard) at ../../Source/JavaScriptCore/parser/Parser.cpp:2486
#11 0x00007ffff67d8e8d in JSC::Parser<JSC::Lexer<unsigned char> >::parseStatementListItem<JSC::ASTBuilder> (this=0x7fffffff9f40, context=..., directive=@0x7fffffff95b8: 0x0, 
    directiveLiteralLength=0x7fffffff95b0) at ../../Source/JavaScriptCore/parser/Parser.cpp:582
#12 0x00007ffff67c9b7e in JSC::Parser<JSC::Lexer<unsigned char> >::parseSourceElements<JSC::ASTBuilder> (this=0x7fffffff9f40, context=..., mode=JSC::CheckForStrictMode)
    at ../../Source/JavaScriptCore/parser/Parser.cpp:325
#13 0x00007ffff67b984f in JSC::Parser<JSC::Lexer<unsigned char> >::parseInner (this=0x7fffffff9f40, calleeName=..., parseMode=JSC::SourceParseMode::ProgramMode)
    at ../../Source/JavaScriptCore/parser/Parser.cpp:211
#14 0x00007ffff5d42027 in JSC::Parser<JSC::Lexer<unsigned char> >::parse<JSC::ProgramNode> (this=0x7fffffff9f40, error=..., calleeName=..., parseMode=JSC::SourceParseMode::ProgramMode)
    at ../../Source/JavaScriptCore/parser/Parser.h:1816
....
---
Comment 1 Radar WebKit Bug Importer 2017-04-11 09:47:59 PDT
<rdar://problem/31558219>
Comment 2 Caitlin Potter (:caitp) 2017-04-13 19:38:54 PDT
This is my bug, caused by line 4498 of Parser.cpp. I'll send a quick patch in a few minutes.

Thanks André
Comment 3 Caitlin Potter (:caitp) 2017-04-14 12:52:45 PDT
Fixed by https://trac.webkit.org/changeset/215370/