Tuesday, November 14, 2006
3:06 PM

Resolving stack_chk_fail Error

Today I moved to the new version of gcc 4.1.2. When trying to compile Xen, it kept giving me a 'stack_chk_fail' symbol not found error.

Took me 4 hours to figure out that it wasn't a problem with Xen but with my gcc.
Apparently the new version of gcc emits extra code to check for buffer overflows, such as stack smashing attacks by default whereas my kernel did not support it and I had been using 2.6.17.10 !

Anyways resolved the problem by adding -fno-stack-protector to the CFLAGS option in the Makefile.

0 comments:

Post a Comment