diff options
author | Florian Weimer <fweimer@redhat.com> | 2014-05-09 14:23:46 +0200 |
---|---|---|
committer | Florian Weimer <fw@gcc.gnu.org> | 2014-05-09 14:23:46 +0200 |
commit | 6545746e3c784d94300954ccb155e6510c598ffa (patch) | |
tree | 6da35ec3f858b95d454e7bb32fb9dd5f8dc6c95c /gcc/cgraphunit.c | |
parent | b8d29c66597d6ff2a41ca6a190c0bd52126f491d (diff) | |
download | gcc-6545746e3c784d94300954ccb155e6510c598ffa.zip gcc-6545746e3c784d94300954ccb155e6510c598ffa.tar.gz gcc-6545746e3c784d94300954ccb155e6510c598ffa.tar.bz2 |
-fstack-protector-strong: Instrumentation for return slots
This patch fixes a loophole in the -fstack-protector-strong protection.
If a function call uses a return slot, the caller needs stack protector
instrumentation because the return slot is addressable.
gcc/
2014-05-09 Florian Weimer <fweimer@redhat.com>
* cfgexpand.c (stack_protect_decl_p): New function, extracted from
expand_used_vars.
(stack_protect_return_slot_p): New function.
(expand_used_vars): Call stack_protect_decl_p and
stack_protect_return_slot_p for -fstack-protector-strong.
gcc/testsuite/
2014-05-09 Florian Weimer <fweimer@redhat.com>
* gcc.dg/fstack-protector-strong.c: Add coverage for return slots.
* g++.dg/fstack-protector-strong.C: Likewise.
* gcc.target/i386/ssp-strong-reg.c: New file.
From-SVN: r210275
Diffstat (limited to 'gcc/cgraphunit.c')
0 files changed, 0 insertions, 0 deletions