<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>141246</bug_id>
          
          <creation_ts>2015-02-04 07:20:11 -0800</creation_ts>
          <short_desc>Crash in JSC::DFG::StackLayoutPhase::run</short_desc>
          <delta_ts>2016-08-04 16:26:48 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>141721</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>116980</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Renata Hodovan">rhodovan.u-szeged</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1066797</commentid>
    <comment_count>0</comment_count>
      <attachid>246031</attachid>
    <who name="Renata Hodovan">rhodovan.u-szeged</who>
    <bug_when>2015-02-04 07:20:11 -0800</bug_when>
    <thetext>Created attachment 246031
Test case

Run the following test in release or debug JSC:

function fuzz(arguments) {
    fuzz(arguments);
}
fuzz(2);


For the first sight it looks like a stack-overflow but according to the backtraces it might be a different issue.

Running the test in debug JSC it results in an assertion failure with the following trace:

ASSERTION FAILED: usesArguments()
../../Source/JavaScriptCore/bytecode/CodeBlock.h(338) : JSC::VirtualRegister JSC::CodeBlock::argumentsRegister() const

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff73e0095 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:321
321	    *(int *)(uintptr_t)0xbbadbeef = 0;
(gdb) bt
#0  0x00007ffff73e0095 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:321
#1  0x00007ffff6cf54a9 in JSC::CodeBlock::argumentsRegister (this=0x7fffb0649a00) at ../../Source/JavaScriptCore/bytecode/CodeBlock.h:338
#2  0x00007ffff6dfd079 in JSC::DFG::Graph::argumentsRegisterFor (this=0x7fffffff2410, inlineCallFrame=0x7ffff7f92730)
    at ../../Source/JavaScriptCore/dfg/DFGGraph.h:415
#3  0x00007ffff6fdf182 in JSC::DFG::StackLayoutPhase::run (this=0x7fffffff1e80) at ../../Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp:112
#4  0x00007ffff6fe0250 in JSC::DFG::runAndLog&lt;JSC::DFG::StackLayoutPhase&gt; (phase=...) at ../../Source/JavaScriptCore/dfg/DFGPhase.h:77
#5  0x00007ffff6fe00ee in JSC::DFG::runPhase&lt;JSC::DFG::StackLayoutPhase&gt; (graph=...) at ../../Source/JavaScriptCore/dfg/DFGPhase.h:87
#6  0x00007ffff6fde654 in JSC::DFG::performStackLayout (graph=...) at ../../Source/JavaScriptCore/dfg/DFGStackLayoutPhase.cpp:272
#7  0x00007ffff6f2fa8c in JSC::DFG::Plan::compileInThreadImpl (this=0x7ffff7fbdd80, longLivedState=...)
    at ../../Source/JavaScriptCore/dfg/DFGPlan.cpp:296
#8  0x00007ffff6f2f25c in JSC::DFG::Plan::compileInThread (this=0x7ffff7fbdd80, longLivedState=..., threadData=0x0)
    at ../../Source/JavaScriptCore/dfg/DFGPlan.cpp:164
#9  0x00007ffff6e7a25d in JSC::DFG::compileImpl (vm=..., codeBlock=0x7fffb0649780, profiledDFGCodeBlock=0x0, mode=JSC::DFG::DFGMode, 
    osrEntryBytecodeIndex=0, mustHandleValues=..., callback=...) at ../../Source/JavaScriptCore/dfg/DFGDriver.cpp:108
#10 0x00007ffff6e7a398 in JSC::DFG::compile (vm=..., codeBlock=0x7fffb0649780, profiledDFGCodeBlock=0x0, mode=JSC::DFG::DFGMode, 
    osrEntryBytecodeIndex=0, mustHandleValues=..., passedCallback=...) at ../../Source/JavaScriptCore/dfg/DFGDriver.cpp:128
#11 0x00007ffff70d75cd in JSC::operationOptimize (exec=0x7fffffff2eb0, bytecodeIndex=0) at ../../Source/JavaScriptCore/jit/JITOperations.cpp:1158
#12 0x00007fffb1662bc5 in ?? ()
#13 0x0000000000000000 in ?? ()



The backtrace of the release crash:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff78f4bde in JSC::DFG::StackLayoutPhase::run() () from /home/reni/data/REPOS/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
(gdb) bt
#0  0x00007ffff78f4bde in JSC::DFG::StackLayoutPhase::run() ()
   from /home/reni/data/REPOS/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#1  0x00007ffff78f4692 in JSC::DFG::performStackLayout(JSC::DFG::Graph&amp;) ()
   from /home/reni/data/REPOS/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#2  0x00007ffff78891eb in JSC::DFG::Plan::compileInThreadImpl(JSC::DFG::LongLivedState&amp;) ()
   from /home/reni/data/REPOS/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#3  0x00007ffff78894b6 in JSC::DFG::Plan::compileInThread(JSC::DFG::LongLivedState&amp;, JSC::DFG::ThreadData*) ()
   from /home/reni/data/REPOS/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#4  0x00007ffff78154ac in JSC::DFG::compile(JSC::VM&amp;, JSC::CodeBlock*, JSC::CodeBlock*, JSC::DFG::CompilationMode, unsigned int, JSC::Operands&lt;JSC::JSValue, JSC::OperandValueTraits&lt;JSC::JSValue&gt; &gt; const&amp;, WTF::PassRefPtr&lt;JSC::DeferredCompilationCallback&gt;) ()
   from /home/reni/data/REPOS/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#5  0x00007ffff79a9e27 in operationOptimize () from /home/reni/data/REPOS/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#6  0x00007fffb2c25b4c in ?? ()
#7  0x0000000000000000 in ?? ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1068680</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-02-12 11:32:47 -0800</bug_when>
    <thetext>&lt;rdar://problem/19815551&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217648</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-08-04 16:26:48 -0700</bug_when>
    <thetext>This may be a duplicate of Bug 141721, and no longer causes a crash in WebKit.

*** This bug has been marked as a duplicate of bug 141721 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>246031</attachid>
            <date>2015-02-04 07:20:11 -0800</date>
            <delta_ts>2015-02-04 07:20:11 -0800</delta_ts>
            <desc>Test case</desc>
            <filename>crash.js</filename>
            <type>application/javascript</type>
            <size>59</size>
            <attacher name="Renata Hodovan">rhodovan.u-szeged</attacher>
            
              <data encoding="base64">ZnVuY3Rpb24gZnV6eihhcmd1bWVudHMpIHsKICAgIGZ1enooYXJndW1lbnRzKTsKfQpmdXp6KDIp
Owo=
</data>

          </attachment>
      

    </bug>

</bugzilla>