title: Valgrind Not Catching Segfaults
body: <p>I'm aware that Valgrind keeps track of the memory in a way that allows to to catch segfaults. However, why is not catching the following segfault?</p>
  
  <pre><code>int main() {
      char *x = calloc(16, 1);
      char *y = calloc(16, 1);
  
      x[80] = 'c';
      y[-80] = 'c';
  
      printf("%c %c\n", *x, *y);
      return 0;
  }
  </code></pre>
  
  <p>Isn't it supposed to catch the out of bound access in the heap? According to Valgrind's documentation:</p>
  
  <pre><code>But it should detect many errors that could crash your program (eg. cause a segmentation fault).
  </code></pre>