My Debian is with kernel 4.0.0-2-rt-686-pae, and gcc (Debian 4.9.2-10) 4.9.2. 
 
I have a program where it uses strcpy, but when executing (compilation successfully), it throws segment fault. Debugging with gdb, it shows that it goes worng in strcpy function. 
 
_strcpy_sse2 () at ../sysdeps/i386/i686/multiarch/strcpy-sse2.S:2099
2099    ../sysdeps/i386/i686/multiarch/strcpy-sse2.S: No such file or directory.
 
I wrote a simple program, it also throws segment fault. 
 
#include <string.h>
#include <stdio.h>
int main(int argc, char **argv)
{
  char *str;
  strcpy(str, "hello");
  printf("say %s\n", str);
  return 0;
}
 
How can I fix this problem?
 
Thanks
 

Reply via email to