title: Segfault with NodeJs
body: <p>I'm trying to execute a test with mocha in node and it's stopping with a Segmentation Fault.</p>
  
  <p>In the process of gathering intelligence on the problem, I noticed:</p>
  
  <ul>
  <li>I updated node and the modules</li>
  <li><p>I deleted node_modules and re <code>npm install</code></p></li>
  <li><p>After using a bunch of <code>console.log</code> I located the problem after the <code>render</code> method returns and the <code>componentDidUpdate</code> of my react component fires</p></li>
  <li><p>When using iron-node there's no segfault. The test is actually passing</p></li>
  <li>With node, the segfault only occur when I run only the problematic test (with mocha's <code>it.only(...)</code>)</li>
  </ul>
  
  <p>I'd file an issue but I don't know how to reproduce it yet.</p>
  
  <p>Any idea/help would be more than welcome :)</p>
  
  <p>EDIT:</p>
  
  <p>For me it doesn't make any sense but if it does for you, I got that using this tool: <a href="https://github.com/ddopson/node-segfault-handler" rel="nofollow">https://github.com/ddopson/node-segfault-handler</a></p>
  
  <pre><code>PID 19289 received SIGSEGV for address: 0x38
  /home/guillaume/Documents/Random_Projects/cookies/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x1a1b)[0x7fb63afb7a1b]
  /usr/lib/libpthread.so.0(+0x10f00)[0x7fb640bb1f00]
  /usr/bin/node(_ZN2v88internal9FieldType7AsClassEv+0x15)[0x94a515]
  /usr/bin/node(_ZN2v88internal9FieldType7ConvertEPNS0_4ZoneE+0x24)[0x94a674]
  /usr/bin/node(_ZN2v88internal8compiler17AccessInfoFactory25ComputePropertyAccessInfoENS0_6HandleINS0_3MapEEENS3_INS0_4NameEEENS1_10AccessModeEPNS1_18PropertyAccessInfoE+0x7a8)[0x75bcc8]
  /usr/bin/node(_ZN2v88internal8compiler17AccessInfoFactory26ComputePropertyAccessInfosERKNS0_4ListINS0_6HandleINS0_3MapEEENS0_25FreeStoreAllocationPolicyEEENS4_INS0_4NameEEENS1_10AccessModeEPNS0_10ZoneVectorINS1_18PropertyAccessInfoEEE+0xae)[0x75c34e]
  /usr/bin/node(_ZN2v88internal8compiler29JSNativeContextSpecialization17ReduceNamedAccessEPNS1_4NodeES4_RKNS0_4ListINS0_6HandleINS0_3MapEEENS0_25FreeStoreAllocationPolicyEEENS6_INS0_4NameEEENS1_10AccessModeENS0_12LanguageModeES4_+0x156)[0x7c5446]
  /usr/bin/node(_ZN2v88internal8compiler29JSNativeContextSpecialization17ReduceNamedAccessEPNS1_4NodeES4_RKNS0_13FeedbackNexusENS0_6HandleINS0_4NameEEENS1_10AccessModeENS0_12LanguageModeE+0xff)[0x7c74cf]
  /usr/bin/node(_ZN2v88internal8compiler29JSNativeContextSpecialization17ReduceJSLoadNamedEPNS1_4NodeE+0x7f)[0x7c755f]
  /usr/bin/node(_ZN2v88internal8compiler29JSNativeContextSpecialization6ReduceEPNS1_4NodeE+0x45)[0x7c9e25]
  /usr/bin/node(_ZN2v88internal8compiler12GraphReducer6ReduceEPNS1_4NodeE+0x36)[0x799706]
  /usr/bin/node(_ZN2v88internal8compiler12GraphReducer9ReduceTopEv+0x1cc)[0x79a15c]
  /usr/bin/node(_ZN2v88internal8compiler12GraphReducer10ReduceNodeEPNS1_4NodeE+0x68)[0x79a288]
  /usr/bin/node(_ZN2v88internal8compiler8Pipeline12GenerateCodeEv+0xa4b)[0x7fe08b]
  /usr/bin/node(_ZN2v88internal19OptimizedCompileJob11CreateGraphEv+0x26c)[0x85537c]
  /usr/bin/node(_ZN2v88internal8Compiler16GetOptimizedCodeENS0_6HandleINS0_10JSFunctionEEENS1_15ConcurrencyModeENS0_9BailoutIdEPNS0_15JavaScriptFrameE+0xf0f)[0x856d4f]
  /usr/bin/node[0xb0202a]
  /usr/bin/node(_ZN2v88internal35Runtime_CompileOptimized_ConcurrentEiPPNS0_6ObjectEPNS0_7IsolateE+0xda)[0xb0269a]
  [0x2cab7ce0961b]
  </code></pre>
  
  <p>EDIT 2:</p>
  
  <p>I tried to extract the behavior from my test but since it's an integration/e2e test, everything is kind of linked.</p>
  
  <p>So here's what I do:</p>
  
  <p>Everything works as expected until I change the route of the <code>react-router</code>. Then a component render... or is supposed to. The error happens after the <code>render</code> method (and before the <code>componentDidUpdate</code> of a simple component). However, the component is rendered without problem earlier in the test... as well as when I execute it along with all the other tests...</p>
  
  <p>I tried to change the render method to return <code>&lt;h1&gt;Hello&lt;/h1&gt;</code> but I still run into the segfault.</p>