From: John R. <jr...@bi...> - 2018-04-05 04:31:57
|
> printf("Done flag:%d cmp:%d \n", flag, strcmp("aaaa", "cccc") ); ---------this line is number 27 > ==30141== Invalid write of size 4 > ==30141== at 0x4C27CAE: strcat(strcmp.c:3) > ==30141== by 0x108871: main (testClang.c:27) > ==30141== Address 0xfeb445bc is on thread 1's stack > ==30141== 12 bytes below stack pointer Show us the generated code for the printf statement: (gdb) disassemble main then copy+paste everything from the code for "flag = 0;" to the code for "return 1;" |