title: Valgrind errors even though all heap blocks were freed
body: <p>I have recently developed a habit of running all of my programs through <code>valgrind</code> to check for memory leaks, but most of its results have been a bit cryptic for me.</p>
  
  <p>For my latest run, <code>valgrind -v</code> gave me:</p>
  
  <pre><code>All heap blocks were freed -- no leaks are possible
  </code></pre>
  
  <p>That means my program's covered for <strong>memory leaks</strong>, right?</p>
  
  <p>So what does this error mean? Is my program not reading certain memory blocks correctly?</p>
  
  <pre><code>ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 14 from 9)
  
  1 errors in context 1 of 1:
  Invalid read of size 4
     at 0x804885B: findPos (in /home/a.out)
     by 0xADD918: start_thread (pthread_create.c:301)
     by 0xA26CCD: clone (clone.S:133)
   Address 0x4a27108 is 0 bytes after a block of size 40 alloc'd
     at 0x4005BDC: malloc (vg_replace_malloc.c:195)
     by 0x804892F: readInput (in /home/a.out)
     by 0xADD918: start_thread (pthread_create.c:301)
     by 0xA26CCD: clone (clone.S:133)
  
  used_suppression:     14 dl-hack3-cond-1
  </code></pre>
  
  <p>Also, what are the so-called "suppressed" errors here?</p>