title: Four different outcomes when overflowing main stack
body: <p>Out of curiosity, I was playing with overflowing the the stack with this code:</p>
  
  <pre><code>fn main() {
      let my_array: [i32; 3000000000] = [3; 3000000000];
      println!("{}", my_array[0]);
  }
  </code></pre>
  
  <p>And to my surprise I ended with three different outcomes:</p>
  
  <p>1) This is what I expected:</p>
  
  <pre><code>thread '&lt;main&gt;' has overflowed its stack
      Illegal instruction (core dumped)
  </code></pre>
  
  <p>2) Surprisingly vague:</p>
  
  <pre><code>Illegal instruction (core dumped)
  </code></pre>
  
  <p>3) Totally puzzling:</p>
  
  <pre><code>208333333
  </code></pre>
  
  <p>In order for stochastic nature to show up I had to restart the shell, otherwise results were deterministic ( I would get the same error message over and over).</p>
  
  <p>I compiled with just:</p>
  
  <pre><code>rustc my_file.rs
  </code></pre>
  
  <p>and excuted with:</p>
  
  <pre><code>./my_file
  </code></pre>
  
  <p>My rustc version:</p>
  
  <pre><code>rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)
  </code></pre>
  
  <p>My ubuntu version:</p>
  
  <pre><code>Distributor ID: Ubuntu
  Description:    Ubuntu 14.04 LTS
  Release:    14.04
  Codename:   trusty
  </code></pre>
  
  <p>Also the size of the array I am trying to create is 12 gigs, I am on a tiny laptop that does not have that amount of RAM.</p>
  
  <p>Any ideas what could be going on here? </p>
  
  <p>Edit:</p>
  
  <p>I was playing with the size of array (which I think might be the reason for different errors, but why?), and got one more:</p>
  
  <p>4) Makes perfect sense. </p>
  
  <pre><code>error: the type `[i32; 300000000000000]` is too big for the current architecture
  </code></pre>
  
  <p>and my system architecture is <code>x86_64</code>.</p>