Tuesday, November 14, 2006

 

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.

Comments:
Hi,

I run into this same problem. But because I am not that familiar with C/C++ makefiles I don't know what to edit. Could you tell me which file and line I should edit to make it work. I have tried using CFLAGS on the commadline "make linux-2.6-xen-build CFLAGS=-fno-stack-protector" but that just gave me a new set of errors :)

If you could mail a solution to my yahoo address jkommeri@yahoo.com, it would save me a lot of hacking time :)

thanks,
Jukka
 
I just wanted to say thanks for taking the time to post this fix. It saved me a lot of hassle.
 
Hi.
Thanks fro the post. I feel i am close to solving it .however my compiler is g++ and adding -fno-stack-protector seem to introudce new errors. So could kindly lemme know f there is an alternative ?

Thanks
Sankar
 
Thank you :D
 
I just wanted to say thanks for taking the time to post this fix. It saved me a lot of hassle.
free pornescort sydney
 
Most of you probably didn’t know that the Latin term for ‘stuttering’ is Alalia Syllabaris, don’t worry, I didn’t either. However, I bet you can name...
Vegas EscortsEscort Roma
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?