Bug 157149 - Assertion failure for destructuring assignment with new.target and unary operator
Summary: Assertion failure for destructuring assignment with new.target and unary oper...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
: 157085 (view as bug list)
Depends on: 157263
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-28 13:25 PDT by André Bargull
Modified: 2016-05-15 09:00 PDT (History)
10 users (show)

See Also:


Attachments
Patch (8.40 KB, patch)
2016-04-30 09:24 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-yosemite-wk2 (807.80 KB, application/zip)
2016-04-30 10:07 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews101 for mac-yosemite (902.59 KB, application/zip)
2016-04-30 10:09 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews126 for ios-simulator-wk2 (662.50 KB, application/zip)
2016-04-30 10:18 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews112 for mac-yosemite (875.05 KB, application/zip)
2016-04-30 10:32 PDT, Build Bot
no flags Details
Patch (9.16 KB, patch)
2016-04-30 11:11 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description André Bargull 2016-04-28 13:25:48 PDT
SVN: rev200124
Build with: perl Tools/Scripts/build-jsc --gtk --debug


The following test case triggers this assertion error:
---
ASSERTION FAILED: !hasError()
---


Test case:
---
function f(){ ({v = (typeof new.target)} = {}) }
---


Stack trace:
---
#0  0x00007ffff6e289ac in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:322
#1  0x00007ffff6ab8bb3 in JSC::Parser<JSC::Lexer<unsigned char> >::parseAssignmentExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=..., classifier=...)
    at ../../Source/JavaScriptCore/parser/Parser.cpp:3051
#2  0x00007ffff6a96cf2 in JSC::Parser<JSC::Lexer<unsigned char> >::parseAssignmentExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3045
#3  0x00007ffff6ab944c in JSC::Parser<JSC::Lexer<unsigned char> >::parseAssignmentExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=..., classifier=...)
    at ../../Source/JavaScriptCore/parser/Parser.cpp:3119
#4  0x00007ffff6a96cf2 in JSC::Parser<JSC::Lexer<unsigned char> >::parseAssignmentExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3045
#5  0x00007ffff6aa7f32 in JSC::Parser<JSC::Lexer<unsigned char> >::parseExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3007
#6  0x00007ffff6aefb6e in JSC::Parser<JSC::Lexer<unsigned char> >::parsePrimaryExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3749
#7  0x00007ffff6ad967b in JSC::Parser<JSC::Lexer<unsigned char> >::parseMemberExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3948
#8  0x00007ffff6afc0c3 in JSC::Parser<JSC::Lexer<unsigned char> >::parseUnaryExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:4109
#9  0x00007ffff6af20c8 in JSC::Parser<JSC::Lexer<unsigned char> >::parseBinaryExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3265
#10 0x00007ffff6adfc1a in JSC::Parser<JSC::Lexer<unsigned char> >::parseConditionalExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3224
#11 0x00007ffff6ab8e60 in JSC::Parser<JSC::Lexer<unsigned char> >::parseAssignmentExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=..., classifier=...)
    at ../../Source/JavaScriptCore/parser/Parser.cpp:3075
#12 0x00007ffff6a96cf2 in JSC::Parser<JSC::Lexer<unsigned char> >::parseAssignmentExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3045
#13 0x00007ffff6aa7f32 in JSC::Parser<JSC::Lexer<unsigned char> >::parseExpression<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:3007
#14 0x00007ffff6ab2079 in JSC::Parser<JSC::Lexer<unsigned char> >::parseExpressionStatement<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=...) at ../../Source/JavaScriptCore/parser/Parser.cpp:2533
#15 0x00007ffff6a94f66 in JSC::Parser<JSC::Lexer<unsigned char> >::parseStatement<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=..., directive=@0x7fffffff9308: 0x0, 
    directiveLiteralLength=0x7fffffff92f8) at ../../Source/JavaScriptCore/parser/Parser.cpp:1711
#16 0x00007ffff6a81e24 in JSC::Parser<JSC::Lexer<unsigned char> >::parseStatementListItem<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=..., directive=@0x7fffffff9308: 0x0, 
    directiveLiteralLength=0x7fffffff92f8) at ../../Source/JavaScriptCore/parser/Parser.cpp:578
#17 0x00007ffff6a823a4 in JSC::Parser<JSC::Lexer<unsigned char> >::parseSourceElements<JSC::SyntaxChecker> (this=0x7fffffffa2a0, context=..., mode=JSC::CheckForStrictMode)
    at ../../Source/JavaScriptCore/parser/Parser.cpp:404
#18 0x00007ffff6ad6aac in JSC::Parser<JSC::Lexer<unsigned char> >::parseFunctionBody<JSC::ASTBuilder> (this=0x7fffffffa2a0, context=..., syntaxChecker=..., startLocation=..., startColumn=10, 
    functionKeywordStart=0, functionNameStart=9, parametersStart=10, constructorKind=JSC::ConstructorKind::None, superBinding=JSC::SuperBinding::NotNeeded, bodyType=JSC::StandardFunctionBodyBlock, 
    parameterCount=0, parseMode=JSC::SourceParseMode::NormalFunctionMode) at ../../Source/JavaScriptCore/parser/Parser.cpp:1786
#19 0x00007ffff6aa2cc5 in JSC::Parser<JSC::Lexer<unsigned char> >::<lambda()>::operator()(void) const (__closure=0x7fffffff9610) at ../../Source/JavaScriptCore/parser/Parser.cpp:2110
#20 0x00007ffff6aa3be2 in JSC::Parser<JSC::Lexer<unsigned char> >::parseFunctionInfo<JSC::ASTBuilder> (this=0x7fffffffa2a0, context=..., requirements=JSC::FunctionNeedsName, 
    mode=JSC::SourceParseMode::NormalFunctionMode, nameIsInContainingScope=true, constructorKind=JSC::ConstructorKind::None, expectedSuperBinding=JSC::SuperBinding::NotNeeded, functionKeywordStart=0, 
    functionInfo=..., functionDefinitionType=JSC::Parser<JSC::Lexer<unsigned char> >::FunctionDefinitionType::Declaration) at ../../Source/JavaScriptCore/parser/Parser.cpp:2127
#21 0x00007ffff6a92665 in JSC::Parser<JSC::Lexer<unsigned char> >::parseFunctionDeclaration<JSC::ASTBuilder> (this=0x7fffffffa2a0, context=..., 
    exportType=JSC::Parser<JSC::Lexer<unsigned char> >::ExportType::NotExported) at ../../Source/JavaScriptCore/parser/Parser.cpp:2222
#22 0x00007ffff6a820e3 in JSC::Parser<JSC::Lexer<unsigned char> >::parseStatementListItem<JSC::ASTBuilder> (this=0x7fffffffa2a0, context=..., directive=@0x7fffffff9938: 0x0, 
    directiveLiteralLength=0x7fffffff9930) at ../../Source/JavaScriptCore/parser/Parser.cpp:564
#23 0x00007ffff6a75af3 in JSC::Parser<JSC::Lexer<unsigned char> >::parseSourceElements<JSC::ASTBuilder> (this=0x7fffffffa2a0, context=..., mode=JSC::CheckForStrictMode)
    at ../../Source/JavaScriptCore/parser/Parser.cpp:404
#24 0x00007ffff6a6730d in JSC::Parser<JSC::Lexer<unsigned char> >::parseInner (this=0x7fffffffa2a0, calleeName=..., parseMode=JSC::SourceParseMode::ProgramMode)
    at ../../Source/JavaScriptCore/parser/Parser.cpp:285
#25 0x00007ffff601b3f4 in JSC::Parser<JSC::Lexer<unsigned char> >::parse<JSC::ProgramNode> (this=0x7fffffffa2a0, error=..., calleeName=..., parseMode=JSC::SourceParseMode::ProgramMode)
    at ../../Source/JavaScriptCore/parser/Parser.h:1626
#26 0x00007ffff601a2e1 in JSC::parse<JSC::ProgramNode> (vm=0x7fffb09f1000, source=..., name=..., builtinMode=JSC::JSParserBuiltinMode::NotBuiltin, strictMode=JSC::JSParserStrictMode::NotStrict, 
    parseMode=JSC::SourceParseMode::ProgramMode, superBinding=JSC::SuperBinding::NotNeeded, error=..., positionBeforeLastNewline=0x0, defaultConstructorKind=JSC::ConstructorKind::None, 
    thisTDZMode=<incomplete type>, derivedContextType=JSC::DerivedContextType::None, evalContextType=JSC::EvalContextType::None) at ../../Source/JavaScriptCore/parser/Parser.h:1712
#27 0x00007ffff6b406e5 in JSC::CodeCache::getGlobalCodeBlock<JSC::UnlinkedProgramCodeBlock, JSC::ProgramExecutable> (this=0x7ffff0def000, vm=..., executable=0x7fffaedfbf70, source=..., 
    builtinMode=JSC::JSParserBuiltinMode::NotBuiltin, strictMode=JSC::JSParserStrictMode::NotStrict, thisTDZMode=JSC::ThisTDZMode::CheckIfNeeded, debuggerMode=JSC::DebuggerOff, 
    profilerMode=JSC::ProfilerOff, error=..., evalContextType=JSC::EvalContextType::None, variablesUnderTDZ=0x7fffffffc8f0) at ../../Source/JavaScriptCore/runtime/CodeCache.cpp:106
#28 0x00007ffff6b3dccc in JSC::CodeCache::getProgramCodeBlock (this=0x7ffff0def000, vm=..., executable=0x7fffaedfbf70, source=..., builtinMode=JSC::JSParserBuiltinMode::NotBuiltin, 
    strictMode=JSC::JSParserStrictMode::NotStrict, debuggerMode=JSC::DebuggerOff, profilerMode=JSC::ProfilerOff, error=...) at ../../Source/JavaScriptCore/runtime/CodeCache.cpp:138
#29 0x00007ffff6c046c9 in JSC::JSGlobalObject::createProgramCodeBlock (this=0x7fffaede7900, callFrame=0x7fffaede7940, executable=0x7fffaedfbf70, exception=0x7fffffffcaa0)
    at ../../Source/JavaScriptCore/runtime/JSGlobalObject.cpp:1086
#30 0x00007ffff6ba736d in JSC::ProgramExecutable::initializeGlobalProperties (this=0x7fffaedfbf70, vm=..., callFrame=0x7fffaede7940, scope=0x7fffaeddbfc0)
    at ../../Source/JavaScriptCore/runtime/Executable.cpp:586
#31 0x00007ffff6997c78 in JSC::Interpreter::execute (this=0x7ffff0def058, program=0x7fffaedfbf70, callFrame=0x7fffaede7940, thisObj=0x7fffaedba360)
    at ../../Source/JavaScriptCore/interpreter/Interpreter.cpp:940
#32 0x00007ffff6b849ad in JSC::evaluate (exec=0x7fffaede7940, source=..., thisValue=..., returnedException=...) at ../../Source/JavaScriptCore/runtime/Completion.cpp:106
#33 0x000000000043a120 in runInteractive (globalObject=0x7fffaede7900) at ../../Source/JavaScriptCore/jsc.cpp:2083
#34 0x000000000043abcb in runJSC (vm=0x7fffb09f1000, options=...) at ../../Source/JavaScriptCore/jsc.cpp:2244
#35 0x000000000043b0a1 in jscmain (argc=1, argv=0x7fffffffdbb8) at ../../Source/JavaScriptCore/jsc.cpp:2293
#36 0x000000000043967f in main (argc=1, argv=0x7fffffffdbb8) at ../../Source/JavaScriptCore/jsc.cpp:1947
---
Comment 1 Radar WebKit Bug Importer 2016-04-30 07:42:23 PDT
<rdar://problem/26026095>
Comment 2 Yusuke Suzuki 2016-04-30 09:24:39 PDT
Created attachment 277808 [details]
Patch
Comment 3 Yusuke Suzuki 2016-04-30 09:25:12 PDT
Benchmark report for Octane's code-load.


VMs tested:
"baseline" at /home/yusukesuzuki/dev/WebKit/WebKitBuild/parsing-error-master/Release/bin/jsc
"patched" at /home/yusukesuzuki/dev/WebKit/WebKitBuild/parsing-error/Release/bin/jsc

Collected 30 samples per benchmark/VM, with 30 VM invocations per benchmark. Emitted a call to
gc() between sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used
the jsc-specific preciseTime() function to get microsecond-level timing. Reporting benchmark
execution times with 95% confidence intervals in milliseconds.

                         baseline                  patched                                      

closure              0.61416+-0.00606          0.61390+-0.00310       
jquery               8.05514+-0.05203          8.05454+-0.03505       

<geometric>          2.22395+-0.01288          2.22359+-0.00768         might be 1.0002x faster
Comment 4 Yusuke Suzuki 2016-04-30 10:05:55 PDT
Comment on attachment 277808 [details]
Patch

Let's rebaseline the expect files.
Comment 5 Build Bot 2016-04-30 10:07:34 PDT
Comment on attachment 277808 [details]
Patch

Attachment 277808 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1245718

New failing tests:
js/basic-strict-mode.html
Comment 6 Build Bot 2016-04-30 10:07:37 PDT
Created attachment 277812 [details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-04-30 10:09:22 PDT
Comment on attachment 277808 [details]
Patch

Attachment 277808 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1245714

New failing tests:
js/basic-strict-mode.html
Comment 8 Build Bot 2016-04-30 10:09:25 PDT
Created attachment 277813 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 9 Build Bot 2016-04-30 10:18:27 PDT
Comment on attachment 277808 [details]
Patch

Attachment 277808 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1245721

New failing tests:
js/basic-strict-mode.html
Comment 10 Build Bot 2016-04-30 10:18:30 PDT
Created attachment 277814 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 11 Build Bot 2016-04-30 10:32:42 PDT
Comment on attachment 277808 [details]
Patch

Attachment 277808 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1245765

New failing tests:
js/basic-strict-mode.html
Comment 12 Build Bot 2016-04-30 10:32:45 PDT
Created attachment 277816 [details]
Archive of layout-test-results from ews112 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 13 Yusuke Suzuki 2016-04-30 11:11:44 PDT
Created attachment 277818 [details]
Patch
Comment 14 Saam Barati 2016-04-30 12:14:20 PDT
Comment on attachment 277818 [details]
Patch

r=me
Comment 15 Yusuke Suzuki 2016-04-30 12:16:58 PDT
Comment on attachment 277818 [details]
Patch

Thanks!
Comment 16 WebKit Commit Bot 2016-04-30 13:04:40 PDT
Comment on attachment 277818 [details]
Patch

Clearing flags on attachment: 277818

Committed r200293: <http://trac.webkit.org/changeset/200293>
Comment 17 WebKit Commit Bot 2016-04-30 13:04:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 18 Yusuke Suzuki 2016-05-15 09:00:08 PDT
*** Bug 157085 has been marked as a duplicate of this bug. ***