Bug 171275

Summary: ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key)
Product: WebKit Reporter: André Bargull <andre.bargull>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, ticaiolima, ysuzuki
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

Description André Bargull 2017-04-25 09:01:09 PDT
svn revision: 215724

Test case:
---
var key = {
    toString() {
        return "p";
    }
};
var {[key]: a, ...b} = {};
---


Asserts with:
---
ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key)
---


Stacktrace:
---
#0  0x00007ffff6c4b5af in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:292
#1  0x00007ffff602bd1d in WTF::HashTable<WTF::RefPtr<WTF::UniquedStringImpl>, WTF::RefPtr<WTF::UniquedStringImpl>, WTF::IdentityExtractor, JSC::IdentifierRepHash, WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> >, WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> > >::checkKey<WTF::IdentityHashTranslator<WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> >, JSC::IdentifierRepHash>, WTF::RefPtr<WTF::UniquedStringImpl> > (this=0x7fffffffbf50, key=...) at ../../Source/WTF/wtf/HashTable.h:587
#2  0x00007ffff602e765 in WTF::HashTable<WTF::RefPtr<WTF::UniquedStringImpl>, WTF::RefPtr<WTF::UniquedStringImpl>, WTF::IdentityExtractor, JSC::IdentifierRepHash, WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> >, WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> > >::add<WTF::IdentityHashTranslator<WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> >, JSC::IdentifierRepHash>, WTF::RefPtr<WTF::UniquedStringImpl> const&, WTF::RefPtr<WTF::UniquedStringImpl> >(const WTF::RefPtr<WTF::UniquedStringImpl> &, <unknown type in /home/andre/svn/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18, CU 0x0, DIE 0x1b0670>) (this=0x7fffffffbf50, key=..., extra=<unknown type in /home/andre/svn/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18, CU 0x0, DIE 0x1b0670>)
    at ../../Source/WTF/wtf/HashTable.h:864
#3  0x00007ffff60259d3 in WTF::HashTable<WTF::RefPtr<WTF::UniquedStringImpl>, WTF::RefPtr<WTF::UniquedStringImpl>, WTF::IdentityExtractor, JSC::IdentifierRepHash, WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> >, WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> > >::add(<unknown type in /home/andre/svn/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18, CU 0x0, DIE 0x1a62b0>) (
    this=0x7fffffffbf50, value=<unknown type in /home/andre/svn/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18, CU 0x0, DIE 0x1a62b0>) at ../../Source/WTF/wtf/HashTable.h:387
#4  0x00007ffff601d7cf in WTF::HashSet<WTF::RefPtr<WTF::UniquedStringImpl>, JSC::IdentifierRepHash, WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> > >::add(<unknown type in /home/andre/svn/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18, CU 0x0, DIE 0x19aa35>) (this=0x7fffffffbf50, 
    value=<unknown type in /home/andre/svn/webkit/WebKitBuild/Debug/lib/libjavascriptcoregtk-4.0.so.18, CU 0x0, DIE 0x19aa35>) at ../../Source/WTF/wtf/HashSet.h:229
#5  0x00007ffff605d634 in JSC::ObjectPatternNode::bindValue (this=0x7fffad7f4208, generator=..., rhs=0x7fffee7fb7c8) at ../../Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:4088
#6  0x00007ffff605bf7f in JSC::DestructuringAssignmentNode::emitBytecode (this=0x7fffad7f4318, generator=..., dst=0x0) at ../../Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3876
#7  0x00007ffff6018bdd in JSC::BytecodeGenerator::emitNodeInTailPosition (this=0x7fffee78e500, dst=0x0, n=0x7fffad7f4318) at ../../Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:494
#8  0x00007ffff6018ab3 in JSC::BytecodeGenerator::emitNode (this=0x7fffee78e500, dst=0x0, n=0x7fffad7f4318) at ../../Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:483
#9  0x00007ffff6060ea1 in JSC::BytecodeGenerator::emitNode (this=0x7fffee78e500, n=0x7fffad7f4318) at ../../Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:499
#10 0x00007ffff6053bfa in JSC::DeclarationStatement::emitBytecode (this=0x7fffad7f4348, generator=...) at ../../Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:2515
#11 0x00007ffff6060e79 in JSC::BytecodeGenerator::emitNodeInTailPosition (this=0x7fffee78e500, dst=0x7fffee7fb7bc, n=0x7fffad7f4348) at ../../Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:467
#12 0x00007ffff6061427 in JSC::SourceElements::emitBytecode (this=0x7fffad7f4000, generator=..., dst=0x7fffee7fb7bc) at ../../Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:2464
#13 0x00007ffff6061506 in JSC::ScopeNode::emitStatementsBytecode (this=0x7fffee7da468, generator=..., dst=0x7fffee7fb7bc) at ../../Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3452
#14 0x00007ffff605954d in JSC::emitProgramNodeBytecode (generator=..., scopeNode=...) at ../../Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3462
#15 0x00007ffff60595fd in JSC::ProgramNode::emitBytecode (this=0x7fffee7da468, generator=...) at ../../Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3472
#16 0x00007ffff5ff66ee in JSC::BytecodeGenerator::generate (this=0x7fffee78e500) at ../../Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:125
...
---
Comment 1 André Bargull 2018-02-27 12:03:25 PST
Test case no longer reproduces at r228977.
Comment 2 Yusuke Suzuki 2018-03-01 22:07:25 PST
I think this is fixed when spread/rest objects implementation is refined.