I get a weird seg error that seems to be happening from somewhere not in my program ... obviously not. I call "strcmp" on two arrays ... Both arrays are stored in structures of the same type. I get one with dot notation and dereferencing "->" once:
int name = strcmp(one.name, two->name);
It compiles fine, but when I run it, I get a seg error. I tried tracking it with GDB, but when I set breakpoints just before where, in my opinion, this should happen, it's all the same. I get:
Program received signal SIGSEGV, Segmentation fault.
__strcmp_ia32 () at ../sysdeps/i386/i686/multiarch/../strcmp.S:40
40 ../sysdeps/i386/i686/multiarch/../strcmp.S: No such file or directory.
in ../sysdeps/i386/i686/multiarch/../strcmp.S
FML Suggestions? Thank!
source
share