I have the following codes:
int main(int argc,char * argv[] )
{
char* SourceWeightFiel;
char* TargetWeightFile;
strcpy( SourceWeightFiel, argv[1] );
strcpy( TargetWeightFile, argv[2] );
return 1;
}
when I debug it in gdb, it's Ok in running the first strcpy, but when it goes to the second strcpy, it always gives the following errors:
26 strcpy( SourceWeightFiel, argv[1] );
(gdb) n
27 strcpy( TargetWeightFile, args );
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
__strcpy_sse2_unaligned ()
at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:94
94 ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: No such file or directory.
(gdb)
I cannot figure out why, and have no idea how to fix it. Does anyone know about it?