gcc -fno-stack-protector is not working, how to fix it?

I am trying to mock a C stack overflow using strcpy like this: #include <string.h> int main() { char str[10]; strcpy(str, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); return 0; } and I try to compile the file using -fno-stack-protector to avoid compile errors: $ gcc -ggdb -mpreferred-stack-boundary=4 -fno-stack-protector -o overflow overflow.c but I failed and got this error: overflow.c: In… Read More gcc -fno-stack-protector is not working, how to fix it?