You are not logged in.
I'm just curious why it's their by default. I don't know much about the flag itself though if somebody could explain.
Offline
gcc's manpage would happily describe this for you...
-fstack-protector
Emit extra code to check for buffer overflows, such as stack smashing attacks. This is done by adding a
guard variable to functions with vulnerable objects. This includes functions that call alloca, and
functions with buffers larger than 8 bytes. The guards are initialized when a function is entered and
then checked when the function exits. If a guard check fails, an error message is printed and the
program exits.
In short, it's a security measure with low overhead, so it's worth enabling.
Offline
Is there a reason you think it should not be enabled?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Ok thanks falconindy, but how often do attacks like those happen? I honestly don't know much about gcc optimizations and programming.
Is there a reason you think it should not be enabled?
No but I was just curious as to why it was there. I have no problem with it being there.
Offline
That security measure essentially disables the most common exploit mechanism. They are fairly common programming mistakes.
Offline