title: -fstack-protector, -fstack-protector-all and -fmudflap
body: <p>Do -fstack-protector and -fstack-protector-all protect heap-based memory allocations too or only stack-based ones ?</p>
  
  <p>What is the difference between the first 2 and -fmudflap ?</p>
  
  <p>Any recommendations as to which is better for debugging ?</p>
  
  <p>(I'm not sure if the <a href="http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html" rel="noreferrer">gcc man page</a> is clear enough or I simply do not understand it...)</p>
  
  <pre class="lang-c prettyprint-override"><code>char foobar[10]; // stack-based
  
  char *foobar = malloc(10); // heap-based
  </code></pre>