From cb0f788597a946438bfd993850426f848ff39aa2 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 4 Jul 2014 14:15:56 +0200 Subject: Crash during exception unwinding https://webkit.org/b/119860 Reviewed by Filip Pizlo. Add an "Unreachable" NodeType, and then rearrange op_throw and op_throw_reference_error to plant Throw or ThrowReferenceError followed by a flush and then the Unreachable node. We need this so that Throw and ThrowReferenceError no longer need to be treated as terminals and the subsequent flush keeps the activation (and other registers) live. * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::::executeEffects): * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock): * dfg/DFGClobberize.h: (JSC::DFG::clobberize): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGNode.h: (JSC::DFG::Node::isTerminal): * dfg/DFGNodeType.h: * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): Change-Id: Idb894e780cd3ebe15515d1796c58a339ae54d55f git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154290 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Jocelyn Turcotte --- Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp') diff --git a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp index a76d5f250..c3e041c26 100644 --- a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp +++ b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp @@ -3031,13 +3031,15 @@ bool ByteCodeParser::parseBlock(unsigned limit) LAST_OPCODE(op_end); case op_throw: - flushAllArgumentsAndCapturedVariablesInInlineStack(); addToGraph(Throw, get(currentInstruction[1].u.operand)); + flushAllArgumentsAndCapturedVariablesInInlineStack(); + addToGraph(Unreachable); LAST_OPCODE(op_throw); case op_throw_static_error: - flushAllArgumentsAndCapturedVariablesInInlineStack(); addToGraph(ThrowReferenceError); + flushAllArgumentsAndCapturedVariablesInInlineStack(); + addToGraph(Unreachable); LAST_OPCODE(op_throw_static_error); case op_call: -- cgit v1.2.1