title: debugging segmentation fault using threads
body: <p>When debugging my c program I get this error message</p>
  
  <pre><code>Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 0x7ffff77f6700 (LWP 14945)]
  __strcpy_sse2_unaligned ()
  at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:532
  532 ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: Aucun fichier ou dossier de ce type.
  </code></pre>
  
  <p>I think that it's "useless" to post my code because it doesn't precise the error line.</p>
  
  <p>But I know I think it cames from this function:</p>
  
  <pre><code>void add_user(tlistU *lu, user * u,tuser *new)
  {
  
        tuser *nouveau = malloc(sizeof(tuser));
  
        u =malloc(sizeof(*u));        
        if (lu == NULL || nouveau == NULL)
        {
          exit(EXIT_FAILURE);
        }
     strcpy(nouveau-&gt;users-&gt;nickname,u-&gt;nickname);
     nouveau-&gt;next=lu-&gt;first;
     lu-&gt;first=nouveau;
  }
  </code></pre>
  
  <p>( nickname is a 9 char string )</p>