title: How to find the error due to signal SIGSEGV, Segmentation fault?
body: <p>I have created a c code for a real-time project. I'm using an Ubuntu 15.04 and the code crash with this result(gdb):</p>
  
  <pre><code>     Program received signal SIGSEGV , Segmentation fault.
       [Switching to thread 0x7fffeb7fe700 (LWP 4072)]
       __GI___pthread_mutex_lock (mutex=0xfffffffeb5c6dcb0)
       at ../nptl/pthread_mutex_loxk.c:67
       67       ../nptl/pthread_mutex_lock.c: File o directory non esistente
  </code></pre>
  
  <p>Tiping :
  (gdb) x/i $pc the following message appear on the screen:</p>
  
  <pre><code>     =&gt; 0x7ffff7bc4c84 &lt;__GI___pthread_mutex_lock+4&gt;:   move  0x10(%rdi),%edx
  </code></pre>
  
  <p>Can the problem be caused by stackoverflow? How can I solve the problem?
  Is it possible to know the exact code's row in which the crash appear?      </p>