This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -fstack-protect


On 01/14/2015 04:25 PM, Mike Harrold wrote:
Since I know the stack cannot be smashed (and gcc is apparently unable
to determine that for itself), I'd like to turn it off for that
function.

Have you tried -fstack-protector-strong? It does a much better job than the size-based heuristics.

If you can come up with a minimal example that shows the phenomenon, we might come up with something better.

It's a a heavily used function that is inlined, so it's
causing increased code size and slower performance for no reason.

If it is inlined, the function itself will not be instrumented. Whether the caller is instrumented depends on its inlined functions and what else it does.

--
Florian Weimer / Red Hat Product Security


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]