Changeset 179015 in webkit
- Timestamp:
- Jan 23, 2015 11:52:25 AM (9 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r178984 r179015 1 2015-01-23 Michael Saboff <msaboff@apple.com> 2 3 Immediate crash when setting JS breakpoint 4 https://bugs.webkit.org/show_bug.cgi?id=140811 5 6 Reviewed by Mark Lam. 7 8 When the DFG stack layout phase doesn't allocate a register for the scope register, 9 it incorrectly sets the scope register in the code block to a bad value, one with 10 an offset of 0. Changed it so that we set the code block's scope register to the 11 invalid VirtualRegister instead. 12 13 No tests needed as adding the ASSERT in setScopeRegister() was used to find the bug. 14 We crash with that ASSERT in testapi and likely many other tests as well. 15 16 * bytecode/CodeBlock.cpp: 17 (JSC::CodeBlock::CodeBlock): 18 * bytecode/CodeBlock.h: 19 (JSC::CodeBlock::setScopeRegister): 20 (JSC::CodeBlock::scopeRegister): 21 Added ASSERTs to catch any future improper setting of the code block's scope register. 22 23 * dfg/DFGStackLayoutPhase.cpp: 24 (JSC::DFG::StackLayoutPhase::run): 25 1 26 2015-01-22 Mark Hahnenberg <mhahnenb@gmail.com> 2 27 -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r178926 r179015 1664 1664 { 1665 1665 ASSERT(m_heap->isDeferred()); 1666 1666 ASSERT(m_scopeRegister.isLocal()); 1667 1667 1668 if (SymbolTable* symbolTable = other.symbolTable()) 1668 1669 m_symbolTable.set(*m_vm, m_ownerExecutable.get(), symbolTable); … … 1720 1721 { 1721 1722 ASSERT(m_heap->isDeferred()); 1723 ASSERT(m_scopeRegister.isLocal()); 1722 1724 1723 1725 bool didCloneSymbolTable = false; -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.h
r178693 r179015 325 325 void setScopeRegister(VirtualRegister scopeRegister) 326 326 { 327 ASSERT(scopeRegister.isLocal() || !scopeRegister.isValid()); 327 328 m_scopeRegister = scopeRegister; 328 329 } … … 330 331 VirtualRegister scopeRegister() const 331 332 { 332 ASSERT(m_scopeRegister.isValid());333 333 return m_scopeRegister; 334 334 } -
trunk/Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp
r176479 r179015 170 170 171 171 if (codeBlock()->scopeRegister().isValid()) { 172 codeBlock()->setScopeRegister(173 virtualRegisterForLocal(allocation[codeBlock()->scopeRegister().toLocal()]));172 unsigned scopeRegisterAllocation = allocation[codeBlock()->scopeRegister().toLocal()]; 173 codeBlock()->setScopeRegister(scopeRegisterAllocation == UINT_MAX ? VirtualRegister() : virtualRegisterForLocal(scopeRegisterAllocation)); 174 174 } 175 175
Note: See TracChangeset
for help on using the changeset viewer.