title: Buffer overflow works in gdb but not without it
body: <p>I am on CentOS 6.4 32 bit and am trying to cause a buffer overflow in a program. Within GDB it works. Here is the output:</p>
  
  <pre><code>[root@localhost bufferoverflow]# gdb stack
  GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
  Copyright (C) 2010 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "i686-redhat-linux-gnu".
  For bug reporting instructions, please see:
  &lt;http://www.gnu.org/software/gdb/bugs/&gt;...
  Reading symbols from /root/bufferoverflow/stack...done.
  (gdb) r
  Starting program: /root/bufferoverflow/stack
  process 6003 is executing new program: /bin/bash
  Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.107.el6_4.2.i686
  sh-4.1#
  </code></pre>
  
  <p>However when I run the program stack just on its own it seg faults. Why might this be?</p>